pub struct CertificateBuilder<'a> { /* private fields */ }
Expand description
Certificate builder is used to create X.509 certificate chains
Implementations§
Source§impl<'a> CertificateBuilder<'a>
impl<'a> CertificateBuilder<'a>
Sourcepub fn signer<S>(&mut self, signer: S) -> &mut Self
pub fn signer<S>(&mut self, signer: S) -> &mut Self
Specify certificate signer. If omitted or None a self-signed certificate is created.
Sourcepub fn alt_names<S, I>(&mut self, alt_names: I) -> &mut Self
pub fn alt_names<S, I>(&mut self, alt_names: I) -> &mut Self
Specify DNS or IP names for the subjectAltName extension. This is a required setting for the TLS SNI matching.
Sourcepub fn not_before(&mut self, time: SystemTime) -> &mut Self
pub fn not_before(&mut self, time: SystemTime) -> &mut Self
Specify start date of the certificate
Sourcepub fn not_after(&mut self, time: SystemTime) -> &mut Self
pub fn not_after(&mut self, time: SystemTime) -> &mut Self
Specify expiration date of the certificate
Sourcepub fn private_key(&mut self, key: PrivateKey) -> &mut Self
pub fn private_key(&mut self, key: PrivateKey) -> &mut Self
Specify a custom private key for the certificate chain. If not specified a default RSA-2048 key will be generated.
Sourcepub fn serial_number(&mut self, number: u64) -> &mut Self
pub fn serial_number(&mut self, number: u64) -> &mut Self
Specify serial number for the certificate, default is current Unix timestamp.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CertificateBuilder<'a>
impl<'a> RefUnwindSafe for CertificateBuilder<'a>
impl<'a> Send for CertificateBuilder<'a>
impl<'a> Sync for CertificateBuilder<'a>
impl<'a> Unpin for CertificateBuilder<'a>
impl<'a> UnwindSafe for CertificateBuilder<'a>
Blanket Implementations§
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