summaryrefslogtreecommitdiff
path: root/auth2-hostbased.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-28 22:36:00 +0000
committerDamien Miller <djm@mindrot.org>2015-01-29 10:18:56 +1100
commit9ce86c926dfa6e0635161b035e3944e611cbccf0 (patch)
treed946ba3df439153ece7857d742035a3d6adcbc98 /auth2-hostbased.c
parent9125525c37bf73ad3ee4025520889d2ce9d10f29 (diff)
downloadopenssh-git-9ce86c926dfa6e0635161b035e3944e611cbccf0.tar.gz
upstream commit
update to new API (key_fingerprint => sshkey_fingerprint) check sshkey_fingerprint return values; ok markus
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r--auth2-hostbased.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 6f69e89d..eebfe8fc 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-hostbased.c,v 1.23 2015/01/28 11:07:25 djm Exp $ */
+/* $OpenBSD: auth2-hostbased.c,v 1.24 2015/01/28 22:36:00 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -224,15 +224,17 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
if (host_status == HOST_OK) {
if (key_is_cert(key)) {
- fp = key_fingerprint(key->cert->signature_key,
- options.fingerprint_hash, SSH_FP_DEFAULT);
+ if ((fp = sshkey_fingerprint(key->cert->signature_key,
+ options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
+ fatal("%s: sshkey_fingerprint fail", __func__);
verbose("Accepted certificate ID \"%s\" signed by "
"%s CA %s from %s@%s", key->cert->key_id,
key_type(key->cert->signature_key), fp,
cuser, lookup);
} else {
- fp = key_fingerprint(key, options.fingerprint_hash,
- SSH_FP_DEFAULT);
+ if ((fp = sshkey_fingerprint(key,
+ options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
+ fatal("%s: sshkey_fingerprint fail", __func__);
verbose("Accepted %s public key %s from %s@%s",
key_type(key), fp, cuser, lookup);
}