Skip to content

Add export_keying_material support to pingora-rustls#743

Open
nbarbier-265 wants to merge 1 commit intocloudflare:mainfrom
nbarbier-265:add-rustls-ekm
Open

Add export_keying_material support to pingora-rustls#743
nbarbier-265 wants to merge 1 commit intocloudflare:mainfrom
nbarbier-265:add-rustls-ekm

Conversation

@nbarbier-265
Copy link
Copy Markdown
Contributor

@nbarbier-265 nbarbier-265 commented Nov 9, 2025

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

Adds ssl_export_keying_material functions to pingora-rustls ext module,
wrapping rustls's built-in export_keying_material method for RFC 5705.
@johnhurt
Copy link
Copy Markdown
Contributor

@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)

@nojima
Copy link
Copy Markdown
Contributor

nojima commented Mar 28, 2026

@johnhurt Sure, I'll take a look!

@nojima
Copy link
Copy Markdown
Contributor

nojima commented Mar 30, 2026

@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.

Copy link
Copy Markdown
Contributor

@fabian4 fabian4 left a comment

Choose a reason for hiding this comment

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

@nbarbier-265 looks good to me.

For export_keying_material maybe we can pass it down directly here as it is supported

conn.export_keying_material(out, label.as_bytes(), context).map(|_| ())

@nbarbier-265
Copy link
Copy Markdown
Contributor Author

Looking.

@johnhurt
Copy link
Copy Markdown
Contributor

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.

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.

4 participants