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

Side by Side Diff: net/test/spawned_test_server/base_test_server.h

Issue 280853002: Preserve transport errors for OpenSSL sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rephrase a lot of comments. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ 5 #ifndef NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_
6 #define NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ 6 #define NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // NOTE: the values of these enumerators are passed to the the Python test 105 // NOTE: the values of these enumerators are passed to the the Python test
106 // server. Do not change them. 106 // server. Do not change them.
107 enum TLSIntolerantLevel { 107 enum TLSIntolerantLevel {
108 TLS_INTOLERANT_NONE = 0, 108 TLS_INTOLERANT_NONE = 0,
109 TLS_INTOLERANT_ALL = 1, // Intolerant of all TLS versions. 109 TLS_INTOLERANT_ALL = 1, // Intolerant of all TLS versions.
110 TLS_INTOLERANT_TLS1_1 = 2, // Intolerant of TLS 1.1 or higher. 110 TLS_INTOLERANT_TLS1_1 = 2, // Intolerant of TLS 1.1 or higher.
111 TLS_INTOLERANT_TLS1_2 = 3, // Intolerant of TLS 1.2 or higher. 111 TLS_INTOLERANT_TLS1_2 = 3, // Intolerant of TLS 1.2 or higher.
112 }; 112 };
113 113
114 // Values which control how the server reacts in response to a ClientHello
115 // it is intolerant of.
116 enum TLSIntoleranceType {
117 TLS_INTOLERANCE_ALERT = 0, // Send a handshake_failure alert.
118 TLS_INTOLERANCE_CLOSE = 1, // Close the connection.
119 TLS_INTOLERANCE_RESET = 2, // Send a TCP reset.
120 };
121
114 // Initialize a new SSLOptions using CERT_OK as the certificate. 122 // Initialize a new SSLOptions using CERT_OK as the certificate.
115 SSLOptions(); 123 SSLOptions();
116 124
117 // Initialize a new SSLOptions that will use the specified certificate. 125 // Initialize a new SSLOptions that will use the specified certificate.
118 explicit SSLOptions(ServerCertificate cert); 126 explicit SSLOptions(ServerCertificate cert);
119 ~SSLOptions(); 127 ~SSLOptions();
120 128
121 // Returns the relative filename of the file that contains the 129 // Returns the relative filename of the file that contains the
122 // |server_certificate|. 130 // |server_certificate|.
123 base::FilePath GetCertificateFile() const; 131 base::FilePath GetCertificateFile() const;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 172
165 // If true, pass the --https-record-resume argument to testserver.py which 173 // If true, pass the --https-record-resume argument to testserver.py which
166 // causes it to log session cache actions and echo the log on 174 // causes it to log session cache actions and echo the log on
167 // /ssl-session-cache. 175 // /ssl-session-cache.
168 bool record_resume; 176 bool record_resume;
169 177
170 // If not TLS_INTOLERANT_NONE, the server will abort any handshake that 178 // If not TLS_INTOLERANT_NONE, the server will abort any handshake that
171 // negotiates an intolerant TLS version in order to test version fallback. 179 // negotiates an intolerant TLS version in order to test version fallback.
172 TLSIntolerantLevel tls_intolerant; 180 TLSIntolerantLevel tls_intolerant;
173 181
182 // If |tls_intolerant| is not TLS_INTOLERANT_NONE, how the server reacts to
183 // an intolerant TLS version.
184 TLSIntoleranceType tls_intolerance_type;
185
174 // fallback_scsv_enabled, if true, causes the server to process the 186 // fallback_scsv_enabled, if true, causes the server to process the
175 // TLS_FALLBACK_SCSV cipher suite. This cipher suite is sent by Chrome 187 // TLS_FALLBACK_SCSV cipher suite. This cipher suite is sent by Chrome
176 // when performing TLS version fallback in response to an SSL handshake 188 // when performing TLS version fallback in response to an SSL handshake
177 // failure. If this option is enabled then the server will reject fallback 189 // failure. If this option is enabled then the server will reject fallback
178 // connections. 190 // connections.
179 bool fallback_scsv_enabled; 191 bool fallback_scsv_enabled;
180 192
181 // Temporary glue for testing: validation of SCTs is application-controlled 193 // Temporary glue for testing: validation of SCTs is application-controlled
182 // and can be appropriately mocked out, so sending fake data here does not 194 // and can be appropriately mocked out, so sending fake data here does not
183 // affect handshaking behaviour. 195 // affect handshaking behaviour.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 bool log_to_console_; 309 bool log_to_console_;
298 310
299 scoped_ptr<ScopedPortException> allowed_port_; 311 scoped_ptr<ScopedPortException> allowed_port_;
300 312
301 DISALLOW_COPY_AND_ASSIGN(BaseTestServer); 313 DISALLOW_COPY_AND_ASSIGN(BaseTestServer);
302 }; 314 };
303 315
304 } // namespace net 316 } // namespace net
305 317
306 #endif // NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ 318 #endif // NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698