2016-10-28 16:57:16 +08:00
|
|
|
/*
|
|
|
|
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
2016-10-10 19:17:21 +08:00
|
|
|
*
|
2018-12-06 20:05:25 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-10-28 16:57:16 +08:00
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
2016-10-10 19:17:21 +08:00
|
|
|
|
2019-09-28 06:45:57 +08:00
|
|
|
#ifndef OSSL_TEST_SHIM_TEST_CONFIG_H
|
|
|
|
#define OSSL_TEST_SHIM_TEST_CONFIG_H
|
2016-10-10 19:17:21 +08:00
|
|
|
|
|
|
|
#include <string>
|
2016-10-12 17:56:29 +08:00
|
|
|
#include <vector>
|
2016-10-10 19:17:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
struct TestConfig {
|
|
|
|
int port = 0;
|
|
|
|
bool is_server = false;
|
|
|
|
bool is_dtls = false;
|
2016-10-12 17:56:29 +08:00
|
|
|
int resume_count = 0;
|
2016-10-10 19:17:21 +08:00
|
|
|
bool fallback_scsv = false;
|
|
|
|
std::string key_file;
|
|
|
|
std::string cert_file;
|
|
|
|
std::string expected_server_name;
|
|
|
|
std::string expected_certificate_types;
|
|
|
|
bool require_any_client_certificate = false;
|
|
|
|
std::string advertise_npn;
|
|
|
|
std::string expected_next_proto;
|
|
|
|
std::string select_next_proto;
|
|
|
|
bool async = false;
|
|
|
|
bool write_different_record_sizes = false;
|
|
|
|
bool partial_write = false;
|
2016-10-12 17:56:29 +08:00
|
|
|
bool no_tls13 = false;
|
2016-10-10 19:17:21 +08:00
|
|
|
bool no_tls12 = false;
|
|
|
|
bool no_tls11 = false;
|
|
|
|
bool no_tls1 = false;
|
|
|
|
bool no_ssl3 = false;
|
|
|
|
bool shim_writes_first = false;
|
|
|
|
std::string host_name;
|
|
|
|
std::string advertise_alpn;
|
|
|
|
std::string expected_alpn;
|
|
|
|
std::string expected_advertised_alpn;
|
|
|
|
std::string select_alpn;
|
2016-10-12 17:56:29 +08:00
|
|
|
bool decline_alpn = false;
|
2016-10-10 19:17:21 +08:00
|
|
|
bool expect_session_miss = false;
|
|
|
|
bool expect_extended_master_secret = false;
|
|
|
|
std::string psk;
|
|
|
|
std::string psk_identity;
|
|
|
|
std::string srtp_profiles;
|
|
|
|
int min_version = 0;
|
|
|
|
int max_version = 0;
|
|
|
|
int mtu = 0;
|
|
|
|
bool implicit_handshake = false;
|
|
|
|
std::string cipher;
|
|
|
|
bool handshake_never_done = false;
|
|
|
|
int export_keying_material = 0;
|
|
|
|
std::string export_label;
|
|
|
|
std::string export_context;
|
|
|
|
bool use_export_context = false;
|
|
|
|
bool expect_ticket_renewal = false;
|
|
|
|
bool expect_no_session = false;
|
|
|
|
bool use_ticket_callback = false;
|
|
|
|
bool renew_ticket = false;
|
|
|
|
bool enable_client_custom_extension = false;
|
|
|
|
bool enable_server_custom_extension = false;
|
|
|
|
bool custom_extension_skip = false;
|
|
|
|
bool custom_extension_fail_add = false;
|
|
|
|
bool check_close_notify = false;
|
|
|
|
bool shim_shuts_down = false;
|
|
|
|
bool verify_fail = false;
|
|
|
|
bool verify_peer = false;
|
|
|
|
bool expect_verify_result = false;
|
|
|
|
int expect_total_renegotiations = 0;
|
|
|
|
bool renegotiate_freely = false;
|
|
|
|
bool p384_only = false;
|
|
|
|
bool enable_all_curves = false;
|
|
|
|
bool use_sparse_dh_prime = false;
|
|
|
|
bool use_old_client_cert_callback = false;
|
2016-10-12 17:56:29 +08:00
|
|
|
bool use_null_client_ca_list = false;
|
|
|
|
bool peek_then_read = false;
|
|
|
|
int max_cert_list = 0;
|
2016-10-10 19:17:21 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
bool ParseConfig(int argc, char **argv, TestConfig *out_config);
|
|
|
|
|
|
|
|
|
2019-09-28 06:45:57 +08:00
|
|
|
#endif // OSSL_TEST_SHIM_TEST_CONFIG_H
|