'passwd' tool.
[openssl.git] / apps / enc.c
index ca30276d29d05a168ca5d7789b8cff0026505451..0beb6377d7a873699cde067f85d01c326fa69a76 100644 (file)
@@ -245,7 +245,7 @@ bad:
                        BIO_printf(bio_err,"rc2     :128 bit key RC2 encryption\n");
 #endif
 #ifndef NO_BF
-                       BIO_printf(bio_err,"bf      :128 bit key BlowFish encryption\n");
+                       BIO_printf(bio_err,"bf      :128 bit key Blowfish encryption\n");
 #endif
 #ifndef NO_RC4
                        BIO_printf(bio_err," -%-5s :128 bit key RC4 encryption\n",
@@ -448,11 +448,8 @@ bad:
                                                                "invalid hex salt value\n");
                                                        goto end;
                                                }
-                                       } else if (RAND_bytes(salt, PKCS5_SALT_LEN) <= 0) {
-                                               BIO_printf(bio_err,
-                                                       "prng not seeded\n");
+                                       } else if (RAND_pseudo_bytes(salt, PKCS5_SALT_LEN) < 0)
                                                goto end;
-                                       }
                                        /* If -P option then don't bother writing */
                                        if((printkey != 2)
                                           && (BIO_write(wbio,magic,
@@ -567,6 +564,7 @@ bad:
                BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out));
                }
 end:
+       ERR_print_errors(bio_err);
        if (strbuf != NULL) Free(strbuf);
        if (buff != NULL) Free(buff);
        if (in != NULL) BIO_free(in);