mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
cgtest: call random_ref() before saving private keys.
The save functions do need some random data (for padding encrypted blocks), so we must ensure a PRNG is available to generate that data.
This commit is contained in:
parent
6cae94be7e
commit
692238cc5f
1
cmdgen.c
1
cmdgen.c
@ -940,6 +940,7 @@ int main(int argc, char **argv)
|
|||||||
int real_outtype;
|
int real_outtype;
|
||||||
|
|
||||||
case PRIVATE:
|
case PRIVATE:
|
||||||
|
random_ref(); /* we'll need a few random bytes in the save file */
|
||||||
if (sshver == 1) {
|
if (sshver == 1) {
|
||||||
assert(ssh1key);
|
assert(ssh1key);
|
||||||
ret = rsa_ssh1_savekey(outfilename, ssh1key, new_passphrase);
|
ret = rsa_ssh1_savekey(outfilename, ssh1key, new_passphrase);
|
||||||
|
Loading…
Reference in New Issue
Block a user