Struct openssl::x509::store::X509StoreBuilder
source · pub struct X509StoreBuilder(/* private fields */);
Expand description
A builder type used to construct an X509Store
.
Implementations§
source§impl X509StoreBuilder
impl X509StoreBuilder
sourcepub fn new() -> Result<X509StoreBuilder, ErrorStack>
pub fn new() -> Result<X509StoreBuilder, ErrorStack>
Returns a builder for a certificate store.
The store is initially empty.
This corresponds to X509_STORE_new
.
Methods from Deref<Target = X509StoreBuilderRef>§
sourcepub fn add_cert(&mut self, cert: X509) -> Result<(), ErrorStack>
pub fn add_cert(&mut self, cert: X509) -> Result<(), ErrorStack>
Adds a certificate to the certificate store.
This corresponds to X509_STORE_add_cert
.
sourcepub fn set_default_paths(&mut self) -> Result<(), ErrorStack>
pub fn set_default_paths(&mut self) -> Result<(), ErrorStack>
Load certificates from their default locations.
These locations are read from the SSL_CERT_FILE
and SSL_CERT_DIR
environment variables if present, or defaults specified at OpenSSL
build time otherwise.
This corresponds to X509_STORE_set_default_paths
.
sourcepub fn add_lookup<T>(
&mut self,
method: &'static X509LookupMethodRef<T>,
) -> Result<&mut X509LookupRef<T>, ErrorStack>
pub fn add_lookup<T>( &mut self, method: &'static X509LookupMethodRef<T>, ) -> Result<&mut X509LookupRef<T>, ErrorStack>
Adds a lookup method to the store.
This corresponds to X509_STORE_add_lookup
.
sourcepub fn set_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
pub fn set_flags(&mut self, flags: X509VerifyFlags) -> Result<(), ErrorStack>
Sets certificate chain validation related flags.
This corresponds to X509_STORE_set_flags
.
sourcepub fn set_purpose(&mut self, purpose: X509PurposeId) -> Result<(), ErrorStack>
pub fn set_purpose(&mut self, purpose: X509PurposeId) -> Result<(), ErrorStack>
Sets the certificate purpose.
The purpose value can be obtained by X509PurposeRef::get_by_sname()
This corresponds to X509_STORE_set_purpose
.
sourcepub fn set_param(
&mut self,
param: &X509VerifyParamRef,
) -> Result<(), ErrorStack>
pub fn set_param( &mut self, param: &X509VerifyParamRef, ) -> Result<(), ErrorStack>
Sets certificate chain validation related parameters.
This corresponds to X509_STORE_set1_param
.