projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Portability patch for HP MPE/iX. Submitted by Mark Bixby <mark_bixby@hp.com>
[oweals/openssl.git]
/
crypto
/
evp
/
p5_crpt.c
diff --git
a/crypto/evp/p5_crpt.c
b/crypto/evp/p5_crpt.c
index e3dae52d4deaf10485f15f54aa0c318ae52ba72f..6bfa2c5acb1729bacb1e858ac2cc057098911c44 100644
(file)
--- a/
crypto/evp/p5_crpt.c
+++ b/
crypto/evp/p5_crpt.c
@@
-125,6
+125,9
@@
int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
salt = pbe->salt->data;
saltlen = pbe->salt->length;
+ if(!pass) passlen = 0;
+ else if(passlen == -1) passlen = strlen(pass);
+
EVP_DigestInit (&ctx, md);
EVP_DigestUpdate (&ctx, pass, passlen);
EVP_DigestUpdate (&ctx, salt, saltlen);