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

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

Powered by Google App Engine
This is Rietveld 408576698