pub struct Pkcs12(/* private fields */);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-nid::PBE_WITHSHA1AND3_KEY_TRIPLEDES_CBCnid_cert-nid::PBE_WITHSHA1AND40BITRC2_CBCiter-2048mac_iter-2048
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 with pkey and cert required.
Sourcepub fn parse2(&self, pass: &str) -> Result<ParsedPkcs12_2, ErrorStack>
pub fn parse2(&self, pass: &str) -> Result<ParsedPkcs12_2, ErrorStack>
Extracts the contents of the Pkcs12 with pkey and cert optional.
This corresponds to PKCS12_parse.
Trait Implementations§
Source§impl BorrowMut<Pkcs12Ref> for Pkcs12
impl BorrowMut<Pkcs12Ref> for Pkcs12
Source§fn borrow_mut(&mut self) -> &mut Pkcs12Ref
fn borrow_mut(&mut self) -> &mut Pkcs12Ref
Mutably borrows from an owned value. Read more
Source§impl ForeignType for Pkcs12
impl ForeignType for Pkcs12
impl Send for Pkcs12
impl Sync for Pkcs12
Auto Trait Implementations§
impl Freeze for Pkcs12
impl RefUnwindSafe for Pkcs12
impl Unpin for Pkcs12
impl UnsafeUnpin for Pkcs12
impl UnwindSafe for Pkcs12
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more