/// The server can be configured to require client authentication.
/// If trusted_client_certs is Some then the non-empty set will
/// list the client certificates that will be accepted. If it is None,
/// then no client authentication will be performed.
The server can be configured to require client authentication.
If trusted_client_certs is Some then the non-empty set will
list the client certificates that will be accepted. If it is None,
then no client authentication will be performed.
The server can be configured to require client authentication . If trusted_client_certs is Some then the non - empty set will list the client certificates that will be accepted . If it is None then no client authentication will be performed .
fn tls_acceptor(
        &self,
        self_cert: TlsPublicKeyCert,
        trusted_client_certs: Option<HashSet<TlsPublicKeyCert>>,
    ) -> Result<SslAcceptor, CspTlsServerHandshakeError> {
        use ic_crypto_internal_tls::{tls_acceptor, ClientAuthentication};
        let trusted_client_certs_x509 = match trusted_client_certs {
            Some(c) => ClientAuthentication::OptionalAuthentication {
                trusted_client_certs: c.iter().map(TlsPublicKeyCert::as_x509).cloned().collect(),
            },
            None => ClientAuthentication::NoAuthentication,
        };
        Ok(tls_acceptor(
            &key_from_secret_key_store(Arc::clone(&self.csp_vault), &self_cert)?,
            self_cert.as_x509(),
            trusted_client_certs_x509,
        )?)
    }
fn tls_acceptor ( & self , self_cert : TlsPublicKeyCert , trusted_client_certs : Option < HashSet < TlsPublicKeyCert > > , ) -> Result < SslAcceptor , CspTlsServerHandshakeError > { use ic_crypto_internal_tls :: { tls_acceptor , ClientAuthentication } ; let trusted_client_certs_x509 = match trusted_client_certs { Some ( c ) => ClientAuthentication :: OptionalAuthentication { trusted_client_certs : c . iter ( ) . map ( TlsPublicKeyCert :: as_x509 ) . cloned ( ) . collect ( ) , } , None => ClientAuthentication :: NoAuthentication , } ; Ok ( tls_acceptor ( & key_from_secret_key_store ( Arc :: clone ( & self . csp_vault ) , & self_cert ) ? , self_cert . as_x509 ( ) , trusted_client_certs_x509 , ) ? ) }
The server can be configured to require client authentication.
The server can be configured to require client authentication .
&self
self_cert
TlsPublicKeyCert
trusted_client_certs
Option<HashSet<TlsPublicKeyCert>>