Changeset 6725:9b9ae81cd4f0 in nginx


Ignore:
Timestamp:
10/04/16 14:26:45 (3 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

SSL: use X509_check_host() with LibreSSL.

Explicit checks for OPENSSL_VERSION_NUMBER replaced with checks
for X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT, thus allowing X509_check_host()
to be used with other libraries. In particular, X509_check_host() was
introduced in LibreSSL 2.5.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/event/ngx_event_openssl.c

    r6699 r6725  
    5656#endif
    5757
    58 #if OPENSSL_VERSION_NUMBER < 0x10002002L
     58#ifndef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
    5959static ngx_int_t ngx_ssl_check_name(ngx_str_t *name, ASN1_STRING *str);
    6060#endif
     
    30933093    }
    30943094
    3095 #if OPENSSL_VERSION_NUMBER >= 0x10002002L
     3095#ifdef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
    30963096
    30973097    /* X509_check_host() is only available in OpenSSL 1.0.2+ */
     
    32103210
    32113211
    3212 #if OPENSSL_VERSION_NUMBER < 0x10002002L
     3212#ifndef X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
    32133213
    32143214static ngx_int_t
Note: See TracChangeset for help on using the changeset viewer.