Skip to content

Commit 8a3a522

Browse files
committed
Fix tests under OpenSSL
Signed-off-by: Jonh Wendell <jwendell@redhat.com>
1 parent e94e94c commit 8a3a522

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ TEST_P(TcpGrpcAccessLogIntegrationTest, TlsHandshakeFailure_VerifyFailed) {
850850
downstream_local_address:
851851
socket_address:
852852
address: {0}
853-
downstream_transport_failure_reason: "TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:verify cert failed: cert hash and spki:TLS_error_end"
853+
downstream_transport_failure_reason: "{3}"
854854
access_log_type: NotSet
855855
downstream_direct_remote_address:
856856
socket_address:
@@ -872,7 +872,9 @@ TEST_P(TcpGrpcAccessLogIntegrationTest, TlsHandshakeFailure_VerifyFailed) {
872872
)EOF",
873873
Network::Test::getLoopbackAddressString(ipVersion()),
874874
SSL_SELECT(49199, 65535),
875-
peer_certificate_properties)));
875+
peer_certificate_properties,
876+
SSL_SELECT("TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:verify cert failed: cert hash and spki:TLS_error_end",
877+
"TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:TLS_error_end"))));
876878
cleanup();
877879
}
878880

test/extensions/filters/listener/tls_inspector/tls_inspector_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ TEST_P(TlsInspectorTest, ClientHelloTooBig) {
295295
const std::vector<uint64_t> bytes_processed =
296296
store_.histogramValues("tls_inspector.bytes_processed", false);
297297
ASSERT_EQ(1, bytes_processed.size());
298-
EXPECT_EQ("TLS_error|error:10000092:SSL "
299-
"routines:OPENSSL_internal:ENCRYPTED_LENGTH_TOO_LONG:TLS_error_end",
298+
EXPECT_EQ(SSL_SELECT("TLS_error|error:10000092:SSL routines:OPENSSL_internal:ENCRYPTED_LENGTH_TOO_LONG:TLS_error_end",
299+
"TLS_error|error:0A0000C6:SSL routines::packet length too long:TLS_error_end"),
300300
cb_.streamInfo().downstreamTransportFailureReason());
301301
}
302302

@@ -501,7 +501,7 @@ TEST_P(TlsInspectorTest, NotSslCloseConnection) {
501501
ASSERT_EQ(1, bytes_processed.size());
502502
EXPECT_EQ(5, bytes_processed[0]);
503503
EXPECT_EQ(
504-
"TLS_error|error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:TLS_error_end",
504+
SSL_SELECT("TLS_error|error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:TLS_error_end", "TLS_error|error:0A00010B:SSL routines::wrong version number:TLS_error_end"),
505505
cb_.streamInfo().downstreamTransportFailureReason());
506506
}
507507

0 commit comments

Comments
 (0)