summaryrefslogtreecommitdiffhomepage
path: root/cli-agentfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-05-25 20:23:02 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-05-25 20:23:02 +0800
commitc917807b1c89b93b317d56ce2905b5d6d6468a11 (patch)
tree95f642a9aacc8503edc434261ad64a0fc398a01c /cli-agentfwd.c
parent701d43b8594365b55421e8bc4c53efa920c09ed5 (diff)
rsa-sha256 for ssh-agent
Diffstat (limited to 'cli-agentfwd.c')
-rw-r--r--cli-agentfwd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c
index 2821f62..00454dc 100644
--- a/cli-agentfwd.c
+++ b/cli-agentfwd.c
@@ -255,11 +255,12 @@ void cli_load_agent_keys(m_list *ret_list) {
}
void agent_buf_sign(buffer *sigblob, sign_key *key,
- const buffer *data_buf) {
+ const buffer *data_buf, enum signature_type sigtype) {
buffer *request_data = NULL;
buffer *response = NULL;
unsigned int siglen;
int packet_type;
+ int flags = 0;
/* Request format
byte SSH2_AGENTC_SIGN_REQUEST
@@ -271,7 +272,12 @@ void agent_buf_sign(buffer *sigblob, sign_key *key,
buf_put_pub_key(request_data, key, key->type);
buf_putbufstring(request_data, data_buf);
- buf_putint(request_data, 0);
+#if DROPBEAR_RSA_SHA256
+ if (sigtype == DROPBEAR_SIGNATURE_RSA_SHA256) {
+ flags |= SSH_AGENT_RSA_SHA2_256;
+ }
+#endif
+ buf_putint(request_data, flags);
response = agent_request(SSH2_AGENTC_SIGN_REQUEST, request_data);