webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
test_config.h
Go to the documentation of this file.
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 #include <vector>
20 
21 
22 struct TestConfig {
23  int port = 0;
24  bool is_server = false;
25  bool is_dtls = false;
26  int resume_count = 0;
27  bool fallback_scsv = false;
29  std::vector<int> signing_prefs;
37  bool false_start = false;
39  bool async = false;
41  bool cbc_record_splitting = false;
42  bool partial_write = false;
43  bool no_tls13 = false;
44  bool no_tls12 = false;
45  bool no_tls11 = false;
46  bool no_tls1 = false;
47  bool no_ssl3 = false;
49  bool enable_channel_id = false;
51  bool shim_writes_first = false;
57  bool decline_alpn = false;
58  bool expect_session_miss = false;
63  bool enable_ocsp_stapling = false;
67  int min_version = 0;
68  int max_version = 0;
69  int mtu = 0;
70  bool implicit_handshake = false;
71  bool use_early_callback = false;
72  bool fail_early_callback = false;
73  bool install_ddos_callback = false;
74  bool fail_ddos_callback = false;
79  bool handshake_never_done = false;
83  bool use_export_context = false;
84  bool tls_unique = false;
85  bool expect_ticket_renewal = false;
86  bool expect_no_session = false;
87  bool use_ticket_callback = false;
88  bool renew_ticket = false;
91  bool custom_extension_skip = false;
94  bool check_close_notify = false;
95  bool shim_shuts_down = false;
96  bool verify_fail = false;
97  bool verify_peer = false;
98  bool expect_verify_result = false;
101  bool renegotiate_once = false;
102  bool renegotiate_freely = false;
103  bool renegotiate_ignore = false;
104  bool disable_npn = false;
106  bool p384_only = false;
107  bool enable_all_curves = false;
108  bool use_sparse_dh_prime = false;
114  bool send_alert = false;
115  bool peek_then_read = false;
116  bool enable_grease = false;
117  int max_cert_list = 0;
118 };
119 
120 bool ParseConfig(int argc, char **argv, TestConfig *out_config);
121 
122 
123 #endif // HEADER_TEST_CONFIG
bool expect_extended_master_secret
Definition: test_config.h:59
std::string advertise_alpn
Definition: test_config.h:53
bool implicit_handshake
Definition: test_config.h:70
bool handshake_never_done
Definition: test_config.h:79
std::vector< int > signing_prefs
Definition: test_config.h:29
std::string ocsp_response
Definition: test_config.h:93
bool custom_extension_fail_add
Definition: test_config.h:92
int expect_curve_id
Definition: test_config.h:109
bool false_start
Definition: test_config.h:37
bool peek_then_read
Definition: test_config.h:115
bool disable_npn
Definition: test_config.h:104
std::string expected_signed_cert_timestamps
Definition: test_config.h:66
bool renegotiate_freely
Definition: test_config.h:102
std::string cipher_tls11
Definition: test_config.h:78
bool shim_writes_first
Definition: test_config.h:51
bool fail_second_ddos_callback
Definition: test_config.h:75
EGLOutputPortEXT port
Definition: eglext.h:698
bool use_null_client_ca_list
Definition: test_config.h:113
std::string psk
Definition: test_config.h:60
bool send_alert
Definition: test_config.h:114
bool is_dtls
Definition: test_config.h:25
int expect_peer_signature_algorithm
Definition: test_config.h:105
bool is_server
Definition: test_config.h:24
bool decline_alpn
Definition: test_config.h:57
bool expect_verify_result
Definition: test_config.h:98
bool ParseConfig(int argc, char **argv, TestConfig *out_config)
Definition: test_config.cc:167
bool p384_only
Definition: test_config.h:106
bool tls_unique
Definition: test_config.h:84
bool expect_no_session
Definition: test_config.h:86
int export_keying_material
Definition: test_config.h:80
bool fail_early_callback
Definition: test_config.h:72
bool use_sparse_dh_prime
Definition: test_config.h:108
std::string select_alpn
Definition: test_config.h:56
std::string digest_prefs
Definition: test_config.h:28
std::string expected_alpn
Definition: test_config.h:54
int max_cert_list
Definition: test_config.h:117
bool shim_shuts_down
Definition: test_config.h:95
std::string host_name
Definition: test_config.h:52
bool use_old_client_cert_callback
Definition: test_config.h:111
std::string advertise_npn
Definition: test_config.h:35
bool no_tls1
Definition: test_config.h:46
std::string expected_channel_id
Definition: test_config.h:48
bool install_ddos_callback
Definition: test_config.h:73
bool enable_grease
Definition: test_config.h:116
bool custom_extension_skip
Definition: test_config.h:91
bool expect_session_miss
Definition: test_config.h:58
std::string export_context
Definition: test_config.h:82
std::string psk_identity
Definition: test_config.h:61
bool enable_ocsp_stapling
Definition: test_config.h:63
bool no_tls13
Definition: test_config.h:43
std::string expected_next_proto
Definition: test_config.h:36
std::string srtp_profiles
Definition: test_config.h:62
bool check_close_notify
Definition: test_config.h:94
bool enable_signed_cert_timestamps
Definition: test_config.h:65
bool renew_ticket
Definition: test_config.h:88
int expect_dhe_group_size
Definition: test_config.h:110
bool expect_ticket_renewal
Definition: test_config.h:85
bool async
Definition: test_config.h:39
std::string expected_ocsp_response
Definition: test_config.h:64
bool require_any_client_certificate
Definition: test_config.h:34
std::string cipher
Definition: test_config.h:76
Definition: test_config.h:22
const char * argv[]
Definition: DumpRenderTree.cpp:1631
bool no_tls12
Definition: test_config.h:44
bool no_ssl3
Definition: test_config.h:47
bool partial_write
Definition: test_config.h:42
std::string cert_file
Definition: test_config.h:31
bool enable_client_custom_extension
Definition: test_config.h:89
bool use_export_context
Definition: test_config.h:83
int max_version
Definition: test_config.h:68
int expect_total_renegotiations
Definition: test_config.h:100
int resume_count
Definition: test_config.h:26
GLsizei const GLchar *const * string
Definition: gl2.h:479
bool write_different_record_sizes
Definition: test_config.h:40
bool enable_all_curves
Definition: test_config.h:107
bool no_tls11
Definition: test_config.h:45
std::string select_next_proto
Definition: test_config.h:38
bool use_ticket_callback
Definition: test_config.h:87
bool cbc_record_splitting
Definition: test_config.h:41
std::string expected_advertised_alpn
Definition: test_config.h:55
bool renegotiate_ignore
Definition: test_config.h:103
bool fail_ddos_callback
Definition: test_config.h:74
bool verify_fail
Definition: test_config.h:96
bool renegotiate_once
Definition: test_config.h:101
std::string expected_certificate_types
Definition: test_config.h:33
bool enable_server_custom_extension
Definition: test_config.h:90
bool use_early_callback
Definition: test_config.h:71
bool verify_peer
Definition: test_config.h:97
int initial_timeout_duration_ms
Definition: test_config.h:112
bool fallback_scsv
Definition: test_config.h:27
std::string send_channel_id
Definition: test_config.h:50
std::string signed_cert_timestamps
Definition: test_config.h:99
std::string export_label
Definition: test_config.h:81
bool enable_channel_id
Definition: test_config.h:49
std::string expected_server_name
Definition: test_config.h:32
int min_version
Definition: test_config.h:67
int mtu
Definition: test_config.h:69
std::string cipher_tls10
Definition: test_config.h:77
std::string key_file
Definition: test_config.h:30