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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 } | 192 } |
193 negotiated_dtls_ = (local_cert && remote_cert); | 193 negotiated_dtls_ = (local_cert && remote_cert); |
194 } | 194 } |
195 | 195 |
196 bool Connect(DtlsTestClient* peer) { | 196 bool Connect(DtlsTestClient* peer) { |
197 transport_->ConnectChannels(); | 197 transport_->ConnectChannels(); |
198 transport_->SetDestination(peer->transport_.get()); | 198 transport_->SetDestination(peer->transport_.get()); |
199 return true; | 199 return true; |
200 } | 200 } |
201 | 201 |
202 bool writable() const { return transport_->writable(); } | 202 bool writable() const { return transport_->any_channels_writable(); } |
pthatcher1
2015/09/17 21:45:11
Shouldn't that be all_channels_writable()?
honghaiz3
2015/09/18 02:35:46
No. See the deleted writable() in transport.h.
| |
203 | 203 |
204 void CheckRole(rtc::SSLRole role) { | 204 void CheckRole(rtc::SSLRole role) { |
205 if (role == rtc::SSL_CLIENT) { | 205 if (role == rtc::SSL_CLIENT) { |
206 ASSERT_FALSE(received_dtls_client_hello_); | 206 ASSERT_FALSE(received_dtls_client_hello_); |
207 ASSERT_TRUE(received_dtls_server_hello_); | 207 ASSERT_TRUE(received_dtls_server_hello_); |
208 } else { | 208 } else { |
209 ASSERT_TRUE(received_dtls_client_hello_); | 209 ASSERT_TRUE(received_dtls_client_hello_); |
210 ASSERT_FALSE(received_dtls_server_hello_); | 210 ASSERT_FALSE(received_dtls_server_hello_); |
211 } | 211 } |
212 } | 212 } |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
869 // Each side's remote certificate is the other side's local certificate. | 869 // Each side's remote certificate is the other side's local certificate. |
870 ASSERT_TRUE( | 870 ASSERT_TRUE( |
871 client1_.transport()->GetRemoteCertificate(remote_cert1.accept())); | 871 client1_.transport()->GetRemoteCertificate(remote_cert1.accept())); |
872 ASSERT_EQ(remote_cert1->ToPEMString(), | 872 ASSERT_EQ(remote_cert1->ToPEMString(), |
873 certificate2->ssl_certificate().ToPEMString()); | 873 certificate2->ssl_certificate().ToPEMString()); |
874 ASSERT_TRUE( | 874 ASSERT_TRUE( |
875 client2_.transport()->GetRemoteCertificate(remote_cert2.accept())); | 875 client2_.transport()->GetRemoteCertificate(remote_cert2.accept())); |
876 ASSERT_EQ(remote_cert2->ToPEMString(), | 876 ASSERT_EQ(remote_cert2->ToPEMString(), |
877 certificate1->ssl_certificate().ToPEMString()); | 877 certificate1->ssl_certificate().ToPEMString()); |
878 } | 878 } |
OLD | NEW |