pub trait Builder {
    fn set_root_certificates<C: Into<Vec<Certificate>>>(
        builder: &mut Self,
        certificates: C
    );
fn root_certificates(builder: &Self) -> &[Certificate]; }
This is supported on crate feature dangerous only.
Expand description

Security-sensitive configuration for Builder.

Required methods

Set Certificates to be added into the root certificate store for connecting to a server. This is added additionally to the Store root certificates and does not replace them.

See Builder::set_store.

Default

No additional Certificates.

Security

Managing your own root certificate store can make sense if a private CA is used. Otherwise use Endpoint::connect_pinned.

Examples
use fabruic::{dangerous, Builder, Store};

let mut builder = Builder::new();
builder.set_store(Store::Empty);
// CA certificate has to be imported from somewhere else
dangerous::Builder::set_root_certificates(&mut builder, [ca_certificate]);

Returns Certificates set to be added into the root certificate store.

See set_root_certificates.

Examples
use fabruic::{dangerous, Builder, Store};

let mut builder = Builder::new();
builder.set_store(Store::Empty);
// CA certificate has to be imported from somewhere else
dangerous::Builder::set_root_certificates(&mut builder, [ca_certificate.clone()]);
assert_eq!(dangerous::Builder::root_certificates(&builder), [
	ca_certificate
]);

Implementors