diff options
author | Colin Watson <cjwatson@debian.org> | 2019-02-28 10:37:30 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-02-28 10:37:50 +0000 |
commit | 4418a1e80ce0dcc010b4a6efa9ae6056fce99f8c (patch) | |
tree | 137c9d64fa8750ad13ba239472a1829bd1b240e1 /authfd.c | |
parent | e321545f23ce308bc12d28d6975f75bdc8b7061e (diff) | |
parent | d94226d4fcefbc398c5583e12b5d07ca33884ba4 (diff) |
Request RSA-SHA2 signatures for corresponding cert algorithms
Closes: #923419
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl) | |||
327 | static u_int | 327 | static u_int |
328 | agent_encode_alg(const struct sshkey *key, const char *alg) | 328 | agent_encode_alg(const struct sshkey *key, const char *alg) |
329 | { | 329 | { |
330 | if (alg != NULL && key->type == KEY_RSA) { | 330 | if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) { |
331 | if (strcmp(alg, "rsa-sha2-256") == 0) | 331 | if (strcmp(alg, "rsa-sha2-256") == 0 || |
332 | strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0) | ||
332 | return SSH_AGENT_RSA_SHA2_256; | 333 | return SSH_AGENT_RSA_SHA2_256; |
333 | else if (strcmp(alg, "rsa-sha2-512") == 0) | 334 | if (strcmp(alg, "rsa-sha2-512") == 0 || |
335 | strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0) | ||
334 | return SSH_AGENT_RSA_SHA2_512; | 336 | return SSH_AGENT_RSA_SHA2_512; |
335 | } | 337 | } |
336 | return 0; | 338 | return 0; |