Skip to content

Commit

Permalink
Merge pull request #171 from chiouss/master
Browse files Browse the repository at this point in the history
Improve OpenSSL API compatibility
  • Loading branch information
jedisct1 authored Sep 30, 2023
2 parents 7728ce4 + b9722a6 commit 7ba4502
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static SSL_TICKET_RETURN session_ticket_cb(SSL *tls_ctx,
}
#endif

#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
static int tls_init_ecdh_curve(void)
{
#ifdef SSL_CTRL_SET_ECDH_AUTO
Expand Down Expand Up @@ -186,6 +187,7 @@ static int tls_init_ecdh_curve(void)
# endif
#endif
}
#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) */

#ifndef SSL_CTRL_SET_DH_AUTO
static int tls_load_dhparams_default(void)
Expand Down Expand Up @@ -414,7 +416,9 @@ static int tls_create_new_context(const char *cert_file,
if (ssl_verify_client_cert) {
tls_init_client_cert_verification(cert_file);
}
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
tls_init_ecdh_curve();
#endif
tls_init_dhparams();

return 0;
Expand Down

0 comments on commit 7ba4502

Please sign in to comment.