Author: brane Date: Thu Dec 15 23:13:12 2016 New Revision: 1774537 URL: http://svn.apache.org/viewvc?rev=1774537&view=rev Log: 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 Modified: serf/branches/ocsp-verification/buckets/ssl_buckets.c Modified: serf/branches/ocsp-verification/buckets/ssl_buckets.c URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/ssl_buckets.c?rev=1774537&r1=1774536&r2=1774537&view=diff ============================================================================== --- serf/branches/ocsp-verification/buckets/ssl_buckets.c (original) +++ serf/branches/ocsp-verification/buckets/ssl_buckets.c Thu Dec 15 23:13:12 2016 @@ -2621,8 +2621,8 @@ const serf_bucket_type_t serf_bucket_typ * 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 @@ struct serf_ssl_ocsp_request_t { /* 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 @@ serf_ssl_ocsp_request_t *serf_ssl_ocsp_r #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,