pub struct Issuer<'a, S> { /* private fields */ }
Expand description
An issuer that can sign certificates.
Encapsulates the distinguished name, key identifier method, key usages and signing key of the issuing certificate.
Implementations§
Source§impl<'a, S: SigningKey> Issuer<'a, S>
impl<'a, S: SigningKey> Issuer<'a, S>
Sourcepub fn new(params: CertificateParams, signing_key: S) -> Self
pub fn new(params: CertificateParams, signing_key: S) -> Self
Create a new issuer from the given parameters and signing key.
Sourcepub fn from_ca_cert_pem(pem_str: &str, signing_key: S) -> Result<Self, Error>
Available on crate features pem
and x509-parser
only.
pub fn from_ca_cert_pem(pem_str: &str, signing_key: S) -> Result<Self, Error>
pem
and x509-parser
only.Parses an existing CA certificate from the ASCII PEM format.
See from_ca_cert_der
for more details.
Sourcepub fn from_ca_cert_der(
ca_cert: &CertificateDer<'_>,
signing_key: S,
) -> Result<Self, Error>
Available on crate feature x509-parser
only.
pub fn from_ca_cert_der( ca_cert: &CertificateDer<'_>, signing_key: S, ) -> Result<Self, Error>
x509-parser
only.Parses an existing CA certificate from the DER format.
This function assumes the provided certificate is a CA. It will not check
for the presence of the BasicConstraints
extension, or perform any other
validation.
If you already have a byte slice containing DER, it can trivially be converted into
CertificateDer
using the Into
trait.
Sourcepub fn key_usages(&self) -> &[KeyUsagePurpose]
pub fn key_usages(&self) -> &[KeyUsagePurpose]
Allowed key usages for this issuer.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for Issuer<'a, S>where
S: Freeze,
impl<'a, S> RefUnwindSafe for Issuer<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Issuer<'a, S>
impl<'a, S> Sync for Issuer<'a, S>where
S: Sync,
impl<'a, S> Unpin for Issuer<'a, S>where
S: Unpin,
impl<'a, S> UnwindSafe for Issuer<'a, S>where
S: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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