Skip to content

Missing getters for alpn_protos #4952

@tiran

Description

@tiran

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;
}

Metadata

Metadata

Assignees

Labels

backlog fixThe issue was closed as part of the backlog reduction initiative.branch: masterApplies to master branchhelp wantedtriaged: featureThe issue/pr requests/adds a feature

Type

No type

Projects

Status

Waiting Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions