Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1233)

Side by Side Diff: webrtc/base/sslstreamadapter.cc

Issue 1311843006: Revert of purge nss files and dependencies (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/sslidentity_unittest.cc ('k') | webrtc/base/sslstreamadapter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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
11 #if HAVE_CONFIG_H 11 #if HAVE_CONFIG_H
12 #include "config.h" 12 #include "config.h"
13 #endif // HAVE_CONFIG_H 13 #endif // HAVE_CONFIG_H
14 14
15 #include "webrtc/base/sslstreamadapter.h" 15 #include "webrtc/base/sslstreamadapter.h"
16 #include "webrtc/base/sslconfig.h" 16 #include "webrtc/base/sslconfig.h"
17 17
18 #if SSL_USE_SCHANNEL 18 #if SSL_USE_SCHANNEL
19 19
20 // SChannel support for DTLS and peer-to-peer mode are not 20 // SChannel support for DTLS and peer-to-peer mode are not
21 // done. 21 // done.
22 #elif SSL_USE_OPENSSL // && !SSL_USE_SCHANNEL 22 #elif SSL_USE_OPENSSL // && !SSL_USE_SCHANNEL
23 23
24 #include "webrtc/base/opensslstreamadapter.h" 24 #include "webrtc/base/opensslstreamadapter.h"
25 25
26 #endif // !SSL_USE_OPENSSL && !SSL_USE_SCHANNEL 26 #elif SSL_USE_NSS // && !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL
27
28 #include "webrtc/base/nssstreamadapter.h"
29
30 #endif // !SSL_USE_OPENSSL && !SSL_USE_SCHANNEL && !SSL_USE_NSS
27 31
28 /////////////////////////////////////////////////////////////////////////////// 32 ///////////////////////////////////////////////////////////////////////////////
29 33
30 namespace rtc { 34 namespace rtc {
31 35
32 SSLStreamAdapter* SSLStreamAdapter::Create(StreamInterface* stream) { 36 SSLStreamAdapter* SSLStreamAdapter::Create(StreamInterface* stream) {
33 #if SSL_USE_SCHANNEL 37 #if SSL_USE_SCHANNEL
34 return NULL; 38 return NULL;
35 #elif SSL_USE_OPENSSL // !SSL_USE_SCHANNEL 39 #elif SSL_USE_OPENSSL // !SSL_USE_SCHANNEL
36 return new OpenSSLStreamAdapter(stream); 40 return new OpenSSLStreamAdapter(stream);
37 #else // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL 41 #elif SSL_USE_NSS // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL
42 return new NSSStreamAdapter(stream);
43 #else // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL && !SSL_USE_NSS
38 return NULL; 44 return NULL;
39 #endif 45 #endif
40 } 46 }
41 47
42 bool SSLStreamAdapter::GetSslCipher(std::string* cipher) { 48 bool SSLStreamAdapter::GetSslCipher(std::string* cipher) {
43 return false; 49 return false;
44 } 50 }
45 51
46 bool SSLStreamAdapter::ExportKeyingMaterial(const std::string& label, 52 bool SSLStreamAdapter::ExportKeyingMaterial(const std::string& label,
47 const uint8* context, 53 const uint8* context,
(...skipping 29 matching lines...) Expand all
77 bool SSLStreamAdapter::HaveDtlsSrtp() { 83 bool SSLStreamAdapter::HaveDtlsSrtp() {
78 return OpenSSLStreamAdapter::HaveDtlsSrtp(); 84 return OpenSSLStreamAdapter::HaveDtlsSrtp();
79 } 85 }
80 bool SSLStreamAdapter::HaveExporter() { 86 bool SSLStreamAdapter::HaveExporter() {
81 return OpenSSLStreamAdapter::HaveExporter(); 87 return OpenSSLStreamAdapter::HaveExporter();
82 } 88 }
83 std::string SSLStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version, 89 std::string SSLStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version,
84 KeyType key_type) { 90 KeyType key_type) {
85 return OpenSSLStreamAdapter::GetDefaultSslCipher(version, key_type); 91 return OpenSSLStreamAdapter::GetDefaultSslCipher(version, key_type);
86 } 92 }
87 #endif // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL 93 #elif SSL_USE_NSS
94 bool SSLStreamAdapter::HaveDtls() {
95 return NSSStreamAdapter::HaveDtls();
96 }
97 bool SSLStreamAdapter::HaveDtlsSrtp() {
98 return NSSStreamAdapter::HaveDtlsSrtp();
99 }
100 bool SSLStreamAdapter::HaveExporter() {
101 return NSSStreamAdapter::HaveExporter();
102 }
103 std::string SSLStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version,
104 KeyType key_type) {
105 return NSSStreamAdapter::GetDefaultSslCipher(version, key_type);
106 }
107 #endif // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL && !SSL_USE_NSS
88 108
89 /////////////////////////////////////////////////////////////////////////////// 109 ///////////////////////////////////////////////////////////////////////////////
90 110
91 } // namespace rtc 111 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/sslidentity_unittest.cc ('k') | webrtc/base/sslstreamadapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698