Struct rustls_ffi::cipher::rustls_root_cert_store
source · pub struct rustls_root_cert_store { /* private fields */ }
Expand description
A root certificate store. https://docs.rs/rustls/0.20.0/rustls/struct.RootCertStore.html
Implementations§
source§impl rustls_root_cert_store
impl rustls_root_cert_store
source#[no_mangle]pub extern "C" fn rustls_root_cert_store_new(
) -> *mut rustls_root_cert_store
#[no_mangle]pub extern "C" fn rustls_root_cert_store_new(
) -> *mut rustls_root_cert_store
Create a rustls_root_cert_store. Caller owns the memory and must eventually call rustls_root_cert_store_free. The store starts out empty. Caller must add root certificates with rustls_root_cert_store_add_pem. https://docs.rs/rustls/0.20.0/rustls/struct.RootCertStore.html#method.empty
source#[no_mangle]pub extern "C" fn rustls_root_cert_store_add_pem(
store: *mut rustls_root_cert_store,
pem: *const u8,
pem_len: size_t,
strict: bool
) -> rustls_result
#[no_mangle]pub extern "C" fn rustls_root_cert_store_add_pem(
store: *mut rustls_root_cert_store,
pem: *const u8,
pem_len: size_t,
strict: bool
) -> rustls_result
Add one or more certificates to the root cert store using PEM encoded data.
When strict
is true an error will return a CertificateParseError
result. So will an attempt to parse data that has zero certificates.
When strict
is false, unparseable root certificates will be ignored.
This may be useful on systems that have syntactically invalid root
certificates.
source#[no_mangle]pub extern "C" fn rustls_root_cert_store_free(
store: *mut rustls_root_cert_store
)
#[no_mangle]pub extern "C" fn rustls_root_cert_store_free(
store: *mut rustls_root_cert_store
)
Free a rustls_root_cert_store previously returned from rustls_root_cert_store_builder_build. Calling with NULL is fine. Must not be called twice with the same value.