From 692238cc5f19507c63e61b269960581b0c6157bf Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 24 Mar 2019 14:05:35 +0000 Subject: [PATCH] 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. --- cmdgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmdgen.c b/cmdgen.c index a2f03df7..47795cfe 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -940,6 +940,7 @@ int main(int argc, char **argv) int real_outtype; case PRIVATE: + random_ref(); /* we'll need a few random bytes in the save file */ if (sshver == 1) { assert(ssh1key); ret = rsa_ssh1_savekey(outfilename, ssh1key, new_passphrase);