OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 // It's kCERT_PEM | 1059 // It's kCERT_PEM |
1060 ASSERT_EQ(kCERT_PEM, server_peer_cert->ToPEMString()); | 1060 ASSERT_EQ(kCERT_PEM, server_peer_cert->ToPEMString()); |
1061 | 1061 |
1062 // It must not have a chain, because the test certs are self-signed. | 1062 // It must not have a chain, because the test certs are self-signed. |
1063 rtc::SSLCertChain* server_peer_chain; | 1063 rtc::SSLCertChain* server_peer_chain; |
1064 ASSERT_FALSE(server_peer_cert->GetChain(&server_peer_chain)); | 1064 ASSERT_FALSE(server_peer_cert->GetChain(&server_peer_chain)); |
1065 } | 1065 } |
1066 | 1066 |
1067 // Test getting the used DTLS ciphers. | 1067 // Test getting the used DTLS ciphers. |
1068 // DTLS 1.2 enabled for neither client nor server -> DTLS 1.0 will be used. | 1068 // DTLS 1.2 enabled for neither client nor server -> DTLS 1.0 will be used. |
1069 TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuite) { | 1069 // Disabled due to new BoringSSLL version, see webrtc:5634 |
| 1070 TEST_P(SSLStreamAdapterTestDTLS, DISABLED_TestGetSslCipherSuite) { |
1070 MAYBE_SKIP_TEST(HaveDtls); | 1071 MAYBE_SKIP_TEST(HaveDtls); |
1071 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_10); | 1072 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_10); |
1072 TestHandshake(); | 1073 TestHandshake(); |
1073 | 1074 |
1074 int client_cipher; | 1075 int client_cipher; |
1075 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); | 1076 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
1076 int server_cipher; | 1077 int server_cipher; |
1077 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); | 1078 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
1078 | 1079 |
1079 ASSERT_EQ(client_cipher, server_cipher); | 1080 ASSERT_EQ(client_cipher, server_cipher); |
(...skipping 16 matching lines...) Expand all Loading... |
1096 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); | 1097 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
1097 | 1098 |
1098 ASSERT_EQ(client_cipher, server_cipher); | 1099 ASSERT_EQ(client_cipher, server_cipher); |
1099 ASSERT_EQ( | 1100 ASSERT_EQ( |
1100 rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( | 1101 rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
1101 rtc::SSL_PROTOCOL_DTLS_12, ::testing::get<1>(GetParam()).type()), | 1102 rtc::SSL_PROTOCOL_DTLS_12, ::testing::get<1>(GetParam()).type()), |
1102 server_cipher); | 1103 server_cipher); |
1103 } | 1104 } |
1104 | 1105 |
1105 // DTLS 1.2 enabled for client only -> DTLS 1.0 will be used. | 1106 // DTLS 1.2 enabled for client only -> DTLS 1.0 will be used. |
1106 TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuiteDtls12Client) { | 1107 // Disabled due to new BoringSSLL version, see webrtc:5634 |
| 1108 TEST_P(SSLStreamAdapterTestDTLS, DISABLED_TestGetSslCipherSuiteDtls12Client) { |
1107 MAYBE_SKIP_TEST(HaveDtls); | 1109 MAYBE_SKIP_TEST(HaveDtls); |
1108 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_12); | 1110 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_12); |
1109 TestHandshake(); | 1111 TestHandshake(); |
1110 | 1112 |
1111 int client_cipher; | 1113 int client_cipher; |
1112 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); | 1114 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
1113 int server_cipher; | 1115 int server_cipher; |
1114 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); | 1116 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
1115 | 1117 |
1116 ASSERT_EQ(client_cipher, server_cipher); | 1118 ASSERT_EQ(client_cipher, server_cipher); |
1117 ASSERT_EQ( | 1119 ASSERT_EQ( |
1118 rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( | 1120 rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
1119 rtc::SSL_PROTOCOL_DTLS_10, ::testing::get<1>(GetParam()).type()), | 1121 rtc::SSL_PROTOCOL_DTLS_10, ::testing::get<1>(GetParam()).type()), |
1120 server_cipher); | 1122 server_cipher); |
1121 } | 1123 } |
1122 | 1124 |
1123 // DTLS 1.2 enabled for server only -> DTLS 1.0 will be used. | 1125 // DTLS 1.2 enabled for server only -> DTLS 1.0 will be used. |
1124 TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuiteDtls12Server) { | 1126 // Disabled due to new BoringSSLL version, see webrtc:5634 |
| 1127 TEST_P(SSLStreamAdapterTestDTLS, DISABLED_TestGetSslCipherSuiteDtls12Server) { |
1125 MAYBE_SKIP_TEST(HaveDtls); | 1128 MAYBE_SKIP_TEST(HaveDtls); |
1126 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_12, rtc::SSL_PROTOCOL_DTLS_10); | 1129 SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_12, rtc::SSL_PROTOCOL_DTLS_10); |
1127 TestHandshake(); | 1130 TestHandshake(); |
1128 | 1131 |
1129 int client_cipher; | 1132 int client_cipher; |
1130 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); | 1133 ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
1131 int server_cipher; | 1134 int server_cipher; |
1132 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); | 1135 ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
1133 | 1136 |
1134 ASSERT_EQ(client_cipher, server_cipher); | 1137 ASSERT_EQ(client_cipher, server_cipher); |
(...skipping 17 matching lines...) Expand all Loading... |
1152 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); | 1155 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); |
1153 INSTANTIATE_TEST_CASE_P( | 1156 INSTANTIATE_TEST_CASE_P( |
1154 SSLStreamAdapterTestsDTLS, | 1157 SSLStreamAdapterTestsDTLS, |
1155 SSLStreamAdapterTestDTLS, | 1158 SSLStreamAdapterTestDTLS, |
1156 Combine(Values(rtc::KeyParams::RSA(1024, 65537), | 1159 Combine(Values(rtc::KeyParams::RSA(1024, 65537), |
1157 rtc::KeyParams::RSA(1152, 65537), | 1160 rtc::KeyParams::RSA(1152, 65537), |
1158 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)), | 1161 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)), |
1159 Values(rtc::KeyParams::RSA(1024, 65537), | 1162 Values(rtc::KeyParams::RSA(1024, 65537), |
1160 rtc::KeyParams::RSA(1152, 65537), | 1163 rtc::KeyParams::RSA(1152, 65537), |
1161 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); | 1164 rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)))); |
OLD | NEW |