Skip to content

Commit de1de66

Browse files
committed
Cherry-pick 6606c83
1 parent a95db13 commit de1de66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rust/cryptography-x509/src/pkcs12.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub enum AttributeSet<'a> {
5555
#[derive(asn1::Asn1DefinedByWrite)]
5656
pub enum BagValue<'a> {
5757
#[defined_by(CERT_BAG_OID)]
58-
CertBag(CertBag<'a>),
58+
CertBag(Box<CertBag<'a>>),
5959

6060
#[defined_by(KEY_BAG_OID)]
6161
KeyBag(asn1::Tlv<'a>),

src/rust/src/pkcs12.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,14 @@ fn cert_to_bag<'a>(
386386
) -> CryptographyResult<cryptography_x509::pkcs12::SafeBag<'a>> {
387387
Ok(cryptography_x509::pkcs12::SafeBag {
388388
_bag_id: asn1::DefinedByMarker::marker(),
389-
bag_value: asn1::Explicit::new(cryptography_x509::pkcs12::BagValue::CertBag(
389+
bag_value: asn1::Explicit::new(cryptography_x509::pkcs12::BagValue::CertBag(Box::new(
390390
cryptography_x509::pkcs12::CertBag {
391391
_cert_id: asn1::DefinedByMarker::marker(),
392392
cert_value: asn1::Explicit::new(cryptography_x509::pkcs12::CertType::X509(
393393
asn1::OctetStringEncoded::new(cert.raw.borrow_dependent().clone()),
394394
)),
395395
},
396-
)),
396+
))),
397397
attributes: pkcs12_attributes(friendly_name, local_key_id)?,
398398
})
399399
}

0 commit comments

Comments
 (0)