Skip to content

[38/n] [wicketd-commission-types] make PrivateKeyPem a Zeroizing - #11066

Open
sunshowers wants to merge 2 commits into
sunshowers/spr/main.38n-wicketd-commission-types-make-privatekeypem-a-zeroizing-1from
sunshowers/spr/38n-wicketd-commission-types-make-privatekeypem-a-zeroizing-1
Open

[38/n] [wicketd-commission-types] make PrivateKeyPem a Zeroizing#11066
sunshowers wants to merge 2 commits into
sunshowers/spr/main.38n-wicketd-commission-types-make-privatekeypem-a-zeroizing-1from
sunshowers/spr/38n-wicketd-commission-types-make-privatekeypem-a-zeroizing-1

Conversation

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Comment thread wicketd/src/rss_config.rs
Comment on lines 250 to 263
pub(crate) fn push_cert(
&mut self,
cert: String,
cert: CertificatePem,
) -> Result<CertificateUploadResponse, String> {
self.partial_external_certificate.cert = Some(cert);
self.partial_external_certificate.cert = Some(cert.0);
self.maybe_promote_external_certificate()
}

pub(crate) fn push_key(
&mut self,
key: String,
key: PrivateKeyPem,
) -> Result<CertificateUploadResponse, String> {
self.partial_external_certificate.key = Some(key);
self.partial_external_certificate.key = Some(key.0.to_string());
self.maybe_promote_external_certificate()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also add some type safety here.

@andrewjstone andrewjstone left a comment

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.

Good catch!

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