diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-28 23:36:00 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-29 00:18:56 +0100 |
commit | 9ce86c926dfa6e0635161b035e3944e611cbccf0 (patch) | |
tree | d946ba3df439153ece7857d742035a3d6adcbc98 /sshconnect2.c | |
parent | upstream commit (diff) | |
download | openssh-9ce86c926dfa6e0635161b035e3944e611cbccf0.tar.xz openssh-9ce86c926dfa6e0635161b035e3944e611cbccf0.zip |
upstream commit
update to new API (key_fingerprint => sshkey_fingerprint)
check sshkey_fingerprint return values; ok markus
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 8da4d70dd..48882e3a5 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.221 2015/01/20 20:16:21 markus Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.222 2015/01/28 22:36:00 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -591,7 +591,9 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) key->type, pktype); goto done; } - fp = sshkey_fingerprint(key, options.fingerprint_hash, SSH_FP_DEFAULT); + if ((fp = sshkey_fingerprint(key, options.fingerprint_hash, + SSH_FP_DEFAULT)) == NULL) + goto done; debug2("input_userauth_pk_ok: fp %s", fp); free(fp); @@ -1009,7 +1011,9 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id) int have_sig = 1; char *fp; - fp = key_fingerprint(id->key, options.fingerprint_hash, SSH_FP_DEFAULT); + if ((fp = sshkey_fingerprint(id->key, options.fingerprint_hash, + SSH_FP_DEFAULT)) == NULL) + return 0; debug3("sign_and_send_pubkey: %s %s", key_type(id->key), fp); free(fp); |