From 886542a9b915553b3e3345a6c0f566bf1ef02143 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Fri, 2 Oct 2015 15:16:08 +0200 Subject: Do not treat 0 return value from BIO_get_fd() as error 0 is a valid file descriptor. RT#4068 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (cherry picked from commit 4428c7dba8f6f407d915c1226f4e0f673e8be241) --- apps/ocsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 926083d..6ed255d 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; } -- 1.7.12.1