- Further fix for #468: detect SSL_CTX_set_alpn_protos for build with

OpenSSL 1.0.1.
This commit is contained in:
W.C.A. Wijngaards
2021-04-22 09:05:43 +02:00
parent 25425d9aa7
commit a45a7efe69
5 changed files with 9 additions and 2 deletions
+2
View File
@@ -501,7 +501,9 @@ run(struct http2_session* h2_session, int port, int no_tls, int count, char** q)
if(!no_tls) {
ctx = connect_sslctx_create(NULL, NULL, NULL, 0);
if(!ctx) fatal_exit("cannot create ssl ctx");
#ifdef HAVE_SSL_CTX_SET_ALPN_PROTOS
SSL_CTX_set_alpn_protos(ctx, (const unsigned char *)"\x02h2", 3);
#endif
ssl = outgoing_ssl_fd(ctx, fd);
if(!ssl) {
printf("cannot create ssl\n");