blob: eef22e5776eb97912b056b387fc5dc6c682b688c [file] [log] [blame]
David Benjamin5a593af2014-08-11 19:51:50 -04001/* 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
21struct TestConfig {
22 TestConfig();
23
David Benjamin87c8a642015-02-21 01:54:29 -050024 int port;
David Benjamin5a593af2014-08-11 19:51:50 -040025 bool is_server;
David Benjamin6fd297b2014-08-11 18:43:38 -040026 bool is_dtls;
David Benjamin5a593af2014-08-11 19:51:50 -040027 bool resume;
28 bool fallback_scsv;
29 std::string key_file;
30 std::string cert_file;
31 std::string expected_server_name;
32 std::string expected_certificate_types;
33 bool require_any_client_certificate;
34 std::string advertise_npn;
35 std::string expected_next_proto;
36 bool false_start;
37 std::string select_next_proto;
38 bool async;
39 bool write_different_record_sizes;
40 bool cbc_record_splitting;
41 bool partial_write;
42 bool no_tls12;
43 bool no_tls11;
44 bool no_tls1;
45 bool no_ssl3;
David Benjamina08e49d2014-08-24 01:46:07 -040046 std::string expected_channel_id;
47 std::string send_channel_id;
David Benjamine58c4f52014-08-24 03:47:07 -040048 bool shim_writes_first;
David Benjamin5c24a1d2014-08-31 00:59:27 -040049 bool tls_d5_bug;
David Benjamine78bfde2014-09-06 12:45:15 -040050 std::string host_name;
David Benjaminae2888f2014-09-06 12:58:58 -040051 std::string advertise_alpn;
52 std::string expected_alpn;
53 std::string expected_advertised_alpn;
54 std::string select_alpn;
David Benjamin01fe8202014-09-24 15:21:44 -040055 bool expect_session_miss;
Adam Langley75712922014-10-10 16:23:43 -070056 bool expect_extended_master_secret;
David Benjamin48cae082014-10-27 01:06:24 -040057 std::string psk;
58 std::string psk_identity;
Adam Langley2ae77d22014-10-28 17:29:33 -070059 bool renegotiate;
David Benjaminca6554b2014-11-08 12:31:52 -050060 bool allow_unsafe_legacy_renegotiation;
David Benjaminca6c8262014-11-15 19:06:08 -050061 std::string srtp_profiles;
David Benjamin61f95272014-11-25 01:55:35 -050062 bool enable_ocsp_stapling;
63 std::string expected_ocsp_response;
64 bool enable_signed_cert_timestamps;
65 std::string expected_signed_cert_timestamps;
Feng Lu41aa3252014-11-21 22:47:56 -080066 bool fastradio_padding;
David Benjamin1eb367c2014-12-12 18:17:51 -050067 int min_version;
68 int max_version;
David Benjamin13be1de2015-01-11 16:29:36 -050069 int mtu;
David Benjamine0e7d0d2015-02-08 19:33:25 -050070 bool implicit_handshake;
David Benjamin6f5c0f42015-02-24 01:23:21 -050071 bool use_early_callback;
72 bool fail_early_callback;
Adam Langley524e7172015-02-20 16:04:00 -080073 bool install_ddos_callback;
74 bool fail_ddos_callback;
75 bool fail_second_ddos_callback;
David Benjamin67d1fb52015-03-16 15:16:23 -040076 std::string cipher;
David Benjamin5a593af2014-08-11 19:51:50 -040077};
78
79bool ParseConfig(int argc, char **argv, TestConfig *out_config);
80
81
82#endif // HEADER_TEST_CONFIG