- Fix #1091: Build fails with OpenSSL >= 3.0 built with

OPENSSL_NO_DEPRECATED.
This commit is contained in:
W.C.A. Wijngaards
2024-06-17 12:28:45 +02:00
parent 9603924bb4
commit 08050dc939
11 changed files with 78 additions and 7 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ setup_ctx(char* key, char* cert)
#if HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
if (!SSL_CTX_set_ecdh_auto(ctx,1))
if(verb>=1) printf("failed to set_ecdh_auto, not enabling ECDHE\n");
#elif defined(USE_ECDSA)
#elif defined(USE_ECDSA) && defined(HAVE_SSL_CTX_SET_TMP_ECDH)
if(1) {
EC_KEY *ecdh = EC_KEY_new_by_curve_name (NID_X9_62_prime256v1);
if (!ecdh) {
+4
View File
@@ -471,7 +471,11 @@ send_em(const char* svr, const char* pp2_client, int udp, int usessl,
}
}
if(1) {
#ifdef HAVE_SSL_GET1_PEER_CERTIFICATE
X509* x = SSL_get1_peer_certificate(ssl);
#else
X509* x = SSL_get_peer_certificate(ssl);
#endif
if(!x) printf("SSL: no peer certificate\n");
else {
X509_print_fp(stdout, x);