Skip to content

Conversation

@n13l
Copy link
Contributor

@n13l n13l commented Jan 15, 2026

Added useful SSL_CTX_get0_alpn_protos() and SSL_get0_alpn_protos().

Normally I would use size_t for length, but here I prioritize the consistency. I think I only violated that by checking for NULL parameters, which is proper for public functions. Maybe in the next small PR I'll add similar checks to the surrounding functions.

Fixes #4952

@n13l n13l marked this pull request as draft January 15, 2026 14:21
@github-actions github-actions bot added the severity: ABI change This pull request contains ABI changes label Jan 15, 2026
@n13l n13l force-pushed the feature/api_ssl_get_alpn_protos branch from e45ddba to 52baa56 Compare January 15, 2026 19:53
@n13l n13l requested review from mattcaswell and t8m January 15, 2026 19:54
@n13l n13l marked this pull request as ready for review January 15, 2026 19:54
@n13l n13l added backlog fix The issue was closed as part of the backlog reduction initiative. approval: review pending This pull request needs review by a committer labels Jan 15, 2026
@n13l n13l added branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature tests: present The PR has suitable tests present labels Jan 15, 2026
@n13l n13l moved this to Waiting Review in Development Board Jan 15, 2026
@n13l n13l self-assigned this Jan 15, 2026
@n13l n13l removed this from Development Board Jan 15, 2026
@n13l n13l requested a review from levitte January 15, 2026 20:57
@n13l n13l force-pushed the feature/api_ssl_get_alpn_protos branch from b56b8b9 to 638ed0e Compare January 15, 2026 20:58
@n13l n13l force-pushed the feature/api_ssl_get_alpn_protos branch from 9065fc7 to 523992a Compare January 15, 2026 23:39
paulidale
paulidale previously approved these changes Jan 16, 2026
SSL_CTX_get_alpn_protos() and SSL_get_alpn_protos() are used by the client to
get the list of protocols available to be negotiated. Returns a pointer to
protocol list in B<protos> with length B<protos_len>. It is not NUL-terminated.
B<protos> must not be freed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some reference to the format of the data would be helpful here (like we do in the paragraph above). E.g. "The returned list is in protocol-list format as described below". Or some similar wording.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, added.

@n13l n13l force-pushed the feature/api_ssl_get_alpn_protos branch from ffcd819 to 8e42942 Compare January 16, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: review pending This pull request needs review by a committer backlog fix The issue was closed as part of the backlog reduction initiative. branch: master Applies to master branch severity: ABI change This pull request contains ABI changes tests: present The PR has suitable tests present triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing getters for alpn_protos

3 participants