Remove use of OCSP_F_OCSP_SENDREQ_BIO for OpenSSL
1.1.0. It is no longer available there and the generated
error message is questionable anyhow.
Fix comment typo.
Add comment about possibly missing error handling.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/native/trunk@1749175 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index e5bcf7a..4182fb8 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -771,7 +771,9 @@
BIO_write(mem, buf, len); /* write the buffer to the bio */
if (BIO_gets(mem, tmpbuf, 512) <= 0) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
OCSPerr(OCSP_F_OCSP_SENDREQ_BIO,OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
+#endif
goto err;
}
/* Parse the HTTP response. This will look like this:
@@ -828,12 +830,13 @@
goto err;
}
err:
+ /* XXX No error logging? */
BIO_free(mem);
return resp;
}
-/* Reads the respnse from the APR socket to a buffer, and parses the buffer to
+/* Reads the response from the APR socket to a buffer, and parses the buffer to
return the OCSP response */
#define ADDLEN 512
static OCSP_RESPONSE *ocsp_get_resp(apr_socket_t *sock)