rcgen icon indicating copy to clipboard operation
rcgen copied to clipboard

naming: `CertifiedKey` is confusing

Open teohhanhui opened this issue 2 months ago • 3 comments

CertifiedKey reads like "a key that is (somehow) certified", when we actually mean "a certificate together with the key(pair) used to sign it".

Perhaps CertificateWithKey would be fine?

teohhanhui avatar Oct 20 '25 15:10 teohhanhui

Thanks for opening an issue,

CertifiedKey reads like "a key that is (somehow) certified"

That's an accurate reading from my perspective. An X.509 certificate binds a public key with a subject identity after being certified by a certification authority.

Perhaps CertificateWithKey would be fine?

In my own opinion I'm not sure it's a clear improvement and the win would need to be pretty substantial to justify a breaking API change.

cpu avatar Oct 20 '25 15:10 cpu

An X.509 certificate binds a public key with a subject identity after being certified by a certification authority.

Thanks for the clarification. Looks like the rustdoc should be phrased as such then.

teohhanhui avatar Oct 20 '25 16:10 teohhanhui

Looks like the rustdoc should be phrased as such then.

Sounds reasonable! Want to open a PR?

cpu avatar Oct 20 '25 16:10 cpu