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 {
|
|
|
|
TestConfig();
|
|
|
|
|
|
|
|
bool is_server;
|
2014-08-11 23:43:38 +01:00
|
|
|
bool is_dtls;
|
2014-08-12 00:51:50 +01:00
|
|
|
bool resume;
|
|
|
|
bool fallback_scsv;
|
|
|
|
std::string key_file;
|
|
|
|
std::string cert_file;
|
|
|
|
std::string expected_server_name;
|
|
|
|
std::string expected_certificate_types;
|
|
|
|
bool require_any_client_certificate;
|
|
|
|
std::string advertise_npn;
|
|
|
|
std::string expected_next_proto;
|
|
|
|
bool false_start;
|
|
|
|
std::string select_next_proto;
|
|
|
|
bool async;
|
|
|
|
bool write_different_record_sizes;
|
|
|
|
bool cbc_record_splitting;
|
|
|
|
bool partial_write;
|
|
|
|
bool no_tls12;
|
|
|
|
bool no_tls11;
|
|
|
|
bool no_tls1;
|
|
|
|
bool no_ssl3;
|
2014-08-24 06:46:07 +01:00
|
|
|
std::string expected_channel_id;
|
|
|
|
std::string send_channel_id;
|
2014-08-24 08:47:07 +01:00
|
|
|
bool shim_writes_first;
|
2014-08-31 05:59:27 +01:00
|
|
|
bool tls_d5_bug;
|
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;
|
2014-09-24 20:21:44 +01:00
|
|
|
bool expect_session_miss;
|
2014-10-11 00:23:43 +01:00
|
|
|
bool expect_extended_master_secret;
|
2014-10-27 05:06:24 +00:00
|
|
|
std::string psk;
|
|
|
|
std::string psk_identity;
|
2014-10-29 00:29:33 +00:00
|
|
|
bool renegotiate;
|
2014-11-08 17:31:52 +00:00
|
|
|
bool allow_unsafe_legacy_renegotiation;
|
2014-11-16 00:06:08 +00:00
|
|
|
std::string srtp_profiles;
|
2014-11-25 06:55:35 +00:00
|
|
|
bool enable_ocsp_stapling;
|
|
|
|
std::string expected_ocsp_response;
|
|
|
|
bool enable_signed_cert_timestamps;
|
|
|
|
std::string expected_signed_cert_timestamps;
|
2014-11-22 06:47:56 +00:00
|
|
|
bool fastradio_padding;
|
2014-12-12 23:17:51 +00:00
|
|
|
int min_version;
|
|
|
|
int max_version;
|
2015-01-11 21:29:36 +00:00
|
|
|
int mtu;
|
2015-02-09 00:33:25 +00:00
|
|
|
bool implicit_handshake;
|
2014-08-12 00:51:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bool ParseConfig(int argc, char **argv, TestConfig *out_config);
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HEADER_TEST_CONFIG
|