pingora icon indicating copy to clipboard operation
pingora copied to clipboard

Add export_keying_material support to pingora-s2n

Open nbarbier-265 opened this issue 1 year ago • 3 comments

Adds RFC 5705 keying material export support to pingora-s2n, matching the existing functionality in pingora-openssl, pingora-boringssl (#729), and pingora-rustls (#743).

nbarbier-265 avatar Nov 09 '25 20:11 nbarbier-265

@gilbertw1 @varunravi98 — this PR adds RFC 5705 keying material export to the s2n backend. Companion to #743. Small, clean change with a test. Would appreciate a review. (Per #835)

johnhurt avatar Mar 27 '26 17:03 johnhurt

Sure, looking now

varunravi98 avatar Mar 29 '26 00:03 varunravi98

@johnhurt The changes look good to me. I noticed that the author commented that function should only be called on connections that have completed a handshake using TLS 1.3, so I took a look at s2n's C API and the s2n-tls crate. The C function returns an error code if this gets called on a TLS 1.3 connection, and the s2n-tls crate appropriately converts that to an error, so we don't need to handle it at our layer.

Should we change the copyright from 2025 to 2026? It was accurate at the time the PR was submitted but won't be when we merge it, so I'm not sure how you guys prefer to handle that.

My only other note is that it would be nice to have actual integration tests that verify that this works properly when integrated with an actual s2n_tls::connection::Connection. I'm not blocking approval because of that since we didn't enforce that kind of testing requirement for the Boring/OpenSSL PR, but just food for thought to help shore up test coverage!

varunravi98 avatar Mar 29 '26 19:03 varunravi98