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_params(params: &'a CertificateParams, signing_key: S) -> Self
pub fn from_params(params: &'a CertificateParams, signing_key: S) -> Self
Create a new issuer from the given parameters and signing key references.
Use Issuer::new
instead if you want to obtain an Issuer
that owns
its parameters.
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.