OpenSSL 1.1.0 has no getter to retrieve alpn_client_proto_list from SSL* and SSL_CTX*. Getters would be useful for introspection of context or SSL connection, see https://bugs.python.org/issue32359
I can create a PR after we have decided how the API should look like. Would you prefer:
unsigned SSL_CTX_get_alpn_protos(SSL_CTX *ctx, const unsigned char **protos)
{
*protos = ctx->alpn_client_proto_list;
return ctx->alpn_client_proto_list_len;
}
or
int SSL_CTX_get_alpn_protos(SSL_CTX *ctx, const unsigned char **protos, unsigned *protos_len)
{
*protos = ctx->alpn_client_proto_list;
*protos_len = ctx->alpn_client_proto_list_len;
return 0;
}