]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Request RSA-SHA2 signatures for
authordjm@openbsd.org <djm@openbsd.org>
Thu, 27 Dec 2018 23:02:11 +0000 (23:02 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 27 Dec 2018 23:06:50 +0000 (10:06 +1100)
rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@

OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033

authfd.c

index cc9c6502dbc8412e60f0f7acf29d249cf44320ce..95348abfceca72e947ccfd915b40ad9e6f829223 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */
+/* $OpenBSD: authfd.c,v 1.113 2018/12/27 23:02:11 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl)
 static u_int
 agent_encode_alg(const struct sshkey *key, const char *alg)
 {
-       if (alg != NULL && key->type == KEY_RSA) {
-               if (strcmp(alg, "rsa-sha2-256") == 0)
+       if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) {
+               if (strcmp(alg, "rsa-sha2-256") == 0 ||
+                   strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0)
                        return SSH_AGENT_RSA_SHA2_256;
-               else if (strcmp(alg, "rsa-sha2-512") == 0)
+               if (strcmp(alg, "rsa-sha2-512") == 0 ||
+                   strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0)
                        return SSH_AGENT_RSA_SHA2_512;
        }
        return 0;