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:
Simon Tatham 2019-03-24 14:05:35 +00:00
Родитель 6cae94be7e
Коммит 692238cc5f
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);