projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f717326
)
Check that a password was actually passed, or the user will just get
author
Richard Levitte
<levitte@openssl.org>
Tue, 7 Mar 2000 22:35:27 +0000
(22:35 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Tue, 7 Mar 2000 22:35:27 +0000
(22:35 +0000)
mysterious crashes.
crypto/pkcs12/p12_key.c
patch
|
blob
|
history
diff --git
a/crypto/pkcs12/p12_key.c
b/crypto/pkcs12/p12_key.c
index 02fdd20e2fc370f5fe48b4109156d28944375387..b364671ed2264b3b8807daa67be37a7ef1640748 100644
(file)
--- a/
crypto/pkcs12/p12_key.c
+++ b/
crypto/pkcs12/p12_key.c
@@
-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);