Skip to content

Comments

[Cleaner Version] Support for Certificate Compression Algorithm extension in Certificate Request Message#348

Merged
mingyech merged 3 commits intorefraction-networking:masterfrom
Juktong:fix/cleaned-cert-req-compress-ext
Jun 21, 2025
Merged

[Cleaner Version] Support for Certificate Compression Algorithm extension in Certificate Request Message#348
mingyech merged 3 commits intorefraction-networking:masterfrom
Juktong:fix/cleaned-cert-req-compress-ext

Conversation

@Juktong
Copy link
Contributor

@Juktong Juktong commented Jun 1, 2025

Intended to do the same functionality as my previous pr #347 but for a cleaner commit history. Hence the following description is copied from previous pr.


This version introduces a new CertCompressionAlgo implementation for certificateRequestMsgTLS13 in handshake_messages.go, addressing issue #345.

The change resolves the error: 'tls: invalid signature by the server certificate: crypto/rsa: verification error'
which occurs when connecting to servers that include a certificate compression algorithm extension in the CertificateRequest message during the TLS 1.3 handshake.

@BRUHItsABunny — would you mind testing this on your end to confirm the fix works as expected?

@BRUHItsABunny
Copy link
Contributor

I have tested this and it works on my end!

Copy link
Member

@mingyech mingyech left a comment

Choose a reason for hiding this comment

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

Thank you for contributing! It looks good to me, just have a few nit picks.

}

type certificateRequestMsgTLS13 struct {
original []byte
Copy link
Member

Choose a reason for hiding this comment

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

In non u_* files let's comment changes to distinguish between utls and stdlib code, it makes it easier when merging with upstream. See here and here

Copy link
Member

Choose a reason for hiding this comment

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

untrack this?

scts bool
supportedSignatureAlgorithms []SignatureScheme
supportedSignatureAlgorithmsCert []SignatureScheme
certRequestCompressionAlgs []CertCompressionAlgo
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you also have your second approach of fixing this from #345 (comment) in here as well with the original and originalBytes(), could we remove the first approach if it works without it? It's a good reference in case we need to actually implement this in the future but I think your new approach is better.

@Juktong
Copy link
Contributor Author

Juktong commented Jun 21, 2025

Thank you for your review! Good ideas! I am keeping only the second approach using original bytes and solve the testing problem in the most recent commit.

@mingyech mingyech force-pushed the fix/cleaned-cert-req-compress-ext branch from aebc85a to 5abccec Compare June 21, 2025 16:34
@mingyech mingyech merged commit 5abccec into refraction-networking:master Jun 21, 2025
3 checks passed
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.

3 participants