- deraadt@cvs.openbsd.org 2001/03/11 16:39:03
[ssh-keygen.c] KNF, and SHA1 binary output is just creeping featurism
This commit is contained in:
parent
cbe3ad2f70
commit
ca0bf57f2f
|
@ -14,6 +14,9 @@
|
||||||
- jakob@cvs.openbsd.org 2001/03/11 15:13:09
|
- jakob@cvs.openbsd.org 2001/03/11 15:13:09
|
||||||
[key.c]
|
[key.c]
|
||||||
cleanup & shorten some var names key_fingerprint_bubblebabble.
|
cleanup & shorten some var names key_fingerprint_bubblebabble.
|
||||||
|
- deraadt@cvs.openbsd.org 2001/03/11 16:39:03
|
||||||
|
[ssh-keygen.c]
|
||||||
|
KNF, and SHA1 binary output is just creeping featurism
|
||||||
|
|
||||||
20010311
|
20010311
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
|
@ -4507,4 +4510,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.943 2001/03/11 20:06:59 mouring Exp $
|
$Id: ChangeLog,v 1.944 2001/03/11 20:08:29 mouring Exp $
|
||||||
|
|
12
ssh-keygen.c
12
ssh-keygen.c
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh-keygen.c,v 1.47 2001/03/11 15:04:16 jakob Exp $");
|
RCSID("$OpenBSD: ssh-keygen.c,v 1.48 2001/03/11 16:39:03 deraadt Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
@ -351,17 +351,16 @@ do_fingerprint(struct passwd *pw)
|
||||||
debug("try_load_public_key KEY_UNSPEC failed");
|
debug("try_load_public_key KEY_UNSPEC failed");
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
char *digest_md5, *digest_sha1, *digest_bubblebabble;
|
char *digest_md5, *digest_bubblebabble;
|
||||||
|
|
||||||
digest_md5 = key_fingerprint_ex(public, SSH_FP_MD5, SSH_FP_HEX);
|
digest_md5 = key_fingerprint_ex(public, SSH_FP_MD5, SSH_FP_HEX);
|
||||||
digest_sha1 = key_fingerprint_ex(public, SSH_FP_SHA1, SSH_FP_HEX);
|
digest_bubblebabble = key_fingerprint_ex(public, SSH_FP_SHA1,
|
||||||
digest_bubblebabble = key_fingerprint_ex(public, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
|
SSH_FP_BUBBLEBABBLE);
|
||||||
|
|
||||||
if(print_verbose) {
|
if (print_verbose) {
|
||||||
printf("comment: %s\n", comment);
|
printf("comment: %s\n", comment);
|
||||||
printf("size: %d\n", key_size(public));
|
printf("size: %d\n", key_size(public));
|
||||||
printf("md5: %s\n", digest_md5);
|
printf("md5: %s\n", digest_md5);
|
||||||
printf("sha1: %s\n", digest_sha1);
|
|
||||||
printf("bubblebabble: %s\n", digest_bubblebabble);
|
printf("bubblebabble: %s\n", digest_bubblebabble);
|
||||||
} else {
|
} else {
|
||||||
printf("%d %s %s\n", key_size(public), digest_md5, comment);
|
printf("%d %s %s\n", key_size(public), digest_md5, comment);
|
||||||
|
@ -370,7 +369,6 @@ do_fingerprint(struct passwd *pw)
|
||||||
key_free(public);
|
key_free(public);
|
||||||
xfree(comment);
|
xfree(comment);
|
||||||
xfree(digest_md5);
|
xfree(digest_md5);
|
||||||
xfree(digest_sha1);
|
|
||||||
xfree(digest_bubblebabble);
|
xfree(digest_bubblebabble);
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
Loading…
Reference in New Issue