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

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

Issue 1774583002: Add IsAcceptableCipher, use instead of GetDefaultCipher. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove kDefaultSsl* constants Created 4 years, 9 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 // DTLS-SRTP interface 183 // DTLS-SRTP interface
184 virtual bool SetDtlsSrtpCryptoSuites(const std::vector<int>& crypto_suites); 184 virtual bool SetDtlsSrtpCryptoSuites(const std::vector<int>& crypto_suites);
185 virtual bool GetDtlsSrtpCryptoSuite(int* crypto_suite); 185 virtual bool GetDtlsSrtpCryptoSuite(int* crypto_suite);
186 186
187 // Capabilities testing 187 // Capabilities testing
188 static bool HaveDtls(); 188 static bool HaveDtls();
189 static bool HaveDtlsSrtp(); 189 static bool HaveDtlsSrtp();
190 static bool HaveExporter(); 190 static bool HaveExporter();
191 191
192 // Returns the default Ssl cipher used between streams of this class 192 // Returns true iff the supplied cipher is deemed to be strong.
193 // for the given protocol version. This is used by the unit tests. 193 // TODO(torbjorng): Consider removing the KeyType argument.
194 // TODO(guoweis): Move this away from a static class method. 194 static bool IsAcceptableCipher(int cipher, KeyType key_type);
195 static int GetDefaultSslCipherForTest(SSLProtocolVersion version, 195 static bool IsAcceptableCipher(std::string cipher, KeyType key_type);
196 KeyType key_type);
197 196
198 // TODO(guoweis): Move this away from a static class method. Currently this is 197 // TODO(guoweis): Move this away from a static class method. Currently this is
199 // introduced such that any caller could depend on sslstreamadapter.h without 198 // introduced such that any caller could depend on sslstreamadapter.h without
200 // depending on specific SSL implementation. 199 // depending on specific SSL implementation.
201 static std::string SslCipherSuiteToName(int cipher_suite); 200 static std::string SslCipherSuiteToName(int cipher_suite);
202 201
203 private: 202 private:
204 // If true, the server certificate need not match the configured 203 // If true, the server certificate need not match the configured
205 // server_name, and in fact missing certificate authority and other 204 // server_name, and in fact missing certificate authority and other
206 // verification errors are ignored. 205 // verification errors are ignored.
207 bool ignore_bad_cert_; 206 bool ignore_bad_cert_;
208 207
209 // If true (default), the client is required to provide a certificate during 208 // If true (default), the client is required to provide a certificate during
210 // handshake. If no certificate is given, handshake fails. This applies to 209 // handshake. If no certificate is given, handshake fails. This applies to
211 // server mode only. 210 // server mode only.
212 bool client_auth_enabled_; 211 bool client_auth_enabled_;
213 }; 212 };
214 213
215 } // namespace rtc 214 } // namespace rtc
216 215
217 #endif // WEBRTC_BASE_SSLSTREAMADAPTER_H_ 216 #endif // WEBRTC_BASE_SSLSTREAMADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698