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

Side by Side Diff: webrtc/base/opensslstreamadapter.h

Issue 1380603005: Revert of Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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 | « talk/session/media/srtpfilter_unittest.cc ('k') | webrtc/base/opensslstreamadapter.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
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 size_t data_len, 80 size_t data_len,
81 size_t* read, 81 size_t* read,
82 int* error) override; 82 int* error) override;
83 StreamResult Write(const void* data, 83 StreamResult Write(const void* data,
84 size_t data_len, 84 size_t data_len,
85 size_t* written, 85 size_t* written,
86 int* error) override; 86 int* error) override;
87 void Close() override; 87 void Close() override;
88 StreamState GetState() const override; 88 StreamState GetState() const override;
89 89
90 // TODO(guoweis): Move this away from a static class method. 90 #ifndef OPENSSL_IS_BORINGSSL
91 static std::string GetSslCipherSuiteName(uint16_t cipher); 91 // Return the RFC (5246, 3268, etc.) cipher name for an OpenSSL cipher.
92 static const char* GetRfcSslCipherName(const SSL_CIPHER* cipher);
93 #endif
92 94
93 bool GetSslCipherSuite(uint16_t* cipher) override; 95 bool GetSslCipher(std::string* cipher) override;
94 96
95 // Key Extractor interface 97 // Key Extractor interface
96 bool ExportKeyingMaterial(const std::string& label, 98 bool ExportKeyingMaterial(const std::string& label,
97 const uint8* context, 99 const uint8* context,
98 size_t context_len, 100 size_t context_len,
99 bool use_context, 101 bool use_context,
100 uint8* result, 102 uint8* result,
101 size_t result_len) override; 103 size_t result_len) override;
102 104
103 // DTLS-SRTP interface 105 // DTLS-SRTP interface
104 bool SetDtlsSrtpCiphers(const std::vector<std::string>& ciphers) override; 106 bool SetDtlsSrtpCiphers(const std::vector<std::string>& ciphers) override;
105 bool GetDtlsSrtpCipher(std::string* cipher) override; 107 bool GetDtlsSrtpCipher(std::string* cipher) override;
106 108
107 // Capabilities interfaces 109 // Capabilities interfaces
108 static bool HaveDtls(); 110 static bool HaveDtls();
109 static bool HaveDtlsSrtp(); 111 static bool HaveDtlsSrtp();
110 static bool HaveExporter(); 112 static bool HaveExporter();
111 113 static std::string GetDefaultSslCipher(SSLProtocolVersion version,
112 // TODO(guoweis): Move this away from a static class method. 114 KeyType key_type);
113 static uint16_t GetDefaultSslCipherForTest(SSLProtocolVersion version,
114 KeyType key_type);
115 115
116 protected: 116 protected:
117 void OnEvent(StreamInterface* stream, int events, int err) override; 117 void OnEvent(StreamInterface* stream, int events, int err) override;
118 118
119 private: 119 private:
120 enum SSLState { 120 enum SSLState {
121 // Before calling one of the StartSSL methods, data flows 121 // Before calling one of the StartSSL methods, data flows
122 // in clear text. 122 // in clear text.
123 SSL_NONE, 123 SSL_NONE,
124 SSL_WAIT, // waiting for the stream to open to start SSL negotiation 124 SSL_WAIT, // waiting for the stream to open to start SSL negotiation
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 // Max. allowed protocol version 207 // Max. allowed protocol version
208 SSLProtocolVersion ssl_max_version_; 208 SSLProtocolVersion ssl_max_version_;
209 }; 209 };
210 210
211 ///////////////////////////////////////////////////////////////////////////// 211 /////////////////////////////////////////////////////////////////////////////
212 212
213 } // namespace rtc 213 } // namespace rtc
214 214
215 #endif // WEBRTC_BASE_OPENSSLSTREAMADAPTER_H__ 215 #endif // WEBRTC_BASE_OPENSSLSTREAMADAPTER_H__
OLDNEW
« no previous file with comments | « talk/session/media/srtpfilter_unittest.cc ('k') | webrtc/base/opensslstreamadapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698