Struct trust_dns_proto::openssl::tls_server::Pkcs12
source · [−]pub struct Pkcs12(_);
Available on crate feature
dns-over-openssl
only.Implementations
sourceimpl 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_CBC
nid_cert
-AES_256_CBC
(3.0.0+) orPBE_WITHSHA1AND40BITRC2_CBC
iter
-2048
mac_iter
-2048
mac_md
-SHA-256
(3.0.0+) orSHA-1
Methods from Deref<Target = Pkcs12Ref>
sourcepub fn to_der(&self) -> Result<Vec<u8, Global>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8, Global>, 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
.
Trait Implementations
sourceimpl ForeignType for Pkcs12
impl ForeignType for Pkcs12
impl Send for Pkcs12
impl Sync for Pkcs12
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more