summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-12-27 23:02:11 +0000
committerColin Watson <cjwatson@debian.org>2019-02-28 10:35:52 +0000
commitd94226d4fcefbc398c5583e12b5d07ca33884ba4 (patch)
tree7cc84adeeb3a3ac3925953eff5fa1870078a5905
parent5e021158aa22cc64da4fca1618ee0bfd2d031049 (diff)
upstream: Request RSA-SHA2 signatures for
rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@ OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033 Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=f429c1b2ef631f2855e51a790cf71761d752bbca Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2944 Bug-Debian: https://bugs.debian.org/923419 Last-Update: 2019-02-28 Patch-Name: request-rsa-sha2-cert-signatures.patch
-rw-r--r--authfd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/authfd.c b/authfd.c
index ecdd869ab..62cbf8c19 100644
--- a/authfd.c
+++ b/authfd.c
@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl)
327static u_int 327static u_int
328agent_encode_alg(const struct sshkey *key, const char *alg) 328agent_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;