Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all identity certs to create P-256 / RSA-2048 key pairs. #447

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cert/aziot-certd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ async fn create_cert_inner<'a>(
.key_client
.create_key_pair_if_not_exists(
&x509.identity.pk,
Some("ec-p256:rsa-4096:*"),
Some("ec-p256:rsa-2048:*"),
)
.await?;
let cstr = CString::new(handle.0)?;
Expand Down
2 changes: 1 addition & 1 deletion cert/aziot-certd/src/renewal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl cert_renewal::CertInterface for EstIdRenewal {

let key_handle = self
.key_client
.create_key_pair_if_not_exists(&key_id, Some("ec-p256:rsa-4096:*"))
.create_key_pair_if_not_exists(&key_id, Some("ec-p256:rsa-2048:*"))
.await
.map_err(|_| cert_renewal::Error::retryable_error("failed to generate temp key"))?;

Expand Down
2 changes: 1 addition & 1 deletion identity/aziot-identityd/src/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ impl IdentityManager {

let key_handle = self
.key_client
.create_key_pair_if_not_exists(identity_pk, Some("rsa-2048:*"))
.create_key_pair_if_not_exists(identity_pk, Some("ec-p256:rsa-2048:*"))
.await
.map_err(|err| Error::Internal(InternalError::CreateCertificate(err.into())))?;

Expand Down
4 changes: 2 additions & 2 deletions identity/aziot-identityd/src/renewal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl IdentityCertRenewal {
}

let key_handle = key_client
.create_key_pair_if_not_exists(key_id, Some("rsa-2048:*"))
.create_key_pair_if_not_exists(key_id, Some("ec-p256:rsa-2048:*"))
.await
.map_err(|err| {
crate::Error::Internal(crate::InternalError::CreateCertificate(
Expand Down Expand Up @@ -163,7 +163,7 @@ impl cert_renewal::CertInterface for IdentityCertRenewal {

let key_handle = self
.key_client
.create_key_pair_if_not_exists(&key_id, Some("rsa-2048:*"))
.create_key_pair_if_not_exists(&key_id, Some("ec-p256:rsa-2048:*"))
.await
.map_err(|_| cert_renewal::Error::retryable_error("failed to generate temp key"))?;

Expand Down