// Triple checks we propagate the TLSError through
Triple checks we propagate the TLSError through
Triple checks we propagate the TLSError through
fn client_verifier_fails_properly() {
        for kt in ALL_KEY_TYPES.iter() {
            let client_verifier = MockClientVerifier {
                verified: ver_err,
                subjects: Some(get_client_root_store(*kt).get_subjects()),
                mandatory: Some(true),
                offered_schemes: None,
            };
            let mut server_config = ServerConfig::new(Arc::new(client_verifier));
            server_config.set_single_cert(kt.get_chain(), kt.get_key()).unwrap();
            let server_config = Arc::new(server_config);
            let client_config = make_client_config_with_auth(*kt);
            for client_config in AllClientVersions::new(client_config) {
                let mut server = ServerSession::new(&server_config);
                let mut client = ClientSession::new(&Arc::new(client_config), dns_name("localhost"));
                let err = do_handshake_until_error(&mut client, &mut server);
                assert_eq!(err, Err(TLSErrorFromPeer::Server(
                            TLSError::General("test err".into()))));
            }
        }
    }
fn client_verifier_fails_properly ( ) { for kt in ALL_KEY_TYPES . iter ( ) { let client_verifier = MockClientVerifier { verified : ver_err , subjects : Some ( get_client_root_store ( * kt ) . get_subjects ( ) ) , mandatory : Some ( true ) , offered_schemes : None , } ; let mut server_config = ServerConfig :: new ( Arc :: new ( client_verifier ) ) ; server_config . set_single_cert ( kt . get_chain ( ) , kt . get_key ( ) ) . unwrap ( ) ; let server_config = Arc :: new ( server_config ) ; let client_config = make_client_config_with_auth ( * kt ) ; for client_config in AllClientVersions :: new ( client_config ) { let mut server = ServerSession :: new ( & server_config ) ; let mut client = ClientSession :: new ( & Arc :: new ( client_config ) , dns_name ( " " ) ) ; let err = do_handshake_until_error ( & mut client , & mut server ) ; assert_eq ! ( err Err ( TLSErrorFromPeer Server ( TLSError General ( " " into ( ) ) ) ) ) ; } } }
Triple checks we propagate the TLSError through
Triple checks we propagate the TLSError through