Skip to content

Commit

Permalink
Switch LibreSSL code path to utilizing OpenSSL 1.1 API
Browse files Browse the repository at this point in the history
Not worrying about version checks as these API additions date back to
LibreSSL 2.7 from almost 6 years ago.
  • Loading branch information
brad0 committed Dec 10, 2023
1 parent b3e5f76 commit 9d876ff
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 9d876ff

Please sign in to comment.