Skip to content

Commit

Permalink
examples/client: Enable ALPN
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Oct 17, 2021
1 parent 65d3c90 commit 15a8d91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ static void init_ssl_ctx(SSL_CTX *ssl_ctx) {
#ifndef OPENSSL_NO_NEXTPROTONEG
SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, NULL);
#endif /* !OPENSSL_NO_NEXTPROTONEG */

#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CTX_set_alpn_protos(ssl_ctx, (const unsigned char *)"\x02h2", 3);
#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
}

static void ssl_handshake(SSL *ssl, int fd) {
Expand Down

0 comments on commit 15a8d91

Please sign in to comment.