| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 if (negotiated_dtls_ && !expected_cipher.empty()) { | 221 if (negotiated_dtls_ && !expected_cipher.empty()) { |
| 222 ASSERT_TRUE(rv); | 222 ASSERT_TRUE(rv); |
| 223 | 223 |
| 224 ASSERT_EQ(cipher, expected_cipher); | 224 ASSERT_EQ(cipher, expected_cipher); |
| 225 } else { | 225 } else { |
| 226 ASSERT_FALSE(rv); | 226 ASSERT_FALSE(rv); |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 void CheckSsl(uint16_t expected_cipher) { | 231 void CheckSsl(int expected_cipher) { |
| 232 for (std::vector<cricket::DtlsTransportChannelWrapper*>::iterator it = | 232 for (std::vector<cricket::DtlsTransportChannelWrapper*>::iterator it = |
| 233 channels_.begin(); it != channels_.end(); ++it) { | 233 channels_.begin(); it != channels_.end(); ++it) { |
| 234 uint16_t cipher; | 234 int cipher; |
| 235 | 235 |
| 236 bool rv = (*it)->GetSslCipherSuite(&cipher); | 236 bool rv = (*it)->GetSslCipherSuite(&cipher); |
| 237 if (negotiated_dtls_ && expected_cipher) { | 237 if (negotiated_dtls_ && expected_cipher) { |
| 238 ASSERT_TRUE(rv); | 238 ASSERT_TRUE(rv); |
| 239 | 239 |
| 240 ASSERT_EQ(cipher, expected_cipher); | 240 ASSERT_EQ(cipher, expected_cipher); |
| 241 } else { | 241 } else { |
| 242 ASSERT_FALSE(rv); | 242 ASSERT_FALSE(rv); |
| 243 } | 243 } |
| 244 } | 244 } |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 // Each side's remote certificate is the other side's local certificate. | 864 // Each side's remote certificate is the other side's local certificate. |
| 865 ASSERT_TRUE( | 865 ASSERT_TRUE( |
| 866 client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept())); | 866 client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept())); |
| 867 ASSERT_EQ(remote_cert1->ToPEMString(), | 867 ASSERT_EQ(remote_cert1->ToPEMString(), |
| 868 certificate2->ssl_certificate().ToPEMString()); | 868 certificate2->ssl_certificate().ToPEMString()); |
| 869 ASSERT_TRUE( | 869 ASSERT_TRUE( |
| 870 client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept())); | 870 client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept())); |
| 871 ASSERT_EQ(remote_cert2->ToPEMString(), | 871 ASSERT_EQ(remote_cert2->ToPEMString(), |
| 872 certificate1->ssl_certificate().ToPEMString()); | 872 certificate1->ssl_certificate().ToPEMString()); |
| 873 } | 873 } |
| OLD | NEW |