summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_openssl.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2018-10-22 16:16:05 +0300
committerSergey Kandaurov <pluknet@nginx.com>2018-10-22 16:16:05 +0300
commit161e1839a5e3d9d906c047c2464a239a632d42c2 (patch)
treecce12717c6761c513f8905f8badc23a567362433 /src/nxt_openssl.c
parent3061e8333db784619d982b618c9792ec8da36e3a (diff)
downloadunit-161e1839a5e3d9d906c047c2464a239a632d42c2.tar.gz
unit-161e1839a5e3d9d906c047c2464a239a632d42c2.tar.bz2
Compatibility with LibreSSL.
LibreSSL uses high OPENSSL_VERSION_NUMBER, but has no SSL_CTX_add0_chain_cert().
Diffstat (limited to 'src/nxt_openssl.c')
-rw-r--r--src/nxt_openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_openssl.c b/src/nxt_openssl.c
index 91ba3cb0..441da54b 100644
--- a/src/nxt_openssl.c
+++ b/src/nxt_openssl.c
@@ -404,7 +404,7 @@ nxt_openssl_chain_file(SSL_CTX *ctx, nxt_fd_t fd)
* while the main certificate needs a X509_free() call, since
* its reference count is increased by SSL_CTX_use_certificate().
*/
-#if OPENSSL_VERSION_NUMBER > 0x10002000L
+#ifdef SSL_CTX_add0_chain_cert
if (SSL_CTX_add0_chain_cert(ctx, ca) != 1) {
#else
if (SSL_CTX_add_extra_chain_cert(ctx, ca) != 1) {