]> andersk Git - openssh.git/blobdiff - ssh-keygen.c
- (stevesk) [auth1.c] fix password auth for protocol 1 when
[openssh.git] / ssh-keygen.c
index d14c9900450efb7e3c56c3b239ed9a8a028c8d6f..1a8a73129f1860cb6a510fb7812a733055c2b1ce 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.95 2002/03/21 16:54:53 markus Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.97 2002/03/25 17:34:27 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/pem.h>
@@ -416,14 +416,18 @@ do_upload(struct passwd *pw, const char *sc_reader_id)
 static void
 do_download(struct passwd *pw, const char *sc_reader_id)
 {
-       Key *pub = NULL;
+       Key **keys = NULL;
+       int i;
 
-       pub = sc_get_key(sc_reader_id);
-       if (pub == NULL)
+       keys = sc_get_keys(sc_reader_id, NULL);
+       if (keys == NULL)
                fatal("cannot read public key from smartcard");
-       key_write(pub, stdout);
-       key_free(pub);
-       fprintf(stdout, "\n");
+       for (i = 0; keys[i]; i++) {
+               key_write(keys[i], stdout);
+               key_free(keys[i]);
+               fprintf(stdout, "\n");
+       }
+       xfree(keys);
        exit(0);
 }
 #endif /* SMARTCARD */
This page took 0.037296 seconds and 4 git commands to generate.