diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | key.c | 15 | ||||
-rw-r--r-- | key.h | 3 | ||||
-rw-r--r-- | ssh-keygen.c | 5 |
4 files changed, 23 insertions, 4 deletions
@@ -30,6 +30,10 @@ | |||
30 | - jmc@cvs.openbsd.org 2010/03/13 23:38:13 | 30 | - jmc@cvs.openbsd.org 2010/03/13 23:38:13 |
31 | [ssh-keygen.1] | 31 | [ssh-keygen.1] |
32 | fix a formatting error (args need quoted); noted by stevesk | 32 | fix a formatting error (args need quoted); noted by stevesk |
33 | - stevesk@cvs.openbsd.org 2010/03/15 19:40:02 | ||
34 | [key.c key.h ssh-keygen.c] | ||
35 | also print certificate type (user or host) for ssh-keygen -L | ||
36 | ok djm kettenis | ||
33 | 37 | ||
34 | 20100314 | 38 | 20100314 |
35 | - (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix | 39 | - (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.c,v 1.85 2010/03/04 01:44:57 djm Exp $ */ | 1 | /* $OpenBSD: key.c,v 1.86 2010/03/15 19:40:02 stevesk Exp $ */ |
2 | /* | 2 | /* |
3 | * read_bignum(): | 3 | * read_bignum(): |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -802,6 +802,19 @@ key_type(const Key *k) | |||
802 | } | 802 | } |
803 | 803 | ||
804 | const char * | 804 | const char * |
805 | key_cert_type(const Key *k) | ||
806 | { | ||
807 | switch (k->cert->type) { | ||
808 | case SSH2_CERT_TYPE_USER: | ||
809 | return "user"; | ||
810 | case SSH2_CERT_TYPE_HOST: | ||
811 | return "host"; | ||
812 | default: | ||
813 | return "unknown"; | ||
814 | } | ||
815 | } | ||
816 | |||
817 | const char * | ||
805 | key_ssh_name(const Key *k) | 818 | key_ssh_name(const Key *k) |
806 | { | 819 | { |
807 | switch (k->type) { | 820 | switch (k->type) { |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.h,v 1.28 2010/02/26 20:29:54 djm Exp $ */ | 1 | /* $OpenBSD: key.h,v 1.29 2010/03/15 19:40:02 stevesk Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -82,6 +82,7 @@ int key_equal(const Key *, const Key *); | |||
82 | char *key_fingerprint(Key *, enum fp_type, enum fp_rep); | 82 | char *key_fingerprint(Key *, enum fp_type, enum fp_rep); |
83 | u_char *key_fingerprint_raw(Key *, enum fp_type, u_int *); | 83 | u_char *key_fingerprint_raw(Key *, enum fp_type, u_int *); |
84 | const char *key_type(const Key *); | 84 | const char *key_type(const Key *); |
85 | const char *key_cert_type(const Key *); | ||
85 | int key_write(const Key *, FILE *); | 86 | int key_write(const Key *, FILE *); |
86 | int key_read(Key *, char **); | 87 | int key_read(Key *, char **); |
87 | u_int key_size(const Key *); | 88 | u_int key_size(const Key *); |
diff --git a/ssh-keygen.c b/ssh-keygen.c index dd662c907..37e516ff2 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.184 2010/03/07 22:16:01 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.185 2010/03/15 19:40:02 stevesk Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1393,7 +1393,8 @@ do_show_cert(struct passwd *pw) | |||
1393 | SSH_FP_MD5, SSH_FP_HEX); | 1393 | SSH_FP_MD5, SSH_FP_HEX); |
1394 | 1394 | ||
1395 | printf("%s:\n", identity_file); | 1395 | printf("%s:\n", identity_file); |
1396 | printf(" %s certificate %s\n", key_type(key), key_fp); | 1396 | printf(" %s %s certificate %s\n", key_type(key), |
1397 | key_cert_type(key), key_fp); | ||
1397 | printf(" Signed by %s CA %s\n", | 1398 | printf(" Signed by %s CA %s\n", |
1398 | key_type(key->cert->signature_key), ca_fp); | 1399 | key_type(key->cert->signature_key), ca_fp); |
1399 | printf(" Key ID \"%s\"\n", key->cert->key_id); | 1400 | printf(" Key ID \"%s\"\n", key->cert->key_id); |