| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 ssl_stream_adapter_->set_client_auth_enabled(false); | 245 ssl_stream_adapter_->set_client_auth_enabled(false); |
| 246 | 246 |
| 247 ssl_stream_adapter_->SetIdentity(ssl_identity_->GetReference()); | 247 ssl_stream_adapter_->SetIdentity(ssl_identity_->GetReference()); |
| 248 | 248 |
| 249 // Set a bogus peer certificate digest. | 249 // Set a bogus peer certificate digest. |
| 250 unsigned char digest[20]; | 250 unsigned char digest[20]; |
| 251 size_t digest_len = sizeof(digest); | 251 size_t digest_len = sizeof(digest); |
| 252 ssl_stream_adapter_->SetPeerCertificateDigest(rtc::DIGEST_SHA_1, digest, | 252 ssl_stream_adapter_->SetPeerCertificateDigest(rtc::DIGEST_SHA_1, digest, |
| 253 digest_len); | 253 digest_len); |
| 254 | 254 |
| 255 ssl_stream_adapter_->StartSSLWithPeer(); | 255 ssl_stream_adapter_->StartSSL(); |
| 256 | 256 |
| 257 ssl_stream_adapter_->SignalEvent.connect(this, | 257 ssl_stream_adapter_->SignalEvent.connect(this, |
| 258 &SSLAdapterTestDummyServer::OnSSLStreamAdapterEvent); | 258 &SSLAdapterTestDummyServer::OnSSLStreamAdapterEvent); |
| 259 } | 259 } |
| 260 | 260 |
| 261 const rtc::SSLMode ssl_mode_; | 261 const rtc::SSLMode ssl_mode_; |
| 262 | 262 |
| 263 std::unique_ptr<rtc::AsyncSocket> server_socket_; | 263 std::unique_ptr<rtc::AsyncSocket> server_socket_; |
| 264 std::unique_ptr<rtc::SSLStreamAdapter> ssl_stream_adapter_; | 264 std::unique_ptr<rtc::SSLStreamAdapter> ssl_stream_adapter_; |
| 265 | 265 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 TestTransfer("Hello, world!"); | 414 TestTransfer("Hello, world!"); |
| 415 } | 415 } |
| 416 | 416 |
| 417 // Test transfer between client and server, using ECDSA | 417 // Test transfer between client and server, using ECDSA |
| 418 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) { | 418 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) { |
| 419 TestHandshake(true); | 419 TestHandshake(true); |
| 420 TestTransfer("Hello, world!"); | 420 TestTransfer("Hello, world!"); |
| 421 } | 421 } |
| 422 | 422 |
| 423 #endif // SSL_USE_OPENSSL | 423 #endif // SSL_USE_OPENSSL |
| OLD | NEW |