You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 line
2.8 KiB

  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. #ifndef HEADER_TEST_CONFIG
  15. #define HEADER_TEST_CONFIG
  16. #include <string>
  17. struct TestConfig {
  18. int port = 0;
  19. bool is_server = false;
  20. bool is_dtls = false;
  21. bool resume = false;
  22. bool fallback_scsv = false;
  23. std::string key_file;
  24. std::string cert_file;
  25. std::string expected_server_name;
  26. std::string expected_certificate_types;
  27. bool require_any_client_certificate = false;
  28. std::string advertise_npn;
  29. std::string expected_next_proto;
  30. bool false_start = false;
  31. std::string select_next_proto;
  32. bool async = false;
  33. bool write_different_record_sizes = false;
  34. bool cbc_record_splitting = false;
  35. bool partial_write = false;
  36. bool no_tls12 = false;
  37. bool no_tls11 = false;
  38. bool no_tls1 = false;
  39. bool no_ssl3 = false;
  40. std::string expected_channel_id;
  41. std::string send_channel_id;
  42. bool shim_writes_first = false;
  43. bool tls_d5_bug = false;
  44. std::string host_name;
  45. std::string advertise_alpn;
  46. std::string expected_alpn;
  47. std::string expected_advertised_alpn;
  48. std::string select_alpn;
  49. bool expect_session_miss = false;
  50. bool expect_extended_master_secret = false;
  51. std::string psk;
  52. std::string psk_identity;
  53. bool renegotiate = false;
  54. bool allow_unsafe_legacy_renegotiation = false;
  55. std::string srtp_profiles;
  56. bool enable_ocsp_stapling = false;
  57. std::string expected_ocsp_response;
  58. bool enable_signed_cert_timestamps = false;
  59. std::string expected_signed_cert_timestamps;
  60. bool fastradio_padding = false;
  61. int min_version = 0;
  62. int max_version = 0;
  63. int mtu = 0;
  64. bool implicit_handshake = false;
  65. bool use_early_callback = false;
  66. bool fail_early_callback = false;
  67. bool install_ddos_callback = false;
  68. bool fail_ddos_callback = false;
  69. bool fail_second_ddos_callback = false;
  70. std::string cipher;
  71. bool handshake_never_done = false;
  72. int export_keying_material = 0;
  73. std::string export_label;
  74. std::string export_context;
  75. bool use_export_context = false;
  76. bool reject_peer_renegotiations = false;
  77. bool no_legacy_server_connect = false;
  78. };
  79. bool ParseConfig(int argc, char **argv, TestConfig *out_config);
  80. #endif // HEADER_TEST_CONFIG