diff options
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 7d3629365..1a8a73129 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.96 2002/03/21 21:54:34 rees Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.97 2002/03/25 17:34:27 markus Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -416,14 +416,18 @@ do_upload(struct passwd *pw, const char *sc_reader_id) | |||
416 | static void | 416 | static void |
417 | do_download(struct passwd *pw, const char *sc_reader_id) | 417 | do_download(struct passwd *pw, const char *sc_reader_id) |
418 | { | 418 | { |
419 | Key *pub = NULL; | 419 | Key **keys = NULL; |
420 | int i; | ||
420 | 421 | ||
421 | pub = sc_get_key(sc_reader_id, NULL); | 422 | keys = sc_get_keys(sc_reader_id, NULL); |
422 | if (pub == NULL) | 423 | if (keys == NULL) |
423 | fatal("cannot read public key from smartcard"); | 424 | fatal("cannot read public key from smartcard"); |
424 | key_write(pub, stdout); | 425 | for (i = 0; keys[i]; i++) { |
425 | key_free(pub); | 426 | key_write(keys[i], stdout); |
426 | fprintf(stdout, "\n"); | 427 | key_free(keys[i]); |
428 | fprintf(stdout, "\n"); | ||
429 | } | ||
430 | xfree(keys); | ||
427 | exit(0); | 431 | exit(0); |
428 | } | 432 | } |
429 | #endif /* SMARTCARD */ | 433 | #endif /* SMARTCARD */ |