]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: sshkey_cert_check_authority requires reason to be set;
authormarkus@openbsd.org <markus@openbsd.org>
Fri, 6 Mar 2020 18:23:17 +0000 (18:23 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 13 Mar 2020 02:18:09 +0000 (13:18 +1100)
ok djm

OpenBSD-Commit-ID: 6f7a6f19540ed5749763c2f9530c0897c94aa552

sshkey.c

index de57c2ad43c2ca95522e87e5572b12d6ca2b5efa..6eba16ecf3af8d6a2e2f6dd5e6b0d171ca6a3543 100644 (file)
--- a/sshkey.c
+++ b/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.
@@ -3078,8 +3078,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) {