@@ -13,7 +13,7 @@ use pkcs8::{
13
13
self ,
14
14
pbes2:: { AES_256_CBC_OID , HMAC_WITH_SHA256_OID , PBES2_OID , PBKDF2_OID } ,
15
15
} ,
16
- EncryptedPrivateKeyInfo ,
16
+ EncryptedPrivateKeyInfoRef ,
17
17
} ;
18
18
use spki:: AlgorithmIdentifierOwned ;
19
19
@@ -242,9 +242,9 @@ fn decode_sample_pfx() {
242
242
for safe_bag in safe_bags {
243
243
match safe_bag. bag_id {
244
244
pkcs12:: PKCS_12_PKCS8_KEY_BAG_OID => {
245
- let cs: ContextSpecific < EncryptedPrivateKeyInfo > =
245
+ let cs: ContextSpecific < EncryptedPrivateKeyInfoRef < ' _ > > =
246
246
ContextSpecific :: from_der ( & safe_bag. bag_value ) . unwrap ( ) ;
247
- let mut ciphertext = cs. value . encrypted_data . to_vec ( ) ;
247
+ let mut ciphertext = cs. value . encrypted_data . as_bytes ( ) . to_vec ( ) ;
248
248
let plaintext = cs
249
249
. value
250
250
. encryption_algorithm
@@ -628,9 +628,9 @@ fn decode_sample_pfx2() {
628
628
for safe_bag in safe_bags {
629
629
match safe_bag. bag_id {
630
630
pkcs12:: PKCS_12_PKCS8_KEY_BAG_OID => {
631
- let cs: ContextSpecific < EncryptedPrivateKeyInfo > =
631
+ let cs: ContextSpecific < EncryptedPrivateKeyInfoRef < ' _ > > =
632
632
ContextSpecific :: from_der ( & safe_bag. bag_value ) . unwrap ( ) ;
633
- let mut ciphertext = cs. value . encrypted_data . to_vec ( ) ;
633
+ let mut ciphertext = cs. value . encrypted_data . as_bytes ( ) . to_vec ( ) ;
634
634
let plaintext = cs
635
635
. value
636
636
. encryption_algorithm
0 commit comments