| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_SSL_SSL_SERVER_CONFIG_H_ |
| 6 #define NET_SSL_SSL_SERVER_CONFIG_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "net/base/net_export.h" |
| 10 #include "net/ssl/ssl_config.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 // A collection of SSLServer-related configuration settings. |
| 15 struct NET_EXPORT SSLServerConfig { |
| 16 // Defaults |
| 17 SSLServerConfig(); |
| 18 ~SSLServerConfig(); |
| 19 |
| 20 enum ServerCertificate { |
| 21 CERT_OK, |
| 22 CERT_MISMATCHED_NAME, |
| 23 CERT_COMMON_NAME_IS_DOMAIN, |
| 24 CERT_EXPIRED, |
| 25 CERT_BAD_VALIDITY, |
| 26 CERT_CHAIN_WRONG_ROOT, |
| 27 }; |
| 28 |
| 29 // The minimum and maximum protocol versions that are enabled. |
| 30 // (Use the SSL_PROTOCOL_VERSION_xxx enumerators defined above.) |
| 31 // SSL 2.0 and SSL 3.0 are not supported. If version_max < version_min, it |
| 32 // means no protocol versions are enabled. |
| 33 uint16 version_min; |
| 34 uint16 version_max; |
| 35 |
| 36 // Presorted list of cipher suites which should be explicitly prevented from |
| 37 // being used in addition to those disabled by the net built-in policy. |
| 38 // |
| 39 // By default, all cipher suites supported by the underlying SSL |
| 40 // implementation will be enabled except for: |
| 41 // - Null encryption cipher suites. |
| 42 // - Weak cipher suites: < 80 bits of security strength. |
| 43 // - FORTEZZA cipher suites (obsolete). |
| 44 // - IDEA cipher suites (RFC 5469 explains why). |
| 45 // - Anonymous cipher suites. |
| 46 // - ECDSA cipher suites on platforms that do not support ECDSA signed |
| 47 // certificates, as servers may use the presence of such ciphersuites as a |
| 48 // hint to send an ECDSA certificate. |
| 49 // The ciphers listed in |disabled_cipher_suites| will be removed in addition |
| 50 // to the above list. |
| 51 // |
| 52 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in |
| 53 // big-endian form, they should be declared in host byte order, with the |
| 54 // first uint8 occupying the most significant byte. |
| 55 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to |
| 56 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. |
| 57 std::vector<uint16> disabled_cipher_suites; |
| 58 |
| 59 // If true, causes only ECDHE cipher suites to be enabled. |
| 60 bool require_ecdhe; |
| 61 |
| 62 // Requires a Client Cert for Client Auth. |
| 63 bool require_client_cert; |
| 64 |
| 65 // The certificate kind to use when serving requests. |
| 66 ServerCertificate server_cert; |
| 67 }; |
| 68 |
| 69 } // namespace net |
| 70 |
| 71 #endif // NET_SSL_SSL_SERVER_CONFIG_H_ |
| OLD | NEW |