pub struct Pkcs12(_);Implementations§
source§impl Pkcs12
impl Pkcs12
sourcepub fn from_der(der: &[u8]) -> Result<Pkcs12, ErrorStack>
pub fn from_der(der: &[u8]) -> Result<Pkcs12, ErrorStack>
Deserializes a DER-encoded PKCS#12 archive.
This corresponds to d2i_PKCS12.
sourcepub fn builder() -> Pkcs12Builder
pub fn builder() -> Pkcs12Builder
Creates a new builder for a protected pkcs12 certificate.
This uses the defaults from the OpenSSL library:
nid_key-AES_256_CBC(3.0.0+) orPBE_WITHSHA1AND3_KEY_TRIPLEDES_CBCnid_cert-AES_256_CBC(3.0.0+) orPBE_WITHSHA1AND40BITRC2_CBCiter-2048mac_iter-2048mac_md-SHA-256(3.0.0+) orSHA-1(SHA-1only for BoringSSL)
Methods from Deref<Target = Pkcs12Ref>§
sourcepub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the Pkcs12 to its standard DER encoding.
This corresponds to i2d_PKCS12.
sourcepub fn parse(&self, pass: &str) -> Result<ParsedPkcs12, ErrorStack>
pub fn parse(&self, pass: &str) -> Result<ParsedPkcs12, ErrorStack>
Extracts the contents of the Pkcs12.
This corresponds to PKCS12_parse.