upstream: some finesse to fix RSA-SHA2 certificate authentication
for certs hosted in ssh-agent
OpenBSD-Commit-ID: e5fd5edd726137dda2d020e1cdebc464110a010f
diff --git a/sshkey.c b/sshkey.c
index 455cf3d..72c08c7 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.65 2018/07/03 11:39:54 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.66 2018/07/03 13:20:25 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -2244,8 +2244,8 @@
/*
* Returns the expected signature algorithm for a given public key algorithm.
*/
-static const char *
-sigalg_by_name(const char *name)
+const char *
+sshkey_sigalg_by_name(const char *name)
{
const struct keytype *kt;
@@ -2276,7 +2276,7 @@
if (requested_alg == NULL)
return 0;
- if ((expected_alg = sigalg_by_name(requested_alg)) == NULL)
+ if ((expected_alg = sshkey_sigalg_by_name(requested_alg)) == NULL)
return SSH_ERR_INVALID_ARGUMENT;
if ((r = get_sigtype(sig, siglen, &sigtype)) != 0)
return r;