OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test_server.h" | 5 #include "net/test/test_server.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 return "127.0.0.1"; | 51 return "127.0.0.1"; |
52 } | 52 } |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 TestServer::HTTPSOptions::HTTPSOptions() | 56 TestServer::HTTPSOptions::HTTPSOptions() |
57 : server_certificate(CERT_OK), | 57 : server_certificate(CERT_OK), |
58 request_client_certificate(false), | 58 request_client_certificate(false), |
59 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY) {} | 59 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), |
| 60 record_resume(false) {} |
60 | 61 |
61 TestServer::HTTPSOptions::HTTPSOptions( | 62 TestServer::HTTPSOptions::HTTPSOptions( |
62 TestServer::HTTPSOptions::ServerCertificate cert) | 63 TestServer::HTTPSOptions::ServerCertificate cert) |
63 : server_certificate(cert), | 64 : server_certificate(cert), |
64 request_client_certificate(false), | 65 request_client_certificate(false), |
65 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY) {} | 66 bulk_ciphers(HTTPSOptions::BULK_CIPHER_ANY), |
| 67 record_resume(false) {} |
66 | 68 |
67 TestServer::HTTPSOptions::~HTTPSOptions() {} | 69 TestServer::HTTPSOptions::~HTTPSOptions() {} |
68 | 70 |
69 FilePath TestServer::HTTPSOptions::GetCertificateFile() const { | 71 FilePath TestServer::HTTPSOptions::GetCertificateFile() const { |
70 switch (server_certificate) { | 72 switch (server_certificate) { |
71 case CERT_OK: | 73 case CERT_OK: |
72 case CERT_MISMATCHED_NAME: | 74 case CERT_MISMATCHED_NAME: |
73 return FilePath(FILE_PATH_LITERAL("ok_cert.pem")); | 75 return FilePath(FILE_PATH_LITERAL("ok_cert.pem")); |
74 case CERT_EXPIRED: | 76 case CERT_EXPIRED: |
75 return FilePath(FILE_PATH_LITERAL("expired_cert.pem")); | 77 return FilePath(FILE_PATH_LITERAL("expired_cert.pem")); |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 404 |
403 const std::string kBulkCipherSwitch("--ssl-bulk-cipher"); | 405 const std::string kBulkCipherSwitch("--ssl-bulk-cipher"); |
404 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_RC4) | 406 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_RC4) |
405 command_line->AppendArg(kBulkCipherSwitch + "=rc4"); | 407 command_line->AppendArg(kBulkCipherSwitch + "=rc4"); |
406 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES128) | 408 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES128) |
407 command_line->AppendArg(kBulkCipherSwitch + "=aes128"); | 409 command_line->AppendArg(kBulkCipherSwitch + "=aes128"); |
408 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) | 410 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) |
409 command_line->AppendArg(kBulkCipherSwitch + "=aes256"); | 411 command_line->AppendArg(kBulkCipherSwitch + "=aes256"); |
410 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) | 412 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) |
411 command_line->AppendArg(kBulkCipherSwitch + "=3des"); | 413 command_line->AppendArg(kBulkCipherSwitch + "=3des"); |
| 414 |
| 415 if (https_options_.record_resume) |
| 416 command_line->AppendArg("--https-record-resume"); |
412 } | 417 } |
413 | 418 |
414 return true; | 419 return true; |
415 } | 420 } |
416 | 421 |
417 } // namespace net | 422 } // namespace net |
OLD | NEW |