summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2020-03-06 18:23:18 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2020-03-06 18:23:18 +0000
commitc2e7c91709662b2d9a6c94f1bcefeae07f49fe90 (patch)
treef75bd117639781f5d64512803c97d687a0b6f1c1 /usr.bin/ssh
parent61d756297bcc63de5ddc99bdbe3edbe89af5cb0d (diff)
sshkey_cert_check_authority requires reason to be set; ok djm
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/sshkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c
index ed629e65c6c..a92205e2c00 100644
--- a/usr.bin/ssh/sshkey.c
+++ b/usr.bin/ssh/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.101 2020/03/06 18:21:28 markus Exp $ */
+/* $OpenBSD: sshkey.c,v 1.102 2020/03/06 18:23:17 markus Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -3027,8 +3027,8 @@ sshkey_cert_check_authority(const struct sshkey *k,
u_int i, principal_matches;
time_t now = time(NULL);
- if (reason != NULL)
- *reason = NULL;
+ if (reason == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
if (want_host) {
if (k->cert->type != SSH2_CERT_TYPE_HOST) {