-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: implement TlsAcceptCallbacks support for rustls backend #834
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem your feature solves, or the need it fulfills?
TlsSettings::with_callbacks() in the rustls backend returns an error:
"Certificate callbacks are not supported with feature "rustls"."
The TlsRef type passed to handshake_complete_callback is an empty struct with no accessors, making post-handshake inspection impossible even if the error is worked around. This is a parity gap with the OpenSSL/BoringSSL backend, where TlsRef = SslRef exposes peer_certificate(), verified_chain(), current_cipher(), etc.
This blocks any rustls-based application that needs to extract peer certificate identity or cipher suite information after the TLS handshake.
Describe the solution you'd like
TlsSettings::with_callbacks(callbacks)should accept aTlsAcceptCallbacksand wire it through to theAcceptorand handshake path (matching the OpenSSL backend signature)TlsRefshould carry connection state — peer certificate chain and negotiated cipher suite — with public accessorshandshake_with_callback()should populateTlsReffrom the rustls session and pass it to the callback- Add
set_certificate_chain_file()/set_private_key_file()setters onTlsSettingsfor use with the callbacks constructor
Additional context
PR: #833
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request