Skip to content

Commit

Permalink
pkcs12: move to EncryptedPrivateKeyInfoRef
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <[email protected]>
  • Loading branch information
baloo committed Aug 19, 2024
1 parent 334e120 commit fb4becf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkcs12/tests/cert_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use pkcs8::{
self,
pbes2::{AES_256_CBC_OID, HMAC_WITH_SHA256_OID, PBES2_OID, PBKDF2_OID},
},
EncryptedPrivateKeyInfo,
EncryptedPrivateKeyInfoRef,
};
use spki::AlgorithmIdentifierOwned;

Expand Down Expand Up @@ -242,9 +242,9 @@ fn decode_sample_pfx() {
for safe_bag in safe_bags {
match safe_bag.bag_id {
pkcs12::PKCS_12_PKCS8_KEY_BAG_OID => {
let cs: ContextSpecific<EncryptedPrivateKeyInfo> =
let cs: ContextSpecific<EncryptedPrivateKeyInfoRef<'_>> =
ContextSpecific::from_der(&safe_bag.bag_value).unwrap();
let mut ciphertext = cs.value.encrypted_data.to_vec();
let mut ciphertext = cs.value.encrypted_data.as_bytes().to_vec();
let plaintext = cs
.value
.encryption_algorithm
Expand Down Expand Up @@ -628,9 +628,9 @@ fn decode_sample_pfx2() {
for safe_bag in safe_bags {
match safe_bag.bag_id {
pkcs12::PKCS_12_PKCS8_KEY_BAG_OID => {
let cs: ContextSpecific<EncryptedPrivateKeyInfo> =
let cs: ContextSpecific<EncryptedPrivateKeyInfoRef<'_>> =
ContextSpecific::from_der(&safe_bag.bag_value).unwrap();
let mut ciphertext = cs.value.encrypted_data.to_vec();
let mut ciphertext = cs.value.encrypted_data.as_bytes().to_vec();
let plaintext = cs
.value
.encryption_algorithm
Expand Down

0 comments on commit fb4becf

Please sign in to comment.