aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2015-10-02 15:16:08 +0200
committerRichard Levitte <levitte@openssl.org>2015-10-23 19:57:53 +0200
commit51a1cc4ffc68ee72ae8330cb35318995f8611027 (patch)
treeec87415c6729822df766d995d6e32e45a290e002 /apps
parent8d43c0053b0df225f1c30b50af2aa1a0fc64b015 (diff)
downloadopenssl-51a1cc4ffc68ee72ae8330cb35318995f8611027.tar.gz
Do not treat 0 return value from BIO_get_fd() as error
0 is a valid file descriptor. RT#4068 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 4428c7dba8f6f407d915c1226f4e0f673e8be241)
Diffstat (limited to 'apps')
-rw-r--r--apps/ocsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c
index 926083dd1b..6ed255d4b5 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -1261,8 +1261,8 @@ static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, const char *path,
return NULL;
}
- if (BIO_get_fd(cbio, &fd) <= 0) {
- BIO_puts(err, "Can't get connection fd\n");
+ if (BIO_get_fd(cbio, &fd) < 0) {
+ BIO_puts(bio_err, "Can't get connection fd\n");
goto err;
}