]> andersk Git - openssh.git/blobdiff - sshconnect2.c
- markus@cvs.openbsd.org 2001/07/23 09:06:28
[openssh.git] / sshconnect2.c
index 5f4943ba80faadefddb8c0b19f42f46481d00b80..a86d0036b70734ec7a3e491d5b89616ea4cf9a60 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.77 2001/06/24 05:35:34 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.81 2001/07/23 09:06:28 markus Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/md5.h>
@@ -195,22 +195,22 @@ static Authmethod *authmethod_lookup(const char *name);
 static char *authmethods_get(void);
 
 Authmethod authmethods[] = {
-       {"publickey",
-               userauth_pubkey,
-               &options.pubkey_authentication,
-               NULL},
        {"hostbased",
                userauth_hostbased,
                &options.hostbased_authentication,
                NULL},
-       {"password",
-               userauth_passwd,
-               &options.password_authentication,
-               &options.batch_mode},
+       {"publickey",
+               userauth_pubkey,
+               &options.pubkey_authentication,
+               NULL},
        {"keyboard-interactive",
                userauth_kbdint,
                &options.kbd_interactive_authentication,
                &options.batch_mode},
+       {"password",
+               userauth_passwd,
+               &options.password_authentication,
+               &options.batch_mode},
        {"none",
                userauth_none,
                NULL,
@@ -461,7 +461,7 @@ userauth_passwd(Authctxt *authctxt)
        return 1;
 }
 
-void
+static void
 clear_auth_state(Authctxt *authctxt)
 {
        /* XXX clear authentication state */
@@ -640,6 +640,11 @@ identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
        idx = authctxt->last_key_hint;
        if (idx < 0)
                return -1;
+
+       /* private key is stored in external hardware */
+       if (options.identity_keys[idx]->flags & KEY_FLAG_EXT) 
+               return key_sign(options.identity_keys[idx], sigp, lenp, data, datalen);
+
        private = load_identity_file(options.identity_files[idx]);
        if (private == NULL)
                return -1;
@@ -769,9 +774,9 @@ input_userauth_info_req(int type, int plen, void *ctxt)
        inst = packet_get_string(NULL);
        lang = packet_get_string(NULL);
        if (strlen(name) > 0)
-               log(name);
+               log("%s", name);
        if (strlen(inst) > 0)
-               log(inst);
+               log("%s", inst);
        xfree(name);
        xfree(inst);
        xfree(lang);
@@ -976,7 +981,8 @@ authmethod_get(char *authlist)
 
 
 #define        DELIM   ","
-char *
+
+static char *
 authmethods_get(void)
 {
        Authmethod *method = NULL;
This page took 0.041642 seconds and 4 git commands to generate.