Add export_keying_material support to pingora-rustls
Adds RFC 5705 keying material export support to pingora-rustls, matching the existing functionality in pingora-openssl and pingora-boringssl from #729.
@fabian4 @nojima — this PR adds RFC 5705 keying material export to the rustls backend. Clean, focused change with tests. Would you be able to review? (Per #835)
@johnhurt Sure, I'll take a look!
@johnhurt @nbarbier-265 Looks good to me!
As a minor optimization, replacing out.to_vec() with vec![0; out.len()] would avoid an unnecessary read. That said, this isn't a performance-critical path, so either way is fine.
Looking.
Thanks, @fabian4 & @nojima - I agree with the suggestions to avoid allocation. @nbarbier-265 Thanks for your patience. I'll wait to ingest this change until you have had a look and decide how to proceed.