pub trait AppleCertificateBuilder: Sized {
    // Required methods
    fn apple_subject(
        &mut self,
        team_id: &str,
        person_name: &str,
        country: &str
    ) -> Result<(), AppleCodesignError>;
    fn apple_email_address(
        &mut self,
        address: &str
    ) -> Result<(), AppleCodesignError>;
    fn apple_extended_key_usage(
        &mut self,
        usage: ExtendedKeyUsagePurpose
    ) -> Result<(), AppleCodesignError>;
    fn apple_code_signing_certificate_extension(
        &mut self,
        extension: CodeSigningCertificateExtension
    ) -> Result<(), AppleCodesignError>;
    fn apple_certificate_profile(
        &mut self,
        profile: CertificateProfile
    ) -> Result<(), AppleCodesignError>;
    fn apple_code_signing_extensions(
        &self
    ) -> Vec<CodeSigningCertificateExtension>;
}
Expand description

Extensions to X509CertificateBuilder specializing in Apple certificate behavior.

Most callers should call Self::apple_certificate_profile to configure a preset profile for the certificate being generated. After that - and it is important it is after - call Self::apple_subject to define the subject field. If you call this after registering code signing extensions, it detects the appropriate format for the Common Name field.

Required Methods§

source

fn apple_subject( &mut self, team_id: &str, person_name: &str, country: &str ) -> Result<(), AppleCodesignError>

This functions defines common attributes on the certificate subject.

team_id is your Apple team id. It is a short alphanumeric string. You can find this at https://developer.apple.com/account/#/membership/.

source

fn apple_email_address( &mut self, address: &str ) -> Result<(), AppleCodesignError>

Add an email address to the certificate’s subject name.

source

fn apple_extended_key_usage( &mut self, usage: ExtendedKeyUsagePurpose ) -> Result<(), AppleCodesignError>

Add an ExtendedKeyUsagePurpose to this certificate.

source

fn apple_code_signing_certificate_extension( &mut self, extension: CodeSigningCertificateExtension ) -> Result<(), AppleCodesignError>

Add a certificate extension as defined by a CodeSigningCertificateExtension instance.

source

fn apple_certificate_profile( &mut self, profile: CertificateProfile ) -> Result<(), AppleCodesignError>

Add a CertificateProfile to this builder.

All certificate extensions relevant to this profile are added.

This should be the first function you call after creating an instance because other functions rely on the state that it sets.

source

fn apple_code_signing_extensions(&self) -> Vec<CodeSigningCertificateExtension>

Find code signing extensions that are currently registered.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AppleCertificateBuilder for X509CertificateBuilder

Implementors§