Skip to content

Conversation

@schwabe
Copy link
Contributor

@schwabe schwabe commented Oct 10, 2025

These methods allow a server to switch the context when looking at ALPN and servername together. This is for example require when implementing the ACME tls-alpn/1 protocol.

Unfortunately, OpenSSL does not provide any utility function to actually parse ClientHello extensions when using these APIs and the user has to write their own methods.

Closes: 1430

This PR depends on pyca/cryptography#13634 but I am not sure how to express that properly in the build files.

@schwabe schwabe force-pushed the add_client_hello_callback branch 2 times, most recently from ce6d7bd to 370aa28 Compare October 10, 2025 13:22
These methods allow a server to switch the context when looking at ALPN
and servername together. This is for example require when implementing the
ACME tls-alpn/1 protocol.

Unfortunately, OpenSSL does not provide any utility function to actually
parse ClientHello extensions when using these APIs and the user has to write
their own methods.

Closes: pyca#1430
Signed-off-by: Arne Schwabe <[email protected]>
@schwabe schwabe force-pushed the add_client_hello_callback branch from 370aa28 to 705d7cf Compare October 10, 2025 13:33
@schwabe
Copy link
Contributor Author

schwabe commented Oct 10, 2025

Coverage test seem to fail since the newly added methods are not tested without having the newer cyrptography version with the added functions too.

@alex
Copy link
Member

alex commented Oct 11, 2025

Hmm, we should probably adapt the coverage bits to merge from multiple jobs (as we do on cryptography).

@mhils do you have an opinion on this API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add support for set_client_hello_callback to expose TLS ClientHello in Python to enable JA3 TLS fingerprinting

2 participants