David Benjamin | 5a593af | 2014-08-11 19:51:50 -0400 | [diff] [blame] | 1 | /* Copyright (c) 2014, Google Inc. |
| 2 | * |
| 3 | * Permission to use, copy, modify, and/or distribute this software for any |
| 4 | * purpose with or without fee is hereby granted, provided that the above |
| 5 | * copyright notice and this permission notice appear in all copies. |
| 6 | * |
| 7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 10 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 12 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 13 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
| 14 | |
| 15 | #ifndef HEADER_TEST_CONFIG |
| 16 | #define HEADER_TEST_CONFIG |
| 17 | |
| 18 | #include <string> |
| 19 | |
| 20 | |
| 21 | struct TestConfig { |
| 22 | TestConfig(); |
| 23 | |
| 24 | bool is_server; |
David Benjamin | 6fd297b | 2014-08-11 18:43:38 -0400 | [diff] [blame] | 25 | bool is_dtls; |
David Benjamin | 5a593af | 2014-08-11 19:51:50 -0400 | [diff] [blame] | 26 | bool resume; |
| 27 | bool fallback_scsv; |
| 28 | std::string key_file; |
| 29 | std::string cert_file; |
| 30 | std::string expected_server_name; |
| 31 | std::string expected_certificate_types; |
| 32 | bool require_any_client_certificate; |
| 33 | std::string advertise_npn; |
| 34 | std::string expected_next_proto; |
| 35 | bool false_start; |
| 36 | std::string select_next_proto; |
| 37 | bool async; |
| 38 | bool write_different_record_sizes; |
| 39 | bool cbc_record_splitting; |
| 40 | bool partial_write; |
| 41 | bool no_tls12; |
| 42 | bool no_tls11; |
| 43 | bool no_tls1; |
| 44 | bool no_ssl3; |
David Benjamin | 6fd297b | 2014-08-11 18:43:38 -0400 | [diff] [blame] | 45 | bool cookie_exchange; |
David Benjamin | a08e49d | 2014-08-24 01:46:07 -0400 | [diff] [blame] | 46 | std::string expected_channel_id; |
| 47 | std::string send_channel_id; |
David Benjamin | e58c4f5 | 2014-08-24 03:47:07 -0400 | [diff] [blame] | 48 | bool shim_writes_first; |
David Benjamin | 5c24a1d | 2014-08-31 00:59:27 -0400 | [diff] [blame] | 49 | bool tls_d5_bug; |
David Benjamin | e78bfde | 2014-09-06 12:45:15 -0400 | [diff] [blame] | 50 | std::string host_name; |
David Benjamin | ae2888f | 2014-09-06 12:58:58 -0400 | [diff] [blame] | 51 | std::string advertise_alpn; |
| 52 | std::string expected_alpn; |
| 53 | std::string expected_advertised_alpn; |
| 54 | std::string select_alpn; |
David Benjamin | 01fe820 | 2014-09-24 15:21:44 -0400 | [diff] [blame] | 55 | bool expect_session_miss; |
Adam Langley | 7571292 | 2014-10-10 16:23:43 -0700 | [diff] [blame] | 56 | bool expect_extended_master_secret; |
David Benjamin | 48cae08 | 2014-10-27 01:06:24 -0400 | [diff] [blame^] | 57 | std::string psk; |
| 58 | std::string psk_identity; |
David Benjamin | 5a593af | 2014-08-11 19:51:50 -0400 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | bool ParseConfig(int argc, char **argv, TestConfig *out_config); |
| 62 | |
| 63 | |
| 64 | #endif // HEADER_TEST_CONFIG |