diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-09-29 15:20:31 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-09-29 15:26:16 +0100 |
commit | 012dd02e8436a8451afc4a8f69e128e257566c80 (patch) | |
tree | 2f01d68e66fd95a9078cb55b8d7505c862d2441a /src | |
parent | 5b2fd993eadb7b476e5ef14028c7db09fda6c3ae (diff) |
OpenSSL: fix build on earlier library versions
Diffstat (limited to 'src')
-rw-r--r-- | src/src/tls-openssl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index 057a0e006..d165eb2c0 100644 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@ -74,6 +74,7 @@ change this guard and punt the issue for a while longer. */ # define EXIM_HAVE_OPENSSL_CIPHER_GET_ID # define EXIM_HAVE_SESSION_TICKET # define EXIM_HAVE_OPESSL_TRACE +# define EXIM_HAVE_OPESSL_GET0_SERIAL # else # define EXIM_NEED_OPENSSL_INIT # endif @@ -1714,6 +1715,7 @@ tls_in.ocsp = OCSP_NOT_RESP; if (!olist) return SSL_TLSEXT_ERR_NOACK; +#ifdef EXIM_HAVE_OPESSL_GET0_SERIAL { const X509 * cert_sent = SSL_get_certificate(s); const ASN1_INTEGER * cert_serial = X509_get0_serialNumber(cert_sent); @@ -1761,6 +1763,13 @@ if (!olist) return SSL_TLSEXT_ERR_NOACK; } } +#else +if (olist->next) + { + DEBUG(D_tls) debug_printf("OpenSSL version too early to support multi-leaf OCSP\n"); + return SSL_TLSEXT_ERR_NOACK; + } +#endif /*XXX could we do the i2d earlier, rather than during the callback? */ response_der = NULL; |