Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 SSLStreamAdapter* SSLStreamAdapter::Create(StreamInterface* stream) { | 32 SSLStreamAdapter* SSLStreamAdapter::Create(StreamInterface* stream) { |
| 33 #if SSL_USE_SCHANNEL | 33 #if SSL_USE_SCHANNEL |
| 34 return NULL; | 34 return NULL; |
| 35 #elif SSL_USE_OPENSSL // !SSL_USE_SCHANNEL | 35 #elif SSL_USE_OPENSSL // !SSL_USE_SCHANNEL |
| 36 return new OpenSSLStreamAdapter(stream); | 36 return new OpenSSLStreamAdapter(stream); |
| 37 #else // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL | 37 #else // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL |
| 38 return NULL; | 38 return NULL; |
| 39 #endif | 39 #endif |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool SSLStreamAdapter::GetSslCipher(std::string* cipher) { | 42 bool SSLStreamAdapter::GetSslCipher(SslCipher* cipher) { |
| 43 return false; | 43 return false; |
| 44 } | 44 } |
| 45 | 45 |
| 46 bool SSLStreamAdapter::ExportKeyingMaterial(const std::string& label, | 46 bool SSLStreamAdapter::ExportKeyingMaterial(const std::string& label, |
| 47 const uint8* context, | 47 const uint8* context, |
| 48 size_t context_len, | 48 size_t context_len, |
| 49 bool use_context, | 49 bool use_context, |
| 50 uint8* result, | 50 uint8* result, |
| 51 size_t result_len) { | 51 size_t result_len) { |
| 52 return false; // Default is unsupported | 52 return false; // Default is unsupported |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool SSLStreamAdapter::SetDtlsSrtpCiphers( | 55 bool SSLStreamAdapter::SetDtlsSrtpCiphers( |
| 56 const std::vector<std::string>& ciphers) { | 56 const std::vector<std::string>& ciphers) { |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool SSLStreamAdapter::GetDtlsSrtpCipher(std::string* cipher) { | 60 bool SSLStreamAdapter::GetDtlsSrtpCipher(std::string* cipher) { |
| 61 return false; | 61 return false; |
| 62 } | 62 } |
| 63 | 63 |
| 64 // Note: this matches the logic above with SCHANNEL dominating | 64 // Note: this matches the logic above with SCHANNEL dominating |
| 65 #if SSL_USE_SCHANNEL | 65 #if SSL_USE_SCHANNEL |
| 66 bool SSLStreamAdapter::HaveDtls() { return false; } | 66 bool SSLStreamAdapter::HaveDtls() { return false; } |
| 67 bool SSLStreamAdapter::HaveDtlsSrtp() { return false; } | 67 bool SSLStreamAdapter::HaveDtlsSrtp() { return false; } |
| 68 bool SSLStreamAdapter::HaveExporter() { return false; } | 68 bool SSLStreamAdapter::HaveExporter() { return false; } |
| 69 std::string SSLStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version, | 69 const SslCipher& SSLStreamAdapter::GetDefaultSslCipher( |
| 70 KeyType key_type) { | 70 SSLProtocolVersion version, |
| 71 return std::string(); | 71 KeyType key_type) { |
| 72 return kNullSslCipher; | |
|
juberti
2015/09/24 13:41:15
Using the null cipher here seems dangerous. We cer
guoweis_webrtc
2015/09/24 18:27:13
This function is only used by tests. We should jus
juberti
2015/09/24 21:37:32
The function name wasn't the problem. See my comme
| |
| 72 } | 73 } |
| 73 #elif SSL_USE_OPENSSL | 74 #elif SSL_USE_OPENSSL |
| 74 bool SSLStreamAdapter::HaveDtls() { | 75 bool SSLStreamAdapter::HaveDtls() { |
| 75 return OpenSSLStreamAdapter::HaveDtls(); | 76 return OpenSSLStreamAdapter::HaveDtls(); |
| 76 } | 77 } |
| 77 bool SSLStreamAdapter::HaveDtlsSrtp() { | 78 bool SSLStreamAdapter::HaveDtlsSrtp() { |
| 78 return OpenSSLStreamAdapter::HaveDtlsSrtp(); | 79 return OpenSSLStreamAdapter::HaveDtlsSrtp(); |
| 79 } | 80 } |
| 80 bool SSLStreamAdapter::HaveExporter() { | 81 bool SSLStreamAdapter::HaveExporter() { |
| 81 return OpenSSLStreamAdapter::HaveExporter(); | 82 return OpenSSLStreamAdapter::HaveExporter(); |
| 82 } | 83 } |
| 83 std::string SSLStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version, | 84 const SslCipher& SSLStreamAdapter::GetDefaultSslCipher( |
| 84 KeyType key_type) { | 85 SSLProtocolVersion version, |
| 86 KeyType key_type) { | |
| 85 return OpenSSLStreamAdapter::GetDefaultSslCipher(version, key_type); | 87 return OpenSSLStreamAdapter::GetDefaultSslCipher(version, key_type); |
| 86 } | 88 } |
| 87 #endif // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL | 89 #endif // !SSL_USE_SCHANNEL && !SSL_USE_OPENSSL |
| 88 | 90 |
| 89 /////////////////////////////////////////////////////////////////////////////// | 91 /////////////////////////////////////////////////////////////////////////////// |
| 90 | 92 |
| 91 } // namespace rtc | 93 } // namespace rtc |
| OLD | NEW |