pub struct rustls_root_cert_store { /* private fields */ }
Expand description

Implementations§

source§

impl rustls_root_cert_store

source

#[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/latest/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

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 )

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.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.