]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/ossl_shim/test_config.h
653554d995245bc8ac06a8687309fb67c17971af
[thirdparty/openssl.git] / test / ossl_shim / test_config.h
1 /*
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #ifndef OSSL_TEST_SHIM_TEST_CONFIG_H
11 #define OSSL_TEST_SHIM_TEST_CONFIG_H
12
13 #include <string>
14 #include <vector>
15
16 #include <openssl/configuration.h>
17
18
19 struct TestConfig {
20 int port = 0;
21 bool is_server = false;
22 bool is_dtls = false;
23 int resume_count = 0;
24 bool fallback_scsv = false;
25 std::string key_file;
26 std::string cert_file;
27 std::string expected_server_name;
28 std::string expected_certificate_types;
29 bool require_any_client_certificate = false;
30 std::string advertise_npn;
31 std::string expected_next_proto;
32 std::string select_next_proto;
33 bool async = false;
34 bool write_different_record_sizes = false;
35 bool partial_write = false;
36 bool no_tls13 = false;
37 bool no_tls12 = false;
38 bool no_tls11 = false;
39 bool no_tls1 = false;
40 bool no_ssl3 = false;
41 bool shim_writes_first = false;
42 std::string host_name;
43 std::string advertise_alpn;
44 std::string expected_alpn;
45 std::string expected_advertised_alpn;
46 std::string select_alpn;
47 bool decline_alpn = false;
48 bool expect_session_miss = false;
49 bool expect_extended_master_secret = false;
50 std::string psk;
51 std::string psk_identity;
52 std::string srtp_profiles;
53 int min_version = 0;
54 int max_version = 0;
55 int mtu = 0;
56 bool implicit_handshake = false;
57 std::string cipher;
58 bool handshake_never_done = false;
59 int export_keying_material = 0;
60 std::string export_label;
61 std::string export_context;
62 bool use_export_context = false;
63 bool expect_ticket_renewal = false;
64 bool expect_no_session = false;
65 #ifndef OPENSSL_NO_DEPRECATED_3_0
66 bool use_ticket_callback = false;
67 #endif
68 bool renew_ticket = false;
69 bool enable_client_custom_extension = false;
70 bool enable_server_custom_extension = false;
71 bool custom_extension_skip = false;
72 bool custom_extension_fail_add = false;
73 bool check_close_notify = false;
74 bool shim_shuts_down = false;
75 bool verify_fail = false;
76 bool verify_peer = false;
77 bool expect_verify_result = false;
78 int expect_total_renegotiations = 0;
79 bool renegotiate_freely = false;
80 bool p384_only = false;
81 bool enable_all_curves = false;
82 bool use_sparse_dh_prime = false;
83 bool use_old_client_cert_callback = false;
84 bool use_null_client_ca_list = false;
85 bool peek_then_read = false;
86 int max_cert_list = 0;
87 };
88
89 bool ParseConfig(int argc, char **argv, TestConfig *out_config);
90
91
92 #endif // OSSL_TEST_SHIM_TEST_CONFIG_H