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

Side by Side Diff: net/ssl/ssl_server_config.h

Issue 1376593007: SSL in EmbeddedTestServer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup. 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
OLDNEW
(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 server-side SSL-related configuration settings.
15 struct NET_EXPORT SSLServerConfig {
16 // Defaults
17 SSLServerConfig();
18 ~SSLServerConfig();
19
20 enum ServerCertificate {
mmenke 2015/10/14 21:59:15 Suggest putting the enum above the constructor. T
svaldez 2015/10/14 22:33:39 Done.
21 CERT_OK,
22
23 CERT_MISMATCHED_NAME,
24 CERT_EXPIRED,
25
26 // A certificate with invalid notBefore and notAfter times. Windows'
27 // certificate library will not parse this certificate.
28 CERT_BAD_VALIDITY,
29
30 // Cross-signed certificate to test PKIX path building. Contains an
31 // intermediate cross-signed by an unknown root, while the client (via
32 // TestRootStore) is expected to have a self-signed version of the
33 // intermediate.
34 CERT_CHAIN_WRONG_ROOT,
35
36 // Causes the testserver to use a hostname that is a domain
37 // instead of an IP.
38 CERT_COMMON_NAME_IS_DOMAIN,
39 };
40
41 // The minimum and maximum protocol versions that are enabled.
42 // (Use the SSL_PROTOCOL_VERSION_xxx enumerators defined in ssl_config.)
43 // SSL 2.0 and SSL 3.0 are not supported. If version_max < version_min, it
44 // means no protocol versions are enabled.
45 uint16_t version_min;
46 uint16_t version_max;
mmenke 2015/10/14 21:59:15 include <stdint.h>
svaldez 2015/10/14 22:33:39 Done.
47
48 // Presorted list of cipher suites which should be explicitly prevented from
49 // being used in addition to those disabled by the net built-in policy.
50 //
51 // By default, all cipher suites supported by the underlying SSL
52 // implementation will be enabled except for:
53 // - Null encryption cipher suites.
54 // - Weak cipher suites: < 80 bits of security strength.
55 // - FORTEZZA cipher suites (obsolete).
56 // - IDEA cipher suites (RFC 5469 explains why).
57 // - Anonymous cipher suites.
58 // - ECDSA cipher suites on platforms that do not support ECDSA signed
59 // certificates, as servers may use the presence of such ciphersuites as a
60 // hint to send an ECDSA certificate.
61 // The ciphers listed in |disabled_cipher_suites| will be removed in addition
62 // to the above list.
63 //
64 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in
65 // big-endian form, they should be declared in host byte order, with the
66 // first uint8 occupying the most significant byte.
67 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to
68 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002.
69 std::vector<uint16> disabled_cipher_suites;
mmenke 2015/10/14 21:59:15 uint16_t (Like you're using above) is the latest c
mmenke 2015/10/14 21:59:15 include <vector>
svaldez 2015/10/14 22:33:39 Done.
svaldez 2015/10/14 22:33:39 Done.
70
71 // If true, causes only ECDHE cipher suites to be enabled.
72 bool require_ecdhe;
73
74 // Requires a client certificate for client authentication from the client.
75 // This doesn't currently enforce certificate validity.
76 bool require_client_cert;
77
78 // The certificate kind to use when serving requests.
79 ServerCertificate server_cert;
80 };
81
82 } // namespace net
83
84 #endif // NET_SSL_SSL_SERVER_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698