Index: acconfig.h =================================================================== RCS file: /cvs/openssh/acconfig.h,v retrieving revision 1.141 diff -u -r1.141 acconfig.h --- acconfig.h 25 Jun 2002 22:35:16 -0000 1.141 +++ acconfig.h 2 Jul 2002 23:23:14 -0000 @@ -213,6 +213,9 @@ /* Define if you want S/Key support */ #undef SKEY +/* Define if you want OPIE support */ +#undef OPIE + /* Define if you want TCP Wrappers support */ #undef LIBWRAP Index: auth-skey.c =================================================================== RCS file: /cvs/openssh/auth-skey.c,v retrieving revision 1.23 diff -u -r1.23 auth-skey.c --- auth-skey.c 21 Jun 2002 00:41:52 -0000 1.23 +++ auth-skey.c 2 Jul 2002 23:23:14 -0000 @@ -26,7 +26,15 @@ #ifdef SKEY +#ifdef OPIE +#include +#define skey opie +#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) +#define skey_haskey(u) opie_haskey((u)) +#define skey_passcheck(u, r) opie_passverify((u), (r)) +#else #include +#endif #include "xmalloc.h" #include "auth.h" Index: auth.h =================================================================== RCS file: /cvs/openssh/auth.h,v retrieving revision 1.42 diff -u -r1.42 auth.h --- auth.h 6 Jun 2002 20:52:37 -0000 1.42 +++ auth.h 2 Jul 2002 23:23:14 -0000 @@ -188,5 +188,12 @@ #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) #define AUTH_FAIL_MSG "Too many authentication failures for %.100s" +#ifdef SKEY +#ifdef OPIE +#define SKEY_PROMPT "\nOPIE Password: " +#else #define SKEY_PROMPT "\nS/Key Password: " +#endif +#endif + #endif Index: configure.ac =================================================================== RCS file: /cvs/openssh/configure.ac,v retrieving revision 1.73 diff -u -r1.73 configure.ac --- configure.ac 28 Jun 2002 00:37:33 -0000 1.73 +++ configure.ac 2 Jul 2002 23:23:15 -0000 @@ -510,6 +510,41 @@ ] ) +# Check whether user wants OPIE support +OPIE_MSG="no" +AC_ARG_WITH(opie, + [ --with-opie[[=PATH]] Enable OPIE support + (optionally in PATH)], + [ + if test "x$withval" != "xno" ; then + + if test "x$withval" != "xyes" ; then + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + fi + + AC_DEFINE(SKEY) + AC_DEFINE(OPIE) + LIBS="-lopie $LIBS" + OPIE_MSG="yes" + + AC_MSG_CHECKING([for opie support]) + AC_TRY_RUN( + [ +#include +#include +#include +int main() { char *ff = opie_keyinfo(""); ff=""; return 0; } + ], + [AC_MSG_RESULT(yes)], + [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([** Incomplete or missing opie libraries.]) + ]) + fi + ] +) + # Check whether user wants TCP wrappers support TCPW_MSG="no" AC_ARG_WITH(tcp-wrappers, @@ -1611,7 +1646,11 @@ ac_cv_have_getopt_optreset, [ AC_TRY_LINK( [ +#if HAVE_GETOPT_H #include +#elif HAVE_UNISTD_H +#include +#endif ], [ extern int optreset; optreset = 0; ], [ ac_cv_have_getopt_optreset="yes" ], @@ -2405,6 +2444,7 @@ echo " Smartcard support: $SCARD_MSG" echo " AFS support: $AFS_MSG" echo " S/KEY support: $SKEY_MSG" +echo " OPIE support: $OPIE_MSG" echo " TCP Wrappers support: $TCPW_MSG" echo " MD5 password support: $MD5_MSG" echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" Index: monitor.c =================================================================== RCS file: /cvs/openssh/monitor.c,v retrieving revision 1.22 diff -u -r1.22 monitor.c --- monitor.c 27 Jun 2002 00:12:58 -0000 1.22 +++ monitor.c 2 Jul 2002 23:23:15 -0000 @@ -30,7 +30,15 @@ #include #ifdef SKEY +#ifdef OPIE +#include +#define skey opie +#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) +#define skey_haskey(u) opie_haskey((u)) +#define skey_passcheck(u, r) opie_passverify((u), (r)) +#else #include +#endif #endif #include "ssh.h" Index: monitor_wrap.c =================================================================== RCS file: /cvs/openssh/monitor_wrap.c,v retrieving revision 1.13 diff -u -r1.13 monitor_wrap.c --- monitor_wrap.c 27 Jun 2002 00:23:03 -0000 1.13 +++ monitor_wrap.c 2 Jul 2002 23:23:15 -0000 @@ -767,6 +767,7 @@ return ((authok == 0) ? -1 : 0); } +#ifdef SKEY int mm_skey_query(void *ctx, char **name, char **infotxt, u_int *numprompts, char ***prompts, u_int **echo_on) @@ -829,6 +830,7 @@ return ((authok == 0) ? -1 : 0); } +#endif void mm_ssh1_session_id(u_char session_id[16])