mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
ssh-agent: keygen: Fix negative numbers in RSA key
The private exponent d may be negative in which case an additional pad byte is needed. Otherwise ssh-agent fails to load the key. Signed-off-by: Konrad Gräfe <kgraefe@paktolos.net>
This commit is contained in:
parent
2086e4c7d1
commit
d2a4ccbc16
@ -65,7 +65,7 @@ namespace OpenSSHKeyGen
|
||||
BinaryStream privateStream(&privateData);
|
||||
bigIntToStream(rsaKey.get_n(), privateStream, 1);
|
||||
bigIntToStream(rsaKey.get_e(), privateStream);
|
||||
bigIntToStream(rsaKey.get_d(), privateStream);
|
||||
bigIntToStream(rsaKey.get_d(), privateStream, 1);
|
||||
bigIntToStream(rsaKey.get_c(), privateStream, 1);
|
||||
bigIntToStream(rsaKey.get_p(), privateStream, 1);
|
||||
bigIntToStream(rsaKey.get_q(), privateStream, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user