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_pkey.c
diff --git
a/crypto/pem/pem_pkey.c
b/crypto/pem/pem_pkey.c
index 8730a78913ec1a0f2f742c58e1fcff4fbee592fd..aa032d2b1cac2822738b2f54e60e4ea79d0407f9 100644
(file)
--- a/
crypto/pem/pem_pkey.c
+++ b/
crypto/pem/pem_pkey.c
@@
-60,7
+60,7
@@
EVP_PKEY *PEM_read_bio_PrivateKey(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_PEM_READ_BIO_PRIVATEKEY, PEM_R_BAD_PASSWORD_READ);
X509_SIG_free(p8);
goto err;