Skip to content

Commit

Permalink
SSL: let it build against LibreSSL.
Browse files Browse the repository at this point in the history
LibreSSL developers decided that LibreSSL is OpenSSL-2.0.0, so tests
for OpenSSL-1.0.2+ are now passing, even though the library doesn't
provide functions that are expected from that version of OpenSSL.

Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Jul 30, 2014
1 parent 0dcfca0 commit 9ed633b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/event/ngx_event_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static int ngx_ssl_session_ticket_key_callback(ngx_ssl_conn_t *ssl_conn,
HMAC_CTX *hctx, int enc);
#endif

#if OPENSSL_VERSION_NUMBER < 0x10002002L
#if (OPENSSL_VERSION_NUMBER < 0x10002002L || defined LIBRESSL_VERSION_NUMBER)
static ngx_int_t ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *str);
#endif

Expand Down Expand Up @@ -2743,7 +2743,7 @@ ngx_ssl_check_host(ngx_connection_t *c, ngx_str_t *name)
return NGX_ERROR;
}

#if OPENSSL_VERSION_NUMBER >= 0x10002002L
#if (OPENSSL_VERSION_NUMBER >= 0x10002002L && !defined LIBRESSL_VERSION_NUMBER)

/* X509_check_host() is only available in OpenSSL 1.0.2+ */

Expand Down Expand Up @@ -2860,7 +2860,7 @@ ngx_ssl_check_host(ngx_connection_t *c, ngx_str_t *name)
}


#if OPENSSL_VERSION_NUMBER < 0x10002002L
#if (OPENSSL_VERSION_NUMBER < 0x10002002L || defined LIBRESSL_VERSION_NUMBER)

static ngx_int_t
ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *pattern)
Expand Down

0 comments on commit 9ed633b

Please sign in to comment.