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_lib.c
diff --git
a/crypto/pem/pem_lib.c
b/crypto/pem/pem_lib.c
index 5000f268b9be580046ebb9a3cc437ce289af45b1..7c82561ba40ee53031aab3af03325a904675e1fc 100644
(file)
--- a/
crypto/pem/pem_lib.c
+++ b/
crypto/pem/pem_lib.c
@@
-430,7
+430,7
@@
int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
keylen = PEM_def_callback(buf, PEM_BUFSIZE, 0, u);
else
keylen = callback(buf, PEM_BUFSIZE, 0, u);
- if (keylen <
=
0) {
+ if (keylen < 0) {
PEMerr(PEM_F_PEM_DO_HEADER, PEM_R_BAD_PASSWORD_READ);
return 0;
}