upstream: fix bogus warning when signing cert keys using agent;

from djm; ok deraadt dtucker

OpenBSD-Commit-ID: 12e50836ba2040042383a8b71e12d7ea06e9633d
This commit is contained in:
markus@openbsd.org 2018-03-24 19:28:43 +00:00 committed by Darren Tucker
parent 393436024d
commit 9efcaaac31
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect2.c,v 1.269 2018/03/03 03:01:50 djm Exp $ */
/* $OpenBSD: sshconnect2.c,v 1.270 2018/03/24 19:28:43 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@ -1014,6 +1014,8 @@ check_sigtype(const struct sshkey *key, const u_char *sig, size_t len)
char *sigtype = NULL;
const char *alg = key_sign_encode(key);
if (sshkey_is_cert(key))
return 0;
if ((r = sshkey_sigtype(sig, len, &sigtype)) != 0)
return r;
if (strcmp(sigtype, alg) != 0) {