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 4428c7dba8)
This commit is contained in:
Alessandro Ghedini 2015-10-02 15:16:08 +02:00 committed by Richard Levitte
parent 2d404dc380
commit 6a3dd58678

View file

@ -1220,8 +1220,8 @@ static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, char *path,
return NULL; return NULL;
} }
if (BIO_get_fd(cbio, &fd) <= 0) { if (BIO_get_fd(cbio, &fd) < 0) {
BIO_puts(err, "Can't get connection fd\n"); BIO_puts(bio_err, "Can't get connection fd\n");
goto err; goto err;
} }