Reorder flags to match TestConfig struct.

Whether the order makes sense is another matter, but keep them aligned
so future flags have an easier time with it.

Change-Id: I3c3912039b593a55af86078b2e9768c76ee2ee14
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/50770
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
fips-20220613
David Benjamin 3 years ago committed by Boringssl LUCI CQ
parent 8ed06e0fd0
commit 203b92b70a
  1. 189
      ssl/test/test_config.cc
  2. 4
      ssl/test/test_config.h

@ -175,21 +175,44 @@ Flag StringPairVectorFlag(
}
std::vector<Flag> SortedFlags() {
// TODO(davidben): Reorder these to match the struct.
std::vector<Flag> flags = {
IntFlag("-port", &TestConfig::port),
BoolFlag("-server", &TestConfig::is_server),
BoolFlag("-dtls", &TestConfig::is_dtls),
BoolFlag("-quic", &TestConfig::is_quic),
IntFlag("-resume-count", &TestConfig::resume_count),
StringFlag("-write-settings", &TestConfig::write_settings),
BoolFlag("-fallback-scsv", &TestConfig::fallback_scsv),
IntVectorFlag("-signing-prefs", &TestConfig::signing_prefs),
IntVectorFlag("-verify-prefs", &TestConfig::verify_prefs),
IntVectorFlag("-expect-peer-verify-pref",
&TestConfig::expect_peer_verify_prefs),
IntVectorFlag("-curves", &TestConfig::curves),
StringFlag("-key-file", &TestConfig::key_file),
StringFlag("-cert-file", &TestConfig::cert_file),
StringFlag("-expect-server-name", &TestConfig::expect_server_name),
BoolFlag("-enable-ech-grease", &TestConfig::enable_ech_grease),
Base64VectorFlag("-ech-server-config", &TestConfig::ech_server_configs),
Base64VectorFlag("-ech-server-key", &TestConfig::ech_server_keys),
IntVectorFlag("-ech-is-retry-config", &TestConfig::ech_is_retry_config),
BoolFlag("-expect-ech-accept", &TestConfig::expect_ech_accept),
StringFlag("-expect-ech-name-override",
&TestConfig::expect_ech_name_override),
BoolFlag("-expect-no-ech-name-override",
&TestConfig::expect_no_ech_name_override),
Base64Flag("-expect-ech-retry-configs",
&TestConfig::expect_ech_retry_configs),
BoolFlag("-expect-no-ech-retry-configs",
&TestConfig::expect_no_ech_retry_configs),
Base64Flag("-ech-config-list", &TestConfig::ech_config_list),
Base64Flag("-expect-certificate-types",
&TestConfig::expect_certificate_types),
BoolFlag("-require-any-client-certificate",
&TestConfig::require_any_client_certificate),
StringFlag("-advertise-npn", &TestConfig::advertise_npn),
StringFlag("-expect-next-proto", &TestConfig::expect_next_proto),
BoolFlag("-false-start", &TestConfig::false_start),
StringFlag("-select-next-proto", &TestConfig::select_next_proto),
BoolFlag("-async", &TestConfig::async),
BoolFlag("-write-different-record-sizes",
&TestConfig::write_different_record_sizes),
@ -200,54 +223,111 @@ std::vector<Flag> SortedFlags() {
BoolFlag("-no-tls11", &TestConfig::no_tls11),
BoolFlag("-no-tls1", &TestConfig::no_tls1),
BoolFlag("-no-ticket", &TestConfig::no_ticket),
Base64Flag("-expect-channel-id", &TestConfig::expect_channel_id),
BoolFlag("-enable-channel-id", &TestConfig::enable_channel_id),
StringFlag("-send-channel-id", &TestConfig::send_channel_id),
BoolFlag("-shim-writes-first", &TestConfig::shim_writes_first),
BoolFlag("-expect-session-miss", &TestConfig::expect_session_miss),
StringFlag("-host-name", &TestConfig::host_name),
StringFlag("-advertise-alpn", &TestConfig::advertise_alpn),
StringFlag("-expect-alpn", &TestConfig::expect_alpn),
StringFlag("-expect-late-alpn", &TestConfig::expect_late_alpn),
StringFlag("-expect-advertised-alpn",
&TestConfig::expect_advertised_alpn),
StringFlag("-select-alpn", &TestConfig::select_alpn),
BoolFlag("-decline-alpn", &TestConfig::decline_alpn),
BoolFlag("-reject-alpn", &TestConfig::reject_alpn),
BoolFlag("-select-empty-alpn", &TestConfig::select_empty_alpn),
BoolFlag("-defer-alps", &TestConfig::defer_alps),
StringPairVectorFlag("-application-settings",
&TestConfig::application_settings),
OptionalStringFlag("-expect-peer-application-settings",
&TestConfig::expect_peer_application_settings),
Base64Flag("-quic-transport-params", &TestConfig::quic_transport_params),
Base64Flag("-expect-quic-transport-params",
&TestConfig::expect_quic_transport_params),
IntFlag("-quic-use-legacy-codepoint",
&TestConfig::quic_use_legacy_codepoint),
BoolFlag("-expect-session-miss", &TestConfig::expect_session_miss),
BoolFlag("-expect-extended-master-secret",
&TestConfig::expect_extended_master_secret),
StringFlag("-psk", &TestConfig::psk),
StringFlag("-psk-identity", &TestConfig::psk_identity),
StringFlag("-srtp-profiles", &TestConfig::srtp_profiles),
BoolFlag("-enable-ocsp-stapling", &TestConfig::enable_ocsp_stapling),
BoolFlag("-enable-signed-cert-timestamps",
&TestConfig::enable_signed_cert_timestamps),
Base64Flag("-expect-signed-cert-timestamps",
&TestConfig::expect_signed_cert_timestamps),
IntFlag("-min-version", &TestConfig::min_version),
IntFlag("-max-version", &TestConfig::max_version),
IntFlag("-expect-version", &TestConfig::expect_version),
IntFlag("-mtu", &TestConfig::mtu),
BoolFlag("-implicit-handshake", &TestConfig::implicit_handshake),
BoolFlag("-use-early-callback", &TestConfig::use_early_callback),
BoolFlag("-fail-early-callback", &TestConfig::fail_early_callback),
BoolFlag("-install-ddos-callback", &TestConfig::install_ddos_callback),
BoolFlag("-fail-ddos-callback", &TestConfig::fail_ddos_callback),
BoolFlag("-fail-cert-callback", &TestConfig::fail_cert_callback),
StringFlag("-cipher", &TestConfig::cipher),
BoolFlag("-handshake-never-done", &TestConfig::handshake_never_done),
IntFlag("-export-keying-material", &TestConfig::export_keying_material),
StringFlag("-export-label", &TestConfig::export_label),
StringFlag("-export-context", &TestConfig::export_context),
BoolFlag("-use-export-context", &TestConfig::use_export_context),
BoolFlag("-tls-unique", &TestConfig::tls_unique),
BoolFlag("-expect-ticket-renewal", &TestConfig::expect_ticket_renewal),
BoolFlag("-expect-no-session", &TestConfig::expect_no_session),
BoolFlag("-expect-ticket-supports-early-data",
&TestConfig::expect_ticket_supports_early_data),
BoolFlag("-expect-accept-early-data",
&TestConfig::expect_accept_early_data),
BoolFlag("-expect-reject-early-data",
&TestConfig::expect_reject_early_data),
BoolFlag("-expect-no-offer-early-data",
&TestConfig::expect_no_offer_early_data),
BoolFlag("-use-ticket-callback", &TestConfig::use_ticket_callback),
BoolFlag("-renew-ticket", &TestConfig::renew_ticket),
BoolFlag("-enable-early-data", &TestConfig::enable_early_data),
Base64Flag("-ocsp-response", &TestConfig::ocsp_response),
Base64Flag("-expect-ocsp-response", &TestConfig::expect_ocsp_response),
BoolFlag("-check-close-notify", &TestConfig::check_close_notify),
BoolFlag("-shim-shuts-down", &TestConfig::shim_shuts_down),
BoolFlag("-verify-fail", &TestConfig::verify_fail),
BoolFlag("-verify-peer", &TestConfig::verify_peer),
BoolFlag("-verify-peer-if-no-obc", &TestConfig::verify_peer_if_no_obc),
BoolFlag("-expect-verify-result", &TestConfig::expect_verify_result),
Base64Flag("-signed-cert-timestamps",
&TestConfig::signed_cert_timestamps),
IntFlag("-expect-total-renegotiations",
&TestConfig::expect_total_renegotiations),
BoolFlag("-renegotiate-once", &TestConfig::renegotiate_once),
BoolFlag("-renegotiate-freely", &TestConfig::renegotiate_freely),
BoolFlag("-renegotiate-ignore", &TestConfig::renegotiate_ignore),
BoolFlag("-renegotiate-explicit", &TestConfig::renegotiate_explicit),
BoolFlag("-forbid-renegotiation-after-handshake",
&TestConfig::forbid_renegotiation_after_handshake),
IntFlag("-expect-peer-signature-algorithm",
&TestConfig::expect_peer_signature_algorithm),
IntFlag("-expect-curve-id", &TestConfig::expect_curve_id),
BoolFlag("-use-old-client-cert-callback",
&TestConfig::use_old_client_cert_callback),
IntFlag("-initial-timeout-duration-ms",
&TestConfig::initial_timeout_duration_ms),
StringFlag("-use-client-ca-list", &TestConfig::use_client_ca_list),
StringFlag("-expect-client-ca-list", &TestConfig::expect_client_ca_list),
BoolFlag("-send-alert", &TestConfig::send_alert),
BoolFlag("-peek-then-read", &TestConfig::peek_then_read),
BoolFlag("-enable-grease", &TestConfig::enable_grease),
BoolFlag("-permute-extensions", &TestConfig::permute_extensions),
IntFlag("-max-cert-list", &TestConfig::max_cert_list),
Base64Flag("-ticket-key", &TestConfig::ticket_key),
BoolFlag("-use-exporter-between-reads",
&TestConfig::use_exporter_between_reads),
IntFlag("-expect-cipher-aes", &TestConfig::expect_cipher_aes),
IntFlag("-expect-cipher-no-aes", &TestConfig::expect_cipher_no_aes),
IntFlag("-expect-cipher", &TestConfig::expect_cipher),
StringFlag("-expect-peer-cert-file", &TestConfig::expect_peer_cert_file),
IntFlag("-resumption-delay", &TestConfig::resumption_delay),
BoolFlag("-retain-only-sha256-client-cert",
&TestConfig::retain_only_sha256_client_cert),
BoolFlag("-expect-sha256-client-cert",
@ -258,20 +338,18 @@ std::vector<Flag> SortedFlags() {
&TestConfig::expect_secure_renegotiation),
BoolFlag("-expect-no-secure-renegotiation",
&TestConfig::expect_no_secure_renegotiation),
IntFlag("-max-send-fragment", &TestConfig::max_send_fragment),
IntFlag("-read-size", &TestConfig::read_size),
BoolFlag("-expect-session-id", &TestConfig::expect_session_id),
BoolFlag("-expect-no-session-id", &TestConfig::expect_no_session_id),
BoolFlag("-expect-accept-early-data",
&TestConfig::expect_accept_early_data),
BoolFlag("-expect-reject-early-data",
&TestConfig::expect_reject_early_data),
BoolFlag("-expect-no-offer-early-data",
&TestConfig::expect_no_offer_early_data),
IntFlag("-expect-ticket-age-skew", &TestConfig::expect_ticket_age_skew),
BoolFlag("-no-op-extra-handshake", &TestConfig::no_op_extra_handshake),
BoolFlag("-handshake-twice", &TestConfig::handshake_twice),
BoolFlag("-allow-unknown-alpn-protos",
&TestConfig::allow_unknown_alpn_protos),
BoolFlag("-use-custom-verify-callback",
&TestConfig::use_custom_verify_callback),
StringFlag("-expect-msg-callback", &TestConfig::expect_msg_callback),
BoolFlag("-allow-false-start-without-alpn",
&TestConfig::allow_false_start_without_alpn),
BoolFlag("-handoff", &TestConfig::handoff),
@ -283,109 +361,30 @@ std::vector<Flag> SortedFlags() {
BoolFlag("-fail-ocsp-callback", &TestConfig::fail_ocsp_callback),
BoolFlag("-install-cert-compression-algs",
&TestConfig::install_cert_compression_algs),
IntFlag("-install-one-cert-compression-alg",
&TestConfig::install_one_cert_compression_alg),
BoolFlag("-reverify-on-resume", &TestConfig::reverify_on_resume),
BoolFlag("-enforce-rsa-key-usage", &TestConfig::enforce_rsa_key_usage),
BoolFlag("-is-handshaker-supported",
&TestConfig::is_handshaker_supported),
BoolFlag("-handshaker-resume", &TestConfig::handshaker_resume),
BoolFlag("-reverify-on-resume", &TestConfig::reverify_on_resume),
BoolFlag("-enforce-rsa-key-usage", &TestConfig::enforce_rsa_key_usage),
StringFlag("-handshaker-path", &TestConfig::handshaker_path),
BoolFlag("-jdk11-workaround", &TestConfig::jdk11_workaround),
BoolFlag("-server-preference", &TestConfig::server_preference),
BoolFlag("-export-traffic-secrets", &TestConfig::export_traffic_secrets),
BoolFlag("-key-update", &TestConfig::key_update),
BoolFlag("-expect-delegated-credential-used",
&TestConfig::expect_delegated_credential_used),
BoolFlag("-expect-hrr", &TestConfig::expect_hrr),
BoolFlag("-expect-no-hrr", &TestConfig::expect_no_hrr),
BoolFlag("-wait-for-debugger", &TestConfig::wait_for_debugger),
StringFlag("-write-settings", &TestConfig::write_settings),
StringFlag("-key-file", &TestConfig::key_file),
StringFlag("-cert-file", &TestConfig::cert_file),
StringFlag("-expect-server-name", &TestConfig::expect_server_name),
StringFlag("-expect-ech-name-override",
&TestConfig::expect_ech_name_override),
StringFlag("-advertise-npn", &TestConfig::advertise_npn),
StringFlag("-expect-next-proto", &TestConfig::expect_next_proto),
StringFlag("-select-next-proto", &TestConfig::select_next_proto),
StringFlag("-send-channel-id", &TestConfig::send_channel_id),
StringFlag("-host-name", &TestConfig::host_name),
StringFlag("-advertise-alpn", &TestConfig::advertise_alpn),
StringFlag("-expect-alpn", &TestConfig::expect_alpn),
StringFlag("-expect-late-alpn", &TestConfig::expect_late_alpn),
StringFlag("-expect-advertised-alpn",
&TestConfig::expect_advertised_alpn),
StringFlag("-select-alpn", &TestConfig::select_alpn),
StringFlag("-psk", &TestConfig::psk),
StringFlag("-psk-identity", &TestConfig::psk_identity),
StringFlag("-srtp-profiles", &TestConfig::srtp_profiles),
StringFlag("-cipher", &TestConfig::cipher),
StringFlag("-export-label", &TestConfig::export_label),
StringFlag("-export-context", &TestConfig::export_context),
StringFlag("-expect-peer-cert-file", &TestConfig::expect_peer_cert_file),
StringFlag("-use-client-ca-list", &TestConfig::use_client_ca_list),
StringFlag("-expect-client-ca-list", &TestConfig::expect_client_ca_list),
StringFlag("-expect-msg-callback", &TestConfig::expect_msg_callback),
StringFlag("-handshaker-path", &TestConfig::handshaker_path),
StringFlag("-delegated-credential", &TestConfig::delegated_credential),
StringFlag("-expect-early-data-reason",
&TestConfig::expect_early_data_reason),
BoolFlag("-expect-hrr", &TestConfig::expect_hrr),
BoolFlag("-expect-no-hrr", &TestConfig::expect_no_hrr),
BoolFlag("-wait-for-debugger", &TestConfig::wait_for_debugger),
StringFlag("-quic-early-data-context",
&TestConfig::quic_early_data_context),
OptionalStringFlag("-expect-peer-application-settings",
&TestConfig::expect_peer_application_settings),
Base64Flag("-expect-ech-retry-configs",
&TestConfig::expect_ech_retry_configs),
Base64Flag("-ech-config-list", &TestConfig::ech_config_list),
Base64Flag("-expect-certificate-types",
&TestConfig::expect_certificate_types),
Base64Flag("-expect-channel-id", &TestConfig::expect_channel_id),
Base64Flag("-expect-ocsp-response", &TestConfig::expect_ocsp_response),
Base64Flag("-expect-signed-cert-timestamps",
&TestConfig::expect_signed_cert_timestamps),
Base64Flag("-ocsp-response", &TestConfig::ocsp_response),
Base64Flag("-signed-cert-timestamps",
&TestConfig::signed_cert_timestamps),
Base64Flag("-ticket-key", &TestConfig::ticket_key),
Base64Flag("-quic-transport-params", &TestConfig::quic_transport_params),
Base64Flag("-expect-quic-transport-params",
&TestConfig::expect_quic_transport_params),
IntFlag("-port", &TestConfig::port),
IntFlag("-resume-count", &TestConfig::resume_count),
IntFlag("-min-version", &TestConfig::min_version),
IntFlag("-max-version", &TestConfig::max_version),
IntFlag("-expect-version", &TestConfig::expect_version),
IntFlag("-mtu", &TestConfig::mtu),
IntFlag("-export-keying-material", &TestConfig::export_keying_material),
IntFlag("-expect-total-renegotiations",
&TestConfig::expect_total_renegotiations),
IntFlag("-expect-peer-signature-algorithm",
&TestConfig::expect_peer_signature_algorithm),
IntFlag("-expect-curve-id", &TestConfig::expect_curve_id),
IntFlag("-initial-timeout-duration-ms",
&TestConfig::initial_timeout_duration_ms),
IntFlag("-max-cert-list", &TestConfig::max_cert_list),
IntFlag("-expect-cipher-aes", &TestConfig::expect_cipher_aes),
IntFlag("-expect-cipher-no-aes", &TestConfig::expect_cipher_no_aes),
IntFlag("-expect-cipher", &TestConfig::expect_cipher),
IntFlag("-resumption-delay", &TestConfig::resumption_delay),
IntFlag("-max-send-fragment", &TestConfig::max_send_fragment),
IntFlag("-read-size", &TestConfig::read_size),
IntFlag("-expect-ticket-age-skew", &TestConfig::expect_ticket_age_skew),
IntFlag("-quic-use-legacy-codepoint",
&TestConfig::quic_use_legacy_codepoint),
IntFlag("-install-one-cert-compression-alg",
&TestConfig::install_one_cert_compression_alg),
IntFlag("-early-write-after-message",
&TestConfig::early_write_after_message),
IntVectorFlag("-signing-prefs", &TestConfig::signing_prefs),
IntVectorFlag("-verify-prefs", &TestConfig::verify_prefs),
IntVectorFlag("-expect-peer-verify-pref",
&TestConfig::expect_peer_verify_prefs),
IntVectorFlag("-curves", &TestConfig::curves),
IntVectorFlag("-ech-is-retry-config", &TestConfig::ech_is_retry_config),
Base64VectorFlag("-ech-server-config", &TestConfig::ech_server_configs),
Base64VectorFlag("-ech-server-key", &TestConfig::ech_server_keys),
StringPairVectorFlag("-application-settings",
&TestConfig::application_settings),
};
std::sort(flags.begin(), flags.end(), [](const Flag &a, const Flag &b) {
return strcmp(a.name, b.name) < 0;

@ -119,10 +119,6 @@ struct TestConfig {
bool use_ticket_callback = false;
bool renew_ticket = false;
bool enable_early_data = false;
bool enable_client_custom_extension = false;
bool enable_server_custom_extension = false;
bool custom_extension_skip = false;
bool custom_extension_fail_add = false;
std::string ocsp_response;
bool check_close_notify = false;
bool shim_shuts_down = false;

Loading…
Cancel
Save