mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-29 00:01:43 +08:00
- stevesk@cvs.openbsd.org 2010/03/15 19:40:02
[key.c key.h ssh-keygen.c] also print certificate type (user or host) for ssh-keygen -L ok djm kettenis
This commit is contained in:
parent
5a5d94b12f
commit
1cfbfaf4a0
@ -30,6 +30,10 @@
|
||||
- jmc@cvs.openbsd.org 2010/03/13 23:38:13
|
||||
[ssh-keygen.1]
|
||||
fix a formatting error (args need quoted); noted by stevesk
|
||||
- stevesk@cvs.openbsd.org 2010/03/15 19:40:02
|
||||
[key.c key.h ssh-keygen.c]
|
||||
also print certificate type (user or host) for ssh-keygen -L
|
||||
ok djm kettenis
|
||||
|
||||
20100314
|
||||
- (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix
|
||||
|
15
key.c
15
key.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: key.c,v 1.85 2010/03/04 01:44:57 djm Exp $ */
|
||||
/* $OpenBSD: key.c,v 1.86 2010/03/15 19:40:02 stevesk Exp $ */
|
||||
/*
|
||||
* read_bignum():
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -801,6 +801,19 @@ key_type(const Key *k)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char *
|
||||
key_cert_type(const Key *k)
|
||||
{
|
||||
switch (k->cert->type) {
|
||||
case SSH2_CERT_TYPE_USER:
|
||||
return "user";
|
||||
case SSH2_CERT_TYPE_HOST:
|
||||
return "host";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
key_ssh_name(const Key *k)
|
||||
{
|
||||
|
3
key.h
3
key.h
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: key.h,v 1.28 2010/02/26 20:29:54 djm Exp $ */
|
||||
/* $OpenBSD: key.h,v 1.29 2010/03/15 19:40:02 stevesk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
@ -82,6 +82,7 @@ int key_equal(const Key *, const Key *);
|
||||
char *key_fingerprint(Key *, enum fp_type, enum fp_rep);
|
||||
u_char *key_fingerprint_raw(Key *, enum fp_type, u_int *);
|
||||
const char *key_type(const Key *);
|
||||
const char *key_cert_type(const Key *);
|
||||
int key_write(const Key *, FILE *);
|
||||
int key_read(Key *, char **);
|
||||
u_int key_size(const Key *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssh-keygen.c,v 1.184 2010/03/07 22:16:01 djm Exp $ */
|
||||
/* $OpenBSD: ssh-keygen.c,v 1.185 2010/03/15 19:40:02 stevesk Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -1393,7 +1393,8 @@ do_show_cert(struct passwd *pw)
|
||||
SSH_FP_MD5, SSH_FP_HEX);
|
||||
|
||||
printf("%s:\n", identity_file);
|
||||
printf(" %s certificate %s\n", key_type(key), key_fp);
|
||||
printf(" %s %s certificate %s\n", key_type(key),
|
||||
key_cert_type(key), key_fp);
|
||||
printf(" Signed by %s CA %s\n",
|
||||
key_type(key->cert->signature_key), ca_fp);
|
||||
printf(" Key ID \"%s\"\n", key->cert->key_id);
|
||||
|
Loading…
Reference in New Issue
Block a user