1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Factor out get_rsa_ssh1_priv_agent from Pageant.

The code that reads an SSH1_AGENTC_ADD_RSA_IDENTITY message and parses
an RSA private key out of it now does it by calling a BinarySource
function in sshrsa.c, instead of doing inline in the Pageant message
handler. This has no functional change, except that now I can expose
that separate function in the testcrypt API, where it provides me with
a mechanism for creating a bare RSAKey structure for purposes of
testing RSA key exchange.
This commit is contained in:
Simon Tatham
2019-12-15 20:12:36 +00:00
parent 7dd0351254
commit 873ec97302
5 changed files with 26 additions and 14 deletions

1
ssh.h
View File

@ -539,6 +539,7 @@ void BinarySource_get_rsa_ssh1_pub(
BinarySource *src, RSAKey *result, RsaSsh1Order order);
void BinarySource_get_rsa_ssh1_priv(
BinarySource *src, RSAKey *rsa);
RSAKey *BinarySource_get_rsa_ssh1_priv_agent(BinarySource *src);
bool rsa_ssh1_encrypt(unsigned char *data, int length, RSAKey *key);
mp_int *rsa_ssh1_decrypt(mp_int *input, RSAKey *key);
bool rsa_ssh1_decrypt_pkcs1(mp_int *input, RSAKey *key, strbuf *outbuf);