]> andersk Git - openssh.git/blobdiff - sshconnect2.c
- markus@cvs.openbsd.org 2001/04/11 10:59:01
[openssh.git] / sshconnect2.c
index 1c52231b953cfe249675d4e62803f94cb0834ded..da5b71478470657e28be3cba67702774602c6114 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.63 2001/04/04 00:06:54 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.67 2001/04/05 10:42:56 markus Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/md5.h>
@@ -111,15 +111,15 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
                myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
        }
 
-       kex = kex_start(myproposal);
+       /* start key exchange */
+       kex = kex_setup(myproposal);
        kex->client_version_string=client_version_string;
        kex->server_version_string=server_version_string;
        kex->check_host_key=&check_host_key_callback;
 
        xxx_kex = kex;
 
-       /* start key exchange */
-       dispatch_run(DISPATCH_BLOCK, &kex->newkeys, kex);
+       dispatch_run(DISPATCH_BLOCK, &kex->done, kex);
 
        session_id2 = kex->session_id;
        session_id2_len = kex->session_id_len;
@@ -213,7 +213,6 @@ ssh_userauth2(const char *server_user, char *host)
        Authctxt authctxt;
        int type;
        int plen;
-       int i;
 
        if (options.challenge_reponse_authentication)
                options.kbd_interactive_authentication = 1;
@@ -254,10 +253,7 @@ ssh_userauth2(const char *server_user, char *host)
        /* initial userauth request */
        userauth_none(&authctxt);
 
-       //dispatch_init(&input_userauth_error);
-        for (i = 50; i <= 254; i++) {
-                dispatch_set(i, &input_userauth_error);
-        }
+       dispatch_init(&input_userauth_error);
        dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success);
        dispatch_set(SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure);
        dispatch_set(SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner);
@@ -646,7 +642,7 @@ int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
 int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
     u_char *data, int datalen)
 {
-        return key_sign(key, sigp, lenp, data, datalen);
+       return key_sign(key, sigp, lenp, data, datalen);
 }
 
 int
@@ -829,7 +825,7 @@ static char *preferred = NULL;
 /*
  * Given the authentication method list sent by the server, return the
  * next method we should try.  If the server initially sends a nil list,
- * use a built-in default list. 
+ * use a built-in default list.
  */
 Authmethod *
 authmethod_get(char *authlist)
This page took 0.04933 seconds and 4 git commands to generate.