@ -329,12 +329,20 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) {
// and send an alert to the client as the first application data message. In
// TLS 1.2, the client-side handshake will fail if the client sends a bad
// certificate.
//
// For OpenSSL versions < 1.1, TLS 1.3 is not supported, so the client-side
// handshake should succeed precisely when the server-side handshake
// succeeds.
bool expect_server_success =
! ( key_cert_lib - > use_bad_server_cert | |
( key_cert_lib - > use_bad_client_cert & & ssl_fixture - > force_client_auth ) ) ;
# if OPENSSL_VERSION_NUMBER >= 0x10100000
bool expect_client_success = test_tls_version = = tsi_tls_version : : TSI_TLS1_2
? expect_server_success
: ! key_cert_lib - > use_bad_server_cert ;
# else
bool expect_client_success = expect_server_success ;
# endif
if ( expect_client_success ) {
GPR_ASSERT ( tsi_handshaker_result_extract_peer (
ssl_fixture - > base . client_result , & peer ) = = TSI_OK ) ;
@ -693,7 +701,7 @@ static bool is_slow_build() {
# if defined(GPR_ARCH_32) || defined(__APPLE__)
return true ;
# else
return BuiltUnderMsan ( ) ;
return BuiltUnderMsan ( ) | | BuiltUnderTsan ( ) ;
# endif
}
@ -701,11 +709,11 @@ void ssl_tsi_test_do_round_trip_odd_buffer_size() {
gpr_log ( GPR_INFO , " ssl_tsi_test_do_round_trip_odd_buffer_size " ) ;
const size_t odd_sizes [ ] = { 1025 , 2051 , 4103 , 8207 , 16409 } ;
size_t size = sizeof ( odd_sizes ) / sizeof ( size_t ) ;
// 1. avoid test being extremely slow under MSAN
// 2. o n 32-bit, the test is much slower (probably due to lack of boringssl
// asm optimizations) so we only run a subset of tests to avoid timeout
// 3. o n Mac OS, we have slower testing machines so we only run a subset
// of tests to avoid timeout
// 1. This test is extremely slow under MSAN and TSAN.
// 2. O n 32-bit, the test is much slower (probably due to lack of boringssl
// asm optimizations) so we only run a subset of tests to avoid timeout.
// 3. O n Mac OS, we have slower testing machines so we only run a subset
// of tests to avoid timeout.
if ( is_slow_build ( ) ) {
size = 1 ;
}
@ -956,7 +964,11 @@ void ssl_tsi_test_extract_cert_chain() {
X509_INFO * certInfo = sk_X509_INFO_value ( certInfos , i ) ;
if ( certInfo - > x509 ! = nullptr ) {
GPR_ASSERT ( sk_X509_push ( cert_chain , certInfo - > x509 ) ! = 0 ) ;
# if OPENSSL_VERSION_NUMBER >= 0x10100000
X509_up_ref ( certInfo - > x509 ) ;
# else
certInfo - > x509 - > references + = 1 ;
# endif
}
}
tsi_peer_property chain_property ;