vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
Jakub Jelen 50e2b6
From 2317ce4b0ed7d8c4b0c684e2d47bff5006bd1178 Mon Sep 17 00:00:00 2001
Jakub Jelen 50e2b6
From: "djm@openbsd.org" <djm@openbsd.org>
Jakub Jelen 50e2b6
Date: Fri, 14 Jun 2019 03:51:47 +0000
Jakub Jelen 50e2b6
Subject: [PATCH] upstream: process agent requests for RSA certificate private
Jakub Jelen 50e2b6
 keys using
Jakub Jelen 50e2b6
Jakub Jelen 50e2b6
correct signature algorithm when requested. Patch from Jakub Jelen in bz3016
Jakub Jelen 50e2b6
ok dtucker markus
Jakub Jelen 50e2b6
Jakub Jelen 50e2b6
OpenBSD-Commit-ID: 61f86efbeb4a1857a3e91298c1ccc6cf49b79624
Jakub Jelen 50e2b6
---
Jakub Jelen 50e2b6
 ssh-agent.c | 7 ++++++-
Jakub Jelen 50e2b6
 1 file changed, 6 insertions(+), 1 deletion(-)
Jakub Jelen 50e2b6
Jakub Jelen 50e2b6
diff --git a/ssh-agent.c b/ssh-agent.c
Jakub Jelen 50e2b6
index 034f31387..4669b679c 100644
Jakub Jelen 50e2b6
--- a/ssh-agent.c
Jakub Jelen 50e2b6
+++ b/ssh-agent.c
Jakub Jelen 50e2b6
@@ -269,6 +269,11 @@ agent_decode_alg(struct sshkey *key, u_int flags)
Jakub Jelen 50e2b6
 			return "rsa-sha2-256";
Jakub Jelen 50e2b6
 		else if (flags & SSH_AGENT_RSA_SHA2_512)
Jakub Jelen 50e2b6
 			return "rsa-sha2-512";
Jakub Jelen 50e2b6
+	} else if (key->type == KEY_RSA_CERT) {
Jakub Jelen 50e2b6
+		if (flags & SSH_AGENT_RSA_SHA2_256)
Jakub Jelen 50e2b6
+			return "rsa-sha2-256-cert-v01@openssh.com";
Jakub Jelen 50e2b6
+		else if (flags & SSH_AGENT_RSA_SHA2_512)
Jakub Jelen 50e2b6
+			return "rsa-sha2-512-cert-v01@openssh.com";
Jakub Jelen 50e2b6
 	}
Jakub Jelen 50e2b6
 	return NULL;
Jakub Jelen 50e2b6
 }
Jakub Jelen 50e2b6