diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-06-14 03:51:47 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-06-14 13:52:48 +1000 |
commit | 2317ce4b0ed7d8c4b0c684e2d47bff5006bd1178 (patch) | |
tree | cc9841e512ea064e5f66e241af72fba613014d67 /ssh-agent.c | |
parent | c95b90d40170473825904be561b1eafba354f376 (diff) |
upstream: process agent requests for RSA certificate private keys using
correct signature algorithm when requested. Patch from Jakub Jelen in bz3016
ok dtucker markus
OpenBSD-Commit-ID: 61f86efbeb4a1857a3e91298c1ccc6cf49b79624
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 034f31387..4669b679c 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.234 2019/06/06 05:13:13 otto Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.235 2019/06/14 03:51:47 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -269,6 +269,11 @@ agent_decode_alg(struct sshkey *key, u_int flags) | |||
269 | return "rsa-sha2-256"; | 269 | return "rsa-sha2-256"; |
270 | else if (flags & SSH_AGENT_RSA_SHA2_512) | 270 | else if (flags & SSH_AGENT_RSA_SHA2_512) |
271 | return "rsa-sha2-512"; | 271 | return "rsa-sha2-512"; |
272 | } else if (key->type == KEY_RSA_CERT) { | ||
273 | if (flags & SSH_AGENT_RSA_SHA2_256) | ||
274 | return "rsa-sha2-256-cert-v01@openssh.com"; | ||
275 | else if (flags & SSH_AGENT_RSA_SHA2_512) | ||
276 | return "rsa-sha2-512-cert-v01@openssh.com"; | ||
272 | } | 277 | } |
273 | return NULL; | 278 | return NULL; |
274 | } | 279 | } |