Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

Profile

Trait Profile 

Source
pub trait Profile {
    // Required methods
    fn get_issuer(&self, subject: &Name) -> Name;
    fn get_subject(&self) -> Name;
    fn build_extensions(
        &self,
        spk: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>,
        issuer_spk: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>,
        tbs: &TbsCertificateInner,
    ) -> Result<Vec<Extension>, Error>;
}
Expand description

Profile for certificates

The profile will define the various extensions to add to a certificate, this may be used to generate a cabf::Root, or a TLS cabf::tls::Subscriber certificate.

See implementors for a full list of existing profiles.

Required Methods§

Source

fn get_issuer(&self, subject: &Name) -> Name

Issuer to be used for issued certificates

Source

fn get_subject(&self) -> Name

Subject for the certificate to be used.

Source

fn build_extensions( &self, spk: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>, issuer_spk: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>, tbs: &TbsCertificateInner, ) -> Result<Vec<Extension>, Error>

X509v3 extensions to be added in the certificates.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§