version 1.207, 2015/12/02 08:30:50 |
version 1.208, 2015/12/04 16:41:28 |
|
|
} |
} |
#endif |
#endif |
|
|
|
static char * |
|
agent_decode_alg(struct sshkey *key, u_int flags) |
|
{ |
|
if (key->type == KEY_RSA) { |
|
if (flags & SSH_AGENT_RSA_SHA2_256) |
|
return "rsa-sha2-256"; |
|
else if (flags & SSH_AGENT_RSA_SHA2_512) |
|
return "rsa-sha2-512"; |
|
} |
|
return NULL; |
|
} |
|
|
/* ssh2 only */ |
/* ssh2 only */ |
static void |
static void |
process_sign_request2(SocketEntry *e) |
process_sign_request2(SocketEntry *e) |
|
|
goto send; |
goto send; |
} |
} |
if ((r = sshkey_sign(id->key, &signature, &slen, |
if ((r = sshkey_sign(id->key, &signature, &slen, |
data, dlen, compat)) != 0) { |
data, dlen, agent_decode_alg(key, flags), compat)) != 0) { |
error("%s: sshkey_sign: %s", __func__, ssh_err(ok)); |
error("%s: sshkey_sign: %s", __func__, ssh_err(ok)); |
goto send; |
goto send; |
} |
} |