Skip to content

Commit

Permalink
Switch LibreSSL code path to utilizing OpenSSL 1.1 API (pjsip#3758)
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 authored and xhit committed Dec 14, 2023
1 parent 5df7efe commit 3f7cb0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pjlib/src/pj/ssl_sock_ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ static void update_certs_info(pj_ssl_sock_t* ssock,
pj_ssl_cert_info *remote_cert_info,
pj_bool_t is_verify);

#if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
# define OPENSSL_NO_SSL2 /* seems to be removed in 1.1.0 */
# if !USING_LIBRESSL
# define M_ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
# define M_ASN1_STRING_length(x) ASN1_STRING_length(x)
# endif
# if defined(OPENSSL_API_COMPAT) && OPENSSL_API_COMPAT >= 0x10100000L || \
defined(OPENSSL_NO_DEPRECATED)

Expand All @@ -179,7 +181,7 @@ static void update_certs_info(pj_ssl_sock_t* ssock,
# endif

# endif
#elif !USING_LIBRESSL
#else
# define SSL_CIPHER_get_id(c) (c)->id
# define SSL_set_session(ssl, s) (ssl)->session = (s)
# define X509_STORE_CTX_get0_cert(ctx) ((ctx)->cert)
Expand Down

0 comments on commit 3f7cb0e

Please sign in to comment.