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

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

Issue 108113006: Revert of Extract Certificate Transparency SCTs from stapled OCSP responses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extract_scts
Patch Set: Created 7 years 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
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/test/spawned_test_server/base_test_server.h" 5 #include "net/test/spawned_test_server/base_test_server.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } // namespace 54 } // namespace
55 55
56 BaseTestServer::SSLOptions::SSLOptions() 56 BaseTestServer::SSLOptions::SSLOptions()
57 : server_certificate(CERT_OK), 57 : server_certificate(CERT_OK),
58 ocsp_status(OCSP_OK), 58 ocsp_status(OCSP_OK),
59 cert_serial(0), 59 cert_serial(0),
60 request_client_certificate(false), 60 request_client_certificate(false),
61 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 61 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
62 record_resume(false), 62 record_resume(false),
63 tls_intolerant(TLS_INTOLERANT_NONE), 63 tls_intolerant(TLS_INTOLERANT_NONE),
64 fallback_scsv_enabled(false), 64 fallback_scsv_enabled(false) {}
65 staple_ocsp_response(false) {}
66 65
67 BaseTestServer::SSLOptions::SSLOptions( 66 BaseTestServer::SSLOptions::SSLOptions(
68 BaseTestServer::SSLOptions::ServerCertificate cert) 67 BaseTestServer::SSLOptions::ServerCertificate cert)
69 : server_certificate(cert), 68 : server_certificate(cert),
70 ocsp_status(OCSP_OK), 69 ocsp_status(OCSP_OK),
71 cert_serial(0), 70 cert_serial(0),
72 request_client_certificate(false), 71 request_client_certificate(false),
73 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 72 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
74 record_resume(false), 73 record_resume(false),
75 tls_intolerant(TLS_INTOLERANT_NONE), 74 tls_intolerant(TLS_INTOLERANT_NONE),
76 fallback_scsv_enabled(false), 75 fallback_scsv_enabled(false) {}
77 staple_ocsp_response(false) {}
78 76
79 BaseTestServer::SSLOptions::~SSLOptions() {} 77 BaseTestServer::SSLOptions::~SSLOptions() {}
80 78
81 base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const { 79 base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const {
82 switch (server_certificate) { 80 switch (server_certificate) {
83 case CERT_OK: 81 case CERT_OK:
84 case CERT_MISMATCHED_NAME: 82 case CERT_MISMATCHED_NAME:
85 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem")); 83 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem"));
86 case CERT_EXPIRED: 84 case CERT_EXPIRED:
87 return base::FilePath(FILE_PATH_LITERAL("expired_cert.pem")); 85 return base::FilePath(FILE_PATH_LITERAL("expired_cert.pem"));
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 if (bulk_cipher_values->GetSize()) 393 if (bulk_cipher_values->GetSize())
396 arguments->Set("ssl-bulk-cipher", bulk_cipher_values.release()); 394 arguments->Set("ssl-bulk-cipher", bulk_cipher_values.release());
397 if (ssl_options_.record_resume) 395 if (ssl_options_.record_resume)
398 arguments->Set("https-record-resume", base::Value::CreateNullValue()); 396 arguments->Set("https-record-resume", base::Value::CreateNullValue());
399 if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) { 397 if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) {
400 arguments->Set("tls-intolerant", 398 arguments->Set("tls-intolerant",
401 new base::FundamentalValue(ssl_options_.tls_intolerant)); 399 new base::FundamentalValue(ssl_options_.tls_intolerant));
402 } 400 }
403 if (ssl_options_.fallback_scsv_enabled) 401 if (ssl_options_.fallback_scsv_enabled)
404 arguments->Set("fallback-scsv", base::Value::CreateNullValue()); 402 arguments->Set("fallback-scsv", base::Value::CreateNullValue());
405 if (!ssl_options_.signed_cert_timestamps_tls_ext.empty()) { 403 if (!ssl_options_.signed_cert_timestamps.empty()) {
406 std::string b64_scts_tls_ext; 404 std::string b64_scts;
407 base::Base64Encode(ssl_options_.signed_cert_timestamps_tls_ext, 405 base::Base64Encode(ssl_options_.signed_cert_timestamps, &b64_scts);
408 &b64_scts_tls_ext); 406 arguments->SetString("signed-cert-timestamps", b64_scts);
409 arguments->SetString("signed-cert-timestamps-tls-ext", b64_scts_tls_ext);
410 } 407 }
411 if (ssl_options_.staple_ocsp_response)
412 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue());
413 } 408 }
414 409
415 return GenerateAdditionalArguments(arguments); 410 return GenerateAdditionalArguments(arguments);
416 } 411 }
417 412
418 bool BaseTestServer::GenerateAdditionalArguments( 413 bool BaseTestServer::GenerateAdditionalArguments(
419 base::DictionaryValue* arguments) const { 414 base::DictionaryValue* arguments) const {
420 return true; 415 return true;
421 } 416 }
422 417
423 } // namespace net 418 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698