Skip to content

Commit bf9f8c4

Browse files
committed
Merge branch 'km/cose-content-format' of github.com:bitwarden/sdk-internal into km/cose-content-format
2 parents b00f48b + 4e5510b commit bf9f8c4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

crates/bitwarden-core/src/key_management/crypto.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,12 @@ pub fn make_user_signing_keys_for_enrollment(
596596

597597
// Make new keypair and sign the public key with it
598598
let signature_keypair = SigningKey::make(SignatureAlgorithm::Ed25519);
599+
let temporary_signature_keypair_id = SigningKeyId::Local("temporary_key_for_rotation");
600+
#[allow(deprecated)]
601+
ctx.set_signing_key(temporary_signature_keypair_id, signature_keypair.clone())?;
599602
let signed_public_key = ctx.make_signed_public_key(
600603
AsymmetricKeyId::UserPrivateKey,
601-
SigningKeyId::UserSigningKey,
604+
temporary_signature_keypair_id,
602605
)?;
603606

604607
Ok(MakeUserSigningKeysResponse {

crates/bitwarden-core/src/key_management/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ key_ids! {
3636
#[signing]
3737
pub enum SigningKeyId {
3838
UserSigningKey,
39+
#[local]
40+
Local(&'static str),
3941
}
4042

4143
pub KeyIds => SymmetricKeyId, AsymmetricKeyId, SigningKeyId;

0 commit comments

Comments
 (0)