Index: webrtc/base/sslstreamadapter_unittest.cc |
diff --git a/webrtc/base/sslstreamadapter_unittest.cc b/webrtc/base/sslstreamadapter_unittest.cc |
index c8fe9a01e78d466dee20242e7a3fbf6c8a7a17ed..68e1b64dbe91a38aac7d5ff076d045be0d1e3074 100644 |
--- a/webrtc/base/sslstreamadapter_unittest.cc |
+++ b/webrtc/base/sslstreamadapter_unittest.cc |
@@ -410,11 +410,11 @@ |
return server_ssl_->GetPeerCertificate(cert); |
} |
- bool GetSslCipherSuite(bool client, uint16_t* retval) { |
+ bool GetSslCipher(bool client, std::string *retval) { |
if (client) |
- return client_ssl_->GetSslCipherSuite(retval); |
+ return client_ssl_->GetSslCipher(retval); |
else |
- return server_ssl_->GetSslCipherSuite(retval); |
+ return server_ssl_->GetSslCipher(retval); |
} |
bool ExportKeyingMaterial(const char *label, |
@@ -967,70 +967,70 @@ |
// Test getting the used DTLS ciphers. |
// DTLS 1.2 enabled for neither client nor server -> DTLS 1.0 will be used. |
-TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuite) { |
+TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipher) { |
MAYBE_SKIP_TEST(HaveDtls); |
SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_10); |
TestHandshake(); |
- uint16_t client_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
- uint16_t server_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
+ std::string client_cipher; |
+ ASSERT_TRUE(GetSslCipher(true, &client_cipher)); |
+ std::string server_cipher; |
+ ASSERT_TRUE(GetSslCipher(false, &server_cipher)); |
ASSERT_EQ(client_cipher, server_cipher); |
- ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
+ ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipher( |
rtc::SSL_PROTOCOL_DTLS_10, ::testing::get<1>(GetParam())), |
server_cipher); |
} |
// Test getting the used DTLS 1.2 ciphers. |
// DTLS 1.2 enabled for client and server -> DTLS 1.2 will be used. |
-TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuiteDtls12Both) { |
+TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherDtls12Both) { |
MAYBE_SKIP_TEST(HaveDtls); |
SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_12, rtc::SSL_PROTOCOL_DTLS_12); |
TestHandshake(); |
- uint16_t client_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
- uint16_t server_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
+ std::string client_cipher; |
+ ASSERT_TRUE(GetSslCipher(true, &client_cipher)); |
+ std::string server_cipher; |
+ ASSERT_TRUE(GetSslCipher(false, &server_cipher)); |
ASSERT_EQ(client_cipher, server_cipher); |
- ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
+ ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipher( |
rtc::SSL_PROTOCOL_DTLS_12, ::testing::get<1>(GetParam())), |
server_cipher); |
} |
// DTLS 1.2 enabled for client only -> DTLS 1.0 will be used. |
-TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuiteDtls12Client) { |
+TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherDtls12Client) { |
MAYBE_SKIP_TEST(HaveDtls); |
SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_10, rtc::SSL_PROTOCOL_DTLS_12); |
TestHandshake(); |
- uint16_t client_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
- uint16_t server_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
+ std::string client_cipher; |
+ ASSERT_TRUE(GetSslCipher(true, &client_cipher)); |
+ std::string server_cipher; |
+ ASSERT_TRUE(GetSslCipher(false, &server_cipher)); |
ASSERT_EQ(client_cipher, server_cipher); |
- ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
+ ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipher( |
rtc::SSL_PROTOCOL_DTLS_10, ::testing::get<1>(GetParam())), |
server_cipher); |
} |
// DTLS 1.2 enabled for server only -> DTLS 1.0 will be used. |
-TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherSuiteDtls12Server) { |
+TEST_P(SSLStreamAdapterTestDTLS, TestGetSslCipherDtls12Server) { |
MAYBE_SKIP_TEST(HaveDtls); |
SetupProtocolVersions(rtc::SSL_PROTOCOL_DTLS_12, rtc::SSL_PROTOCOL_DTLS_10); |
TestHandshake(); |
- uint16_t client_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(true, &client_cipher)); |
- uint16_t server_cipher; |
- ASSERT_TRUE(GetSslCipherSuite(false, &server_cipher)); |
+ std::string client_cipher; |
+ ASSERT_TRUE(GetSslCipher(true, &client_cipher)); |
+ std::string server_cipher; |
+ ASSERT_TRUE(GetSslCipher(false, &server_cipher)); |
ASSERT_EQ(client_cipher, server_cipher); |
- ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
+ ASSERT_EQ(rtc::SSLStreamAdapter::GetDefaultSslCipher( |
rtc::SSL_PROTOCOL_DTLS_10, ::testing::get<1>(GetParam())), |
server_cipher); |
} |