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)
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 6f69e89de..eebfe8fc3 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-hostbased.c,v 1.23 2015/01/28 11:07:25 djm Exp $ */ 1/* $OpenBSD: auth2-hostbased.c,v 1.24 2015/01/28 22:36:00 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -224,15 +224,17 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
224 224
225 if (host_status == HOST_OK) { 225 if (host_status == HOST_OK) {
226 if (key_is_cert(key)) { 226 if (key_is_cert(key)) {
227 fp = key_fingerprint(key->cert->signature_key, 227 if ((fp = sshkey_fingerprint(key->cert->signature_key,
228 options.fingerprint_hash, SSH_FP_DEFAULT); 228 options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
229 fatal("%s: sshkey_fingerprint fail", __func__);
229 verbose("Accepted certificate ID \"%s\" signed by " 230 verbose("Accepted certificate ID \"%s\" signed by "
230 "%s CA %s from %s@%s", key->cert->key_id, 231 "%s CA %s from %s@%s", key->cert->key_id,
231 key_type(key->cert->signature_key), fp, 232 key_type(key->cert->signature_key), fp,
232 cuser, lookup); 233 cuser, lookup);
233 } else { 234 } else {
234 fp = key_fingerprint(key, options.fingerprint_hash, 235 if ((fp = sshkey_fingerprint(key,
235 SSH_FP_DEFAULT); 236 options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
237 fatal("%s: sshkey_fingerprint fail", __func__);
236 verbose("Accepted %s public key %s from %s@%s", 238 verbose("Accepted %s public key %s from %s@%s",
237 key_type(key), fp, cuser, lookup); 239 key_type(key), fp, cuser, lookup);
238 } 240 }