projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
In cases where we ask PEM_def_callback for minimum 0 length, accept 0 length
[openssl.git]
/
crypto
/
pem
/
pem_pk8.c
diff --git
a/crypto/pem/pem_pk8.c
b/crypto/pem/pem_pk8.c
index e2c0f3de1d226c88050f0c14d39b00b83ab8e03b..ebc7fadc5733db627069811c247cd629ed5192e2 100644
(file)
--- a/
crypto/pem/pem_pk8.c
+++ b/
crypto/pem/pem_pk8.c
@@
-124,7
+124,7
@@
EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
klen = cb(psbuf, PEM_BUFSIZE, 0, u);
else
klen = PEM_def_callback(psbuf, PEM_BUFSIZE, 0, u);
- if (klen <
=
0) {
+ if (klen < 0) {
PEMerr(PEM_F_D2I_PKCS8PRIVATEKEY_BIO, PEM_R_BAD_PASSWORD_READ);
X509_SIG_free(p8);
return NULL;