mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Check that a password was actually passed, or the user will just get
mysterious crashes.
This commit is contained in:
parent
f71732627a
commit
3bf7ef5389
@ -104,6 +104,14 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt,
|
||||
#ifdef DEBUG_KEYGEN
|
||||
unsigned char *tmpout = out;
|
||||
int tmpn = n;
|
||||
#endif
|
||||
|
||||
if (!pass) {
|
||||
PKCS12err(PKCS12_F_PKCS12_KEY_GEN_UNI,ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_KEYGEN
|
||||
fprintf(stderr, "KEYGEN DEBUG\n");
|
||||
fprintf(stderr, "ID %d, ITER %d\n", id, iter);
|
||||
fprintf(stderr, "Password (length %d):\n", passlen);
|
||||
|
Loading…
Reference in New Issue
Block a user