25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

test_config.h 3.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. std::string srtp_profiles;
  54. bool enable_ocsp_stapling = false;
  55. std::string expected_ocsp_response;
  56. bool enable_signed_cert_timestamps = false;
  57. std::string expected_signed_cert_timestamps;
  58. int min_version = 0;
  59. int max_version = 0;
  60. int mtu = 0;
  61. bool implicit_handshake = false;
  62. bool use_early_callback = false;
  63. bool fail_early_callback = false;
  64. bool install_ddos_callback = false;
  65. bool fail_ddos_callback = false;
  66. bool fail_second_ddos_callback = false;
  67. std::string cipher;
  68. bool handshake_never_done = false;
  69. int export_keying_material = 0;
  70. std::string export_label;
  71. std::string export_context;
  72. bool use_export_context = false;
  73. bool reject_peer_renegotiations = false;
  74. bool no_legacy_server_connect = false;
  75. bool tls_unique = false;
  76. bool use_async_private_key = false;
  77. bool expect_ticket_renewal = false;
  78. bool expect_no_session = false;
  79. bool use_ticket_callback = false;
  80. bool renew_ticket = false;
  81. bool enable_client_custom_extension = false;
  82. bool enable_server_custom_extension = false;
  83. bool custom_extension_skip = false;
  84. bool custom_extension_fail_add = false;
  85. };
  86. bool ParseConfig(int argc, char **argv, TestConfig *out_config);
  87. #endif // HEADER_TEST_CONFIG