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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 SSLAdapterTestDTLS_RSA() | 363 SSLAdapterTestDTLS_RSA() |
364 : SSLAdapterTestBase(rtc::SSL_MODE_DTLS, rtc::KeyParams::RSA()) {} | 364 : SSLAdapterTestBase(rtc::SSL_MODE_DTLS, rtc::KeyParams::RSA()) {} |
365 }; | 365 }; |
366 | 366 |
367 class SSLAdapterTestDTLS_ECDSA : public SSLAdapterTestBase { | 367 class SSLAdapterTestDTLS_ECDSA : public SSLAdapterTestBase { |
368 public: | 368 public: |
369 SSLAdapterTestDTLS_ECDSA() | 369 SSLAdapterTestDTLS_ECDSA() |
370 : SSLAdapterTestBase(rtc::SSL_MODE_DTLS, rtc::KeyParams::ECDSA()) {} | 370 : SSLAdapterTestBase(rtc::SSL_MODE_DTLS, rtc::KeyParams::ECDSA()) {} |
371 }; | 371 }; |
372 | 372 |
373 #if SSL_USE_OPENSSL | |
374 | |
375 // Basic tests: TLS | 373 // Basic tests: TLS |
376 | 374 |
377 // Test that handshake works, using RSA | 375 // Test that handshake works, using RSA |
378 TEST_F(SSLAdapterTestTLS_RSA, TestTLSConnect) { | 376 TEST_F(SSLAdapterTestTLS_RSA, TestTLSConnect) { |
379 TestHandshake(true); | 377 TestHandshake(true); |
380 } | 378 } |
381 | 379 |
382 // Test that handshake works, using ECDSA | 380 // Test that handshake works, using ECDSA |
383 TEST_F(SSLAdapterTestTLS_ECDSA, TestTLSConnect) { | 381 TEST_F(SSLAdapterTestTLS_ECDSA, TestTLSConnect) { |
384 TestHandshake(true); | 382 TestHandshake(true); |
(...skipping 27 matching lines...) Expand all Loading... |
412 TEST_F(SSLAdapterTestDTLS_RSA, TestDTLSTransfer) { | 410 TEST_F(SSLAdapterTestDTLS_RSA, TestDTLSTransfer) { |
413 TestHandshake(true); | 411 TestHandshake(true); |
414 TestTransfer("Hello, world!"); | 412 TestTransfer("Hello, world!"); |
415 } | 413 } |
416 | 414 |
417 // Test transfer between client and server, using ECDSA | 415 // Test transfer between client and server, using ECDSA |
418 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) { | 416 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) { |
419 TestHandshake(true); | 417 TestHandshake(true); |
420 TestTransfer("Hello, world!"); | 418 TestTransfer("Hello, world!"); |
421 } | 419 } |
422 | |
423 #endif // SSL_USE_OPENSSL | |
OLD | NEW |