diff options
Diffstat (limited to 'apps/enc.c')
-rw-r--r-- | apps/enc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c index e584241bf1..ca30276d29 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -448,7 +448,11 @@ bad: "invalid hex salt value\n"); goto end; } - } else RAND_bytes(salt, PKCS5_SALT_LEN); + } else if (RAND_bytes(salt, PKCS5_SALT_LEN) <= 0) { + BIO_printf(bio_err, + "prng not seeded\n"); + goto end; + } /* If -P option then don't bother writing */ if((printkey != 2) && (BIO_write(wbio,magic, |