Skip to content

Commit 817f657

Browse files
committed
- fix deprecation warning (make CI happy)
1 parent c4fdd78 commit 817f657

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

source/ssl_poll_perf.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2981,10 +2981,17 @@ create_client_pe(SSL_CTX *ctx, struct client_stats *cs)
29812981
goto fail;
29822982
}
29832983

2984+
#if OPENSSL_VERSION_NUMBER >= 0x40000000L
2985+
if (SSL_set1_dnsname(qconn, hostname) == 0) {
2986+
DPRINTFC(stderr, "%s SSL_set1_dnsname() failed\n", __func__);
2987+
goto fail;
2988+
}
2989+
#else
29842990
if (SSL_set1_host(qconn, hostname) == 0) {
29852991
DPRINTFC(stderr, "%s SSL_set1_host() failed\n", __func__);
29862992
goto fail;
29872993
}
2994+
#endif
29882995

29892996
/* SSL_set_alpn_protos returns 0 for success! */
29902997
switch (alpn) {

0 commit comments

Comments
 (0)