Skip to content

fix(tls): fix encoding error when multiple ALPS extensions are present - #861

Merged
0x676e67 merged 6 commits into
mainfrom
fix
Aug 2, 2025
Merged

fix(tls): fix encoding error when multiple ALPS extensions are present#861
0x676e67 merged 6 commits into
mainfrom
fix

Conversation

@0x676e67

@0x676e67 0x676e67 commented Aug 2, 2025

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an encoding issue with TLS ALPS (Application-Layer Protocol Settings) extensions when multiple protocols are present. The fix changes from concatenating all ALPS protocol values into a single byte sequence to properly handling each protocol individually through separate calls to the underlying TLS library.

Key changes:

  • Removes the encode_sequence method that was incorrectly concatenating ALPS protocol values
  • Adds individual handling of each ALPS protocol through separate add_application_settings calls
  • Refactors the API to pass protocol collections directly rather than pre-encoded byte sequences

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/tls/types.rs Removes encode_sequence method and adds value() accessor for individual protocol values
src/tls/conn/mod.rs Updates method calls to use new ALPS and ALPN protocol handling APIs
src/tls/conn/ext.rs Implements proper individual handling of ALPS protocols and adds ALPN protocol handling

Comment thread src/tls/conn/ext.rs Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@0x676e67
0x676e67 marked this pull request as ready for review August 2, 2025 13:35
@0x676e67
0x676e67 merged commit 6ce6c73 into main Aug 2, 2025
7 checks passed
@0x676e67
0x676e67 deleted the fix branch August 2, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants