On the ocsp-verification branch: Instead of conditionally defining
empty structs, which is somewhat invalid in traditional C, just don't
define them at all; the APIs deal with pointers, so the forward
declarations will do well enough.
* buckets/ssl_buckets.c
(serf_ssl_ocsp_request_t, serf_ssl_ocsp_response_t):
Do not define these structures when OPENSSL_NO_OCSP is defined.
Found by: zhakov
git-svn-id: https://svn.apache.org/repos/asf/serf/branches/ocsp-verification@1774537 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/buckets/ssl_buckets.c b/buckets/ssl_buckets.c
index 916cb50..4075380 100644
--- a/buckets/ssl_buckets.c
+++ b/buckets/ssl_buckets.c
@@ -2621,8 +2621,8 @@
* defined in this file.
*/
-struct serf_ssl_ocsp_request_t {
#ifndef OPENSSL_NO_OCSP
+struct serf_ssl_ocsp_request_t {
/* OpenSSL's internal representation of the OCSP request. */
OCSP_REQUEST *request;
@@ -2633,11 +2633,8 @@
/* Exported server and issuer certificates. */
const char *encoded_server_cert;
const char *encoded_issuer_cert;
-#endif /* OPENSSL_NO_OCSP */
};
-
-#ifndef OPENSSL_NO_OCSP
static apr_status_t free_ocsp_request(void *data)
{
OCSP_REQUEST_free(data);
@@ -2837,12 +2834,12 @@
#endif /* OPENSSL_NO_OCSP */
}
-struct serf_ssl_ocsp_response_t {
#ifndef OPENSSL_NO_OCSP
+struct serf_ssl_ocsp_response_t {
/* OpenSSL's internal representation of the OCSP response. */
OCSP_BASICRESP *response;
-#endif /* OPENSSL_NO_OCSP */
};
+#endif /* OPENSSL_NO_OCSP */
serf_ssl_ocsp_response_t *serf_ssl_ocsp_response_parse(
const void *ocsp_response_body,