Skip to content

Conversation

@WesleyRosenblum
Copy link
Contributor

Description of changes:

#1984 added the ability to export symmetric keys negotiated during the QUIC handshake by adding an on_tls_exporter_ready event. This change adds cipher_suite() to the TLS session exposed as part of the event for use when using the exported keys.

Call-outs:

I use CipherSuite::Unknown in place of returning an error, it seemed a little more user friendly and I wasn't sure the error would be useful

Testing:

Updated the exporter integration test to confirm the client and server ciphersuites are the same and neither of them are unknown

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

}

fn cipher_suite(&self) -> CipherSuite {
if let Ok(cipher_suite) = self.connection.cipher_suite() {
Copy link
Contributor

Choose a reason for hiding this comment

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

seems better to store the expected cipher suite on the session state, rather than parsing it from the connection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just to make sure I'm understanding, that would be done inside of on_secret in callback.rs by changing fn get_algo_type to also return the cipher suite?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah that's what i was thinking

output: &mut [u8],
) -> Result<(), TlsExportError>;

fn cipher_suite(&self) -> CipherSuite;
Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense to return Unknown rather than an error

@WesleyRosenblum WesleyRosenblum merged commit 729e046 into main Dec 13, 2023
@WesleyRosenblum WesleyRosenblum deleted the WesleyRosenblum/tlsexport branch December 13, 2023 01:35
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