2014-08-12 00:51:50 +01:00
|
|
|
/* Copyright (c) 2014, Google Inc.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
|
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
|
|
|
|
|
|
|
#ifndef HEADER_TEST_CONFIG
|
|
|
|
#define HEADER_TEST_CONFIG
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
struct TestConfig {
|
2015-03-23 22:46:05 +00:00
|
|
|
int port = 0;
|
|
|
|
bool is_server = false;
|
|
|
|
bool is_dtls = false;
|
|
|
|
bool resume = false;
|
|
|
|
bool fallback_scsv = false;
|
2015-09-04 17:41:04 +01:00
|
|
|
std::string digest_prefs;
|
2014-08-12 00:51:50 +01:00
|
|
|
std::string key_file;
|
|
|
|
std::string cert_file;
|
|
|
|
std::string expected_server_name;
|
|
|
|
std::string expected_certificate_types;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool require_any_client_certificate = false;
|
2014-08-12 00:51:50 +01:00
|
|
|
std::string advertise_npn;
|
|
|
|
std::string expected_next_proto;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool false_start = false;
|
2014-08-12 00:51:50 +01:00
|
|
|
std::string select_next_proto;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool async = false;
|
|
|
|
bool write_different_record_sizes = false;
|
|
|
|
bool cbc_record_splitting = false;
|
|
|
|
bool partial_write = false;
|
|
|
|
bool no_tls12 = false;
|
|
|
|
bool no_tls11 = false;
|
|
|
|
bool no_tls1 = false;
|
|
|
|
bool no_ssl3 = false;
|
2014-08-24 06:46:07 +01:00
|
|
|
std::string expected_channel_id;
|
|
|
|
std::string send_channel_id;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool shim_writes_first = false;
|
|
|
|
bool tls_d5_bug = false;
|
2014-09-06 17:45:15 +01:00
|
|
|
std::string host_name;
|
2014-09-06 17:58:58 +01:00
|
|
|
std::string advertise_alpn;
|
|
|
|
std::string expected_alpn;
|
|
|
|
std::string expected_advertised_alpn;
|
|
|
|
std::string select_alpn;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool expect_session_miss = false;
|
|
|
|
bool expect_extended_master_secret = false;
|
2014-10-27 05:06:24 +00:00
|
|
|
std::string psk;
|
|
|
|
std::string psk_identity;
|
2014-11-16 00:06:08 +00:00
|
|
|
std::string srtp_profiles;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool enable_ocsp_stapling = false;
|
2014-11-25 06:55:35 +00:00
|
|
|
std::string expected_ocsp_response;
|
2015-03-23 22:46:05 +00:00
|
|
|
bool enable_signed_cert_timestamps = false;
|
2014-11-25 06:55:35 +00:00
|
|
|
std::string expected_signed_cert_timestamps;
|
2015-03-23 22:46:05 +00:00
|
|
|
int min_version = 0;
|
|
|
|
int max_version = 0;
|
|
|
|
int mtu = 0;
|
|
|
|
bool implicit_handshake = false;
|
|
|
|
bool use_early_callback = false;
|
|
|
|
bool fail_early_callback = false;
|
|
|
|
bool install_ddos_callback = false;
|
|
|
|
bool fail_ddos_callback = false;
|
|
|
|
bool fail_second_ddos_callback = false;
|
2015-03-16 19:16:23 +00:00
|
|
|
std::string cipher;
|
2015-09-03 22:51:12 +01:00
|
|
|
std::string cipher_tls10;
|
|
|
|
std::string cipher_tls11;
|
2015-04-03 00:57:35 +01:00
|
|
|
bool handshake_never_done = false;
|
2015-04-03 09:06:36 +01:00
|
|
|
int export_keying_material = 0;
|
|
|
|
std::string export_label;
|
|
|
|
std::string export_context;
|
|
|
|
bool use_export_context = false;
|
2015-05-16 04:09:47 +01:00
|
|
|
bool no_legacy_server_connect = false;
|
2015-06-03 17:57:23 +01:00
|
|
|
bool tls_unique = false;
|
2015-06-18 23:36:15 +01:00
|
|
|
bool expect_ticket_renewal = false;
|
|
|
|
bool expect_no_session = false;
|
2015-06-16 19:16:23 +01:00
|
|
|
bool use_ticket_callback = false;
|
|
|
|
bool renew_ticket = false;
|
2015-07-31 02:10:13 +01:00
|
|
|
bool enable_client_custom_extension = false;
|
|
|
|
bool enable_server_custom_extension = false;
|
|
|
|
bool custom_extension_skip = false;
|
|
|
|
bool custom_extension_fail_add = false;
|
2015-08-12 11:47:11 +01:00
|
|
|
std::string ocsp_response;
|
2015-08-30 03:56:45 +01:00
|
|
|
bool check_close_notify = false;
|
|
|
|
bool shim_shuts_down = false;
|
2015-09-01 15:23:00 +01:00
|
|
|
bool microsoft_big_sslv3_buffer = false;
|
2015-08-18 12:21:54 +01:00
|
|
|
bool verify_fail = false;
|
|
|
|
bool verify_peer = false;
|
|
|
|
bool expect_verify_result = false;
|
2015-09-09 13:44:55 +01:00
|
|
|
std::string signed_cert_timestamps;
|
2015-10-13 00:49:00 +01:00
|
|
|
int expect_total_renegotiations = 0;
|
2015-10-13 00:54:18 +01:00
|
|
|
bool renegotiate_once = false;
|
|
|
|
bool renegotiate_freely = false;
|
2015-10-26 17:33:21 +00:00
|
|
|
bool disable_npn = false;
|
2014-08-12 00:51:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bool ParseConfig(int argc, char **argv, TestConfig *out_config);
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HEADER_TEST_CONFIG
|