Skip to content

Commit

Permalink
OCSP stapling: disabled when build with BoringSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Jan 22, 2015
1 parent d1cf5d5 commit 23c6f0a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/vtls/openssl.c
Expand Up @@ -64,7 +64,9 @@
#include <openssl/md5.h>
#include <openssl/conf.h>
#include <openssl/bn.h>
#ifndef HAVE_BORINGSSL
#include <openssl/ocsp.h>
#endif
#else
#include <rand.h>
#include <x509v3.h>
Expand Down Expand Up @@ -1321,6 +1323,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert)
return result;
}

#ifndef HAVE_BORINGSSL
static CURLcode verifystatus(struct connectdata *conn,
struct ssl_connect_data *connssl)
{
Expand Down Expand Up @@ -1443,6 +1446,7 @@ static CURLcode verifystatus(struct connectdata *conn,

return result;
}
#endif /* HAVE_BORINGSSL */

#endif /* USE_SSLEAY */

Expand Down Expand Up @@ -2056,8 +2060,10 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
return CURLE_OUT_OF_MEMORY;
}

#ifndef HAVE_BORINGSSL
if(data->set.ssl.verifystatus)
SSL_set_tlsext_status_type(connssl->handle, TLSEXT_STATUSTYPE_ocsp);
#endif

SSL_set_connect_state(connssl->handle);

Expand Down Expand Up @@ -2742,6 +2748,7 @@ static CURLcode servercert(struct connectdata *conn,
infof(data, "\t SSL certificate verify ok.\n");
}

#ifndef HAVE_BORINGSSL
if(data->set.ssl.verifystatus) {
result = verifystatus(conn, connssl);
if(result) {
Expand All @@ -2750,6 +2757,7 @@ static CURLcode servercert(struct connectdata *conn,
return result;
}
}
#endif

if(!strict)
/* when not strict, we don't bother about the verify cert problems */
Expand Down

0 comments on commit 23c6f0a

Please sign in to comment.