1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-04 18:53:20 +00:00
This commit is contained in:
Bernd Schoolmann
2025-10-17 14:11:26 +02:00
parent 164c0bd355
commit 5fbecdd935

View File

@@ -269,10 +269,10 @@ impl PrivateKey {
PrivateKey::Ecdsa(key) => ssh_key::private::PrivateKey::from(key.to_owned()), PrivateKey::Ecdsa(key) => ssh_key::private::PrivateKey::from(key.to_owned()),
}; };
let pubkey_bytes = BASE64_STANDARD.encode(private_key let pubkey_bytes = private_key
.public_key() .public_key()
.to_bytes() .to_bytes()
.expect("Converting to public key bytes should always be possible")); .expect("Converting to public key bytes should always be possible");
let alg_str = private_key.algorithm(); let alg_str = private_key.algorithm();
PublicKey::try_from(format!("{} {}", alg_str.as_str(), BASE64_STANDARD.encode(&pubkey_bytes))) PublicKey::try_from(format!("{} {}", alg_str.as_str(), BASE64_STANDARD.encode(&pubkey_bytes)))