| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 cricket::TransportDescription local_desc( | 158 cricket::TransportDescription local_desc( |
| 159 std::vector<std::string>(), kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, | 159 std::vector<std::string>(), kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, |
| 160 local_role, | 160 local_role, |
| 161 // If remote if the offerer and has no DTLS support, answer will be | 161 // If remote if the offerer and has no DTLS support, answer will be |
| 162 // without any fingerprint. | 162 // without any fingerprint. |
| 163 (action == cricket::CA_ANSWER && !remote_cert) | 163 (action == cricket::CA_ANSWER && !remote_cert) |
| 164 ? nullptr | 164 ? nullptr |
| 165 : local_fingerprint.get(), | 165 : local_fingerprint.get()); |
| 166 cricket::Candidates()); | |
| 167 | 166 |
| 168 cricket::TransportDescription remote_desc( | 167 cricket::TransportDescription remote_desc( |
| 169 std::vector<std::string>(), kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, | 168 std::vector<std::string>(), kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, |
| 170 remote_role, remote_fingerprint.get(), cricket::Candidates()); | 169 remote_role, remote_fingerprint.get()); |
| 171 | 170 |
| 172 bool expect_success = (flags & NF_EXPECT_FAILURE) ? false : true; | 171 bool expect_success = (flags & NF_EXPECT_FAILURE) ? false : true; |
| 173 // If |expect_success| is false, expect SRTD or SLTD to fail when | 172 // If |expect_success| is false, expect SRTD or SLTD to fail when |
| 174 // content action is CA_ANSWER. | 173 // content action is CA_ANSWER. |
| 175 if (action == cricket::CA_OFFER) { | 174 if (action == cricket::CA_OFFER) { |
| 176 ASSERT_TRUE(transport_->SetLocalTransportDescription( | 175 ASSERT_TRUE(transport_->SetLocalTransportDescription( |
| 177 local_desc, cricket::CA_OFFER, NULL)); | 176 local_desc, cricket::CA_OFFER, NULL)); |
| 178 ASSERT_EQ(expect_success, transport_->SetRemoteTransportDescription( | 177 ASSERT_EQ(expect_success, transport_->SetRemoteTransportDescription( |
| 179 remote_desc, cricket::CA_ANSWER, NULL)); | 178 remote_desc, cricket::CA_ANSWER, NULL)); |
| 180 } else { | 179 } else { |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 // Each side's remote certificate is the other side's local certificate. | 883 // Each side's remote certificate is the other side's local certificate. |
| 885 ASSERT_TRUE( | 884 ASSERT_TRUE( |
| 886 client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept())); | 885 client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept())); |
| 887 ASSERT_EQ(remote_cert1->ToPEMString(), | 886 ASSERT_EQ(remote_cert1->ToPEMString(), |
| 888 certificate2->ssl_certificate().ToPEMString()); | 887 certificate2->ssl_certificate().ToPEMString()); |
| 889 ASSERT_TRUE( | 888 ASSERT_TRUE( |
| 890 client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept())); | 889 client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept())); |
| 891 ASSERT_EQ(remote_cert2->ToPEMString(), | 890 ASSERT_EQ(remote_cert2->ToPEMString(), |
| 892 certificate1->ssl_certificate().ToPEMString()); | 891 certificate1->ssl_certificate().ToPEMString()); |
| 893 } | 892 } |
| OLD | NEW |