OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_test_server.h" | 5 #include "net/test/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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 values->Append(base::Value::CreateStringValue("3des")); | 51 values->Append(base::Value::CreateStringValue("3des")); |
52 } | 52 } |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 BaseTestServer::HTTPSOptions::HTTPSOptions() | 56 BaseTestServer::HTTPSOptions::HTTPSOptions() |
57 : server_certificate(CERT_OK), | 57 : server_certificate(CERT_OK), |
58 ocsp_status(OCSP_OK), | 58 ocsp_status(OCSP_OK), |
59 request_client_certificate(false), | 59 request_client_certificate(false), |
60 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), | 60 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), |
61 record_resume(false) {} | 61 record_resume(false), |
| 62 tls_intolerant(false) {} |
62 | 63 |
63 BaseTestServer::HTTPSOptions::HTTPSOptions( | 64 BaseTestServer::HTTPSOptions::HTTPSOptions( |
64 BaseTestServer::HTTPSOptions::ServerCertificate cert) | 65 BaseTestServer::HTTPSOptions::ServerCertificate cert) |
65 : server_certificate(cert), | 66 : server_certificate(cert), |
66 request_client_certificate(false), | 67 request_client_certificate(false), |
67 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), | 68 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), |
68 record_resume(false) {} | 69 record_resume(false), |
| 70 tls_intolerant(false) {} |
69 | 71 |
70 BaseTestServer::HTTPSOptions::~HTTPSOptions() {} | 72 BaseTestServer::HTTPSOptions::~HTTPSOptions() {} |
71 | 73 |
72 FilePath BaseTestServer::HTTPSOptions::GetCertificateFile() const { | 74 FilePath BaseTestServer::HTTPSOptions::GetCertificateFile() const { |
73 switch (server_certificate) { | 75 switch (server_certificate) { |
74 case CERT_OK: | 76 case CERT_OK: |
75 case CERT_MISMATCHED_NAME: | 77 case CERT_MISMATCHED_NAME: |
76 return FilePath(FILE_PATH_LITERAL("ok_cert.pem")); | 78 return FilePath(FILE_PATH_LITERAL("ok_cert.pem")); |
77 case CERT_EXPIRED: | 79 case CERT_EXPIRED: |
78 return FilePath(FILE_PATH_LITERAL("expired_cert.pem")); | 80 return FilePath(FILE_PATH_LITERAL("expired_cert.pem")); |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 if (ssl_client_certs->GetSize()) | 370 if (ssl_client_certs->GetSize()) |
369 arguments->Set("ssl-client-ca", ssl_client_certs.release()); | 371 arguments->Set("ssl-client-ca", ssl_client_certs.release()); |
370 | 372 |
371 // Check bulk cipher argument. | 373 // Check bulk cipher argument. |
372 scoped_ptr<base::ListValue> bulk_cipher_values(new base::ListValue()); | 374 scoped_ptr<base::ListValue> bulk_cipher_values(new base::ListValue()); |
373 GetCiphersList(https_options_.bulk_ciphers, bulk_cipher_values.get()); | 375 GetCiphersList(https_options_.bulk_ciphers, bulk_cipher_values.get()); |
374 if (bulk_cipher_values->GetSize()) | 376 if (bulk_cipher_values->GetSize()) |
375 arguments->Set("ssl-bulk-cipher", bulk_cipher_values.release()); | 377 arguments->Set("ssl-bulk-cipher", bulk_cipher_values.release()); |
376 if (https_options_.record_resume) | 378 if (https_options_.record_resume) |
377 arguments->Set("https-record-resume", base::Value::CreateNullValue()); | 379 arguments->Set("https-record-resume", base::Value::CreateNullValue()); |
| 380 if (https_options_.tls_intolerant) |
| 381 arguments->Set("tls-intolerant", base::Value::CreateNullValue()); |
378 } | 382 } |
379 return true; | 383 return true; |
380 } | 384 } |
381 | 385 |
382 } // namespace net | 386 } // namespace net |
OLD | NEW |