Skip to content

Commit

Permalink
openssl: Use OPENSSL_IS_BORINGSSL for BoringSSL detection
Browse files Browse the repository at this point in the history
For consistency with other conditionally compiled code in openssl.c,
use OPENSSL_IS_BORINGSSL rather than HAVE_BORINGSSL and try to use
HAVE_BORINGSSL outside of openssl.c when the OpenSSL header files are
not included.
  • Loading branch information
captain-caveman2k committed Feb 11, 2015
1 parent ab85ac5 commit c1878e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/vtls/openssl.c
Expand Up @@ -1324,7 +1324,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert)
}

#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
!defined(HAVE_BORINGSSL)
!defined(OPENSSL_IS_BORINGSSL)
static CURLcode verifystatus(struct connectdata *conn,
struct ssl_connect_data *connssl)
{
Expand Down Expand Up @@ -1447,7 +1447,7 @@ static CURLcode verifystatus(struct connectdata *conn,

return result;
}
#endif /* HAVE_BORINGSSL */
#endif/

#endif /* USE_SSLEAY */

Expand Down Expand Up @@ -2062,7 +2062,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
}

#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
!defined(HAVE_BORINGSSL)
!defined(OPENSSL_IS_BORINGSSL)
if(data->set.ssl.verifystatus)
SSL_set_tlsext_status_type(connssl->handle, TLSEXT_STATUSTYPE_ocsp);
#endif
Expand Down Expand Up @@ -2751,7 +2751,7 @@ static CURLcode servercert(struct connectdata *conn,
}

#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
!defined(HAVE_BORINGSSL)
!defined(OPENSSL_IS_BORINGSSL)
if(data->set.ssl.verifystatus) {
result = verifystatus(conn, connssl);
if(result) {
Expand Down Expand Up @@ -3206,7 +3206,7 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */
bool Curl_ossl_cert_status_request(void)
{
#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
!defined(HAVE_BORINGSSL)
!defined(OPENSSL_IS_BORINGSSL)
return TRUE;
#else
return FALSE;
Expand Down

0 comments on commit c1878e8

Please sign in to comment.