Struct rustls_ffi::cipher::rustls_client_cert_verifier_optional [−][src]
pub struct rustls_client_cert_verifier_optional { /* fields omitted */ }
Expand description
Alternative to rustls_client_cert_verifier
that allows connections
with or without a client certificate. If the client offers a certificate,
it will be verified (and rejected if it is not valid). If the client
does not offer a certificate, the connection will succeed.
The application can retrieve the certificate, if any, with rustls_connection_get_peer_certificate.
Implementations
#[no_mangle]pub extern "C" fn rustls_client_cert_verifier_optional_new(
store: *mut rustls_root_cert_store
) -> *const rustls_client_cert_verifier_optional
#[no_mangle]pub extern "C" fn rustls_client_cert_verifier_optional_new(
store: *mut rustls_root_cert_store
) -> *const rustls_client_cert_verifier_optional
Create a new rustls_client_cert_verifier_optional for the root store. The verifier can be used in several rustls_server_config instances. Must be freed by the application when no longer needed. See the documentation of rustls_client_cert_verifier_optional_free for details about lifetime.
#[no_mangle]pub extern "C" fn rustls_client_cert_verifier_optional_free(
verifier: *const rustls_client_cert_verifier_optional
)
#[no_mangle]pub extern "C" fn rustls_client_cert_verifier_optional_free(
verifier: *const rustls_client_cert_verifier_optional
)
“Free” a verifier previously returned from rustls_client_cert_verifier_optional_new. Since rustls_client_cert_verifier_optional is actually an atomically reference-counted pointer, extant server_configs may still hold an internal reference to the Rust object. However, C code must consider this pointer unusable after “free“ing it. Calling with NULL is fine. Must not be called twice with the same value.