| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 quic_channel_.SetIceTiebreaker( | 127 quic_channel_.SetIceTiebreaker( |
| 128 (local_ice_role == cricket::ICEROLE_CONTROLLING) ? 1 : 2); | 128 (local_ice_role == cricket::ICEROLE_CONTROLLING) ? 1 : 2); |
| 129 | 129 |
| 130 TransportDescription local_desc( | 130 TransportDescription local_desc( |
| 131 std::vector<std::string>(), kIceUfrag, kIcePwd, cricket::ICEMODE_FULL, | 131 std::vector<std::string>(), kIceUfrag, kIcePwd, cricket::ICEMODE_FULL, |
| 132 local_connection_role, local_fingerprint_.get()); | 132 local_connection_role, local_fingerprint_.get()); |
| 133 TransportDescription remote_desc( | 133 TransportDescription remote_desc( |
| 134 std::vector<std::string>(), kIceUfrag, kIcePwd, cricket::ICEMODE_FULL, | 134 std::vector<std::string>(), kIceUfrag, kIcePwd, cricket::ICEMODE_FULL, |
| 135 remote_connection_role, remote_fingerprint); | 135 remote_connection_role, remote_fingerprint); |
| 136 | 136 |
| 137 quic_channel_.SetIceCredentials(local_desc.ice_ufrag, local_desc.ice_pwd); | 137 quic_channel_.SetIceParameters(local_desc.GetIceParameters()); |
| 138 quic_channel_.SetRemoteIceCredentials(remote_desc.ice_ufrag, | 138 quic_channel_.SetRemoteIceParameters(remote_desc.GetIceParameters()); |
| 139 remote_desc.ice_pwd); | |
| 140 } | 139 } |
| 141 | 140 |
| 142 // Creates fingerprint from certificate. | 141 // Creates fingerprint from certificate. |
| 143 rtc::SSLFingerprint* CreateFingerprint(rtc::RTCCertificate* cert) { | 142 rtc::SSLFingerprint* CreateFingerprint(rtc::RTCCertificate* cert) { |
| 144 std::string digest_algorithm; | 143 std::string digest_algorithm; |
| 145 bool get_digest_algorithm = | 144 bool get_digest_algorithm = |
| 146 cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm); | 145 cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm); |
| 147 if (!get_digest_algorithm || digest_algorithm.empty()) { | 146 if (!get_digest_algorithm || digest_algorithm.empty()) { |
| 148 return nullptr; | 147 return nullptr; |
| 149 } | 148 } |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 Connect(); | 542 Connect(); |
| 544 ASSERT_TRUE_WAIT(quic_connected(), kTimeoutMs); | 543 ASSERT_TRUE_WAIT(quic_connected(), kTimeoutMs); |
| 545 ASSERT_FALSE(peer1_.signal_closed_emitted()); | 544 ASSERT_FALSE(peer1_.signal_closed_emitted()); |
| 546 ReliableQuicStream* stream = peer1_.quic_channel()->CreateQuicStream(); | 545 ReliableQuicStream* stream = peer1_.quic_channel()->CreateQuicStream(); |
| 547 ASSERT_NE(nullptr, stream); | 546 ASSERT_NE(nullptr, stream); |
| 548 stream->CloseConnectionWithDetails(net::QuicErrorCode::QUIC_NO_ERROR, | 547 stream->CloseConnectionWithDetails(net::QuicErrorCode::QUIC_NO_ERROR, |
| 549 "Closing QUIC for testing"); | 548 "Closing QUIC for testing"); |
| 550 EXPECT_TRUE(peer1_.signal_closed_emitted()); | 549 EXPECT_TRUE(peer1_.signal_closed_emitted()); |
| 551 EXPECT_TRUE_WAIT(peer2_.signal_closed_emitted(), kTimeoutMs); | 550 EXPECT_TRUE_WAIT(peer2_.signal_closed_emitted(), kTimeoutMs); |
| 552 } | 551 } |
| OLD | NEW |