Skip to content

rcgen: stop storing key DER in KeyPair - #453

Open
djc wants to merge 2 commits into
mainfrom
no-key-pair-der
Open

rcgen: stop storing key DER in KeyPair#453
djc wants to merge 2 commits into
mainfrom
no-key-pair-der

Conversation

@djc

@djc djc commented Sep 11, 2026

Copy link
Copy Markdown
Member

First semver-incompatible PR on main for 0.15.0.

Preparation for

cc @jgreeer

@djc
djc requested review from cpu and est31 September 11, 2026 11:25
Comment thread rcgen/src/key_pair.rs
Comment on lines +745 to +746
PrivateKeyDer::Pkcs1(_) => "EC PRIVATE KEY",
PrivateKeyDer::Sec1(_) => "RSA PRIVATE KEY",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
PrivateKeyDer::Pkcs1(_) => "EC PRIVATE KEY",
PrivateKeyDer::Sec1(_) => "RSA PRIVATE KEY",
PrivateKeyDer::Pkcs1(_) => "RSA PRIVATE KEY",
PrivateKeyDer::Sec1(_) => "EC PRIVATE KEY",

PKCS 1 is RSA and SEC1 is EC?

Comment thread rcgen/src/key_pair.rs
f.debug_struct("KeyPair")
.field("kind", &self.kind)
.field("alg", &self.alg)
.field("serialized_der", &"[secret key elided]")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not in the struct anymore

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