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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // DTLS-SRTP interface | 103 // DTLS-SRTP interface |
104 bool SetDtlsSrtpCryptoSuites(const std::vector<int>& crypto_suites) override; | 104 bool SetDtlsSrtpCryptoSuites(const std::vector<int>& crypto_suites) override; |
105 bool GetDtlsSrtpCryptoSuite(int* crypto_suite) override; | 105 bool GetDtlsSrtpCryptoSuite(int* crypto_suite) override; |
106 | 106 |
107 // Capabilities interfaces | 107 // Capabilities interfaces |
108 static bool HaveDtls(); | 108 static bool HaveDtls(); |
109 static bool HaveDtlsSrtp(); | 109 static bool HaveDtlsSrtp(); |
110 static bool HaveExporter(); | 110 static bool HaveExporter(); |
111 | 111 |
112 // TODO(guoweis): Move this away from a static class method. | 112 static bool IsAcceptableCipher(int cipher, KeyType key_type); |
113 static int GetDefaultSslCipherForTest(SSLProtocolVersion version, | 113 static bool IsAcceptableCipher(std::string cipher, KeyType key_type); |
114 KeyType key_type); | |
115 | 114 |
116 protected: | 115 protected: |
117 void OnEvent(StreamInterface* stream, int events, int err) override; | 116 void OnEvent(StreamInterface* stream, int events, int err) override; |
118 | 117 |
119 private: | 118 private: |
120 enum SSLState { | 119 enum SSLState { |
121 // Before calling one of the StartSSL methods, data flows | 120 // Before calling one of the StartSSL methods, data flows |
122 // in clear text. | 121 // in clear text. |
123 SSL_NONE, | 122 SSL_NONE, |
124 SSL_WAIT, // waiting for the stream to open to start SSL negotiation | 123 SSL_WAIT, // waiting for the stream to open to start SSL negotiation |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 205 |
207 // Max. allowed protocol version | 206 // Max. allowed protocol version |
208 SSLProtocolVersion ssl_max_version_; | 207 SSLProtocolVersion ssl_max_version_; |
209 }; | 208 }; |
210 | 209 |
211 ///////////////////////////////////////////////////////////////////////////// | 210 ///////////////////////////////////////////////////////////////////////////// |
212 | 211 |
213 } // namespace rtc | 212 } // namespace rtc |
214 | 213 |
215 #endif // WEBRTC_BASE_OPENSSLSTREAMADAPTER_H__ | 214 #endif // WEBRTC_BASE_OPENSSLSTREAMADAPTER_H__ |
OLD | NEW |