Skip to content

Commit

Permalink
fix setting of proper requested tls version on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbSteveK committed Oct 25, 2024
1 parent a43174e commit c0be01e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/tls_handler_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,13 +1203,13 @@ AWS_TEST_CASE(

AWS_STATIC_STRING_FROM_LITERAL(s_legacy_crypto_tls10_host_name, "tls-v1-0.badssl.com");

static void s_raise_tls_version_to_11(struct aws_tls_ctx_options *options) {
aws_tls_ctx_options_set_minimum_tls_version(options, AWS_IO_TLSv1_2);
static void s_raise_tls_version_to_10(struct aws_tls_ctx_options *options) {
aws_tls_ctx_options_set_minimum_tls_version(options, AWS_IO_TLSv1);
}

static int s_tls_client_channel_negotiation_error_legacy_crypto_tls10_fn(struct aws_allocator *allocator, void *ctx) {
(void)ctx;
return s_verify_negotiation_fails(allocator, s_legacy_crypto_tls10_host_name, 1010, &s_raise_tls_version_to_11);
return s_verify_negotiation_fails(allocator, s_legacy_crypto_tls10_host_name, 1010, &s_raise_tls_version_to_10);
}

AWS_TEST_CASE(
Expand All @@ -1218,15 +1218,15 @@ AWS_TEST_CASE(

AWS_STATIC_STRING_FROM_LITERAL(s_legacy_crypto_tls11_host_name, "tls-v1-1.badssl.com");

static void s_raise_tls_version_to_12(struct aws_tls_ctx_options *options) {
aws_tls_ctx_options_set_minimum_tls_version(options, AWS_IO_TLSv1_2);
static void s_raise_tls_version_to_11(struct aws_tls_ctx_options *options) {
aws_tls_ctx_options_set_minimum_tls_version(options, AWS_IO_TLSv1_1);
}

static int s_tls_client_channel_negotiation_error_override_legacy_crypto_tls11_fn(
struct aws_allocator *allocator,
void *ctx) {
(void)ctx;
return s_verify_negotiation_fails(allocator, s_legacy_crypto_tls11_host_name, 1011, &s_raise_tls_version_to_12);
return s_verify_negotiation_fails(allocator, s_legacy_crypto_tls11_host_name, 1011, &s_raise_tls_version_to_11);
}

AWS_TEST_CASE(
Expand Down

0 comments on commit c0be01e

Please sign in to comment.