]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Request RSA-SHA2 signatures for V_7_9 124/head anongit/V_7_9 github-selfhosted/V_7_9 github/V_7_9
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:12:53 +0000 (10:12 +1100)
rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@

OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033

authfd.c

index ecdd869abf01b10b8f2fb0254d4aafb66420fe12..62cbf8c1996e7e0470ee9a17619af005267f85d4 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -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;