Skip to content

Commit

Permalink
stray derefs
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Oct 6, 2023
1 parent 8484bc2 commit 85b96d1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/pem_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static int s_test_pem_cert_parse_from_file(struct aws_allocator *allocator, void
struct aws_pem_object *pem_object = NULL;
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(s_expected, sizeof(s_expected), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down Expand Up @@ -308,7 +308,7 @@ static int s_test_pem_private_key_parse_from_file(struct aws_allocator *allocato
struct aws_pem_object *pem_object = NULL;
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(s_expected, sizeof(s_expected), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "RSA PRIVATE KEY");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "RSA PRIVATE KEY");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_PRIVATE_RSA_PKCS1, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down Expand Up @@ -385,7 +385,7 @@ static int s_test_pem_single_cert_parse(struct aws_allocator *allocator, void *c
struct aws_pem_object *pem_object = NULL;
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(s_expected, sizeof(s_expected), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down Expand Up @@ -599,16 +599,16 @@ static int s_test_pem_cert_chain_parse(struct aws_allocator *allocator, void *ct
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(
s_expected_intermediate_1, sizeof(s_expected_intermediate_1), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 1);
ASSERT_BIN_ARRAYS_EQUALS(
s_expected_intermediate_2, sizeof(s_expected_intermediate_2), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 2);
ASSERT_BIN_ARRAYS_EQUALS(s_expected_leaf, sizeof(s_expected_leaf), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down Expand Up @@ -727,7 +727,7 @@ static int s_test_pem_private_key_parse(struct aws_allocator *allocator, void *c
struct aws_pem_object *pem_object = NULL;
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(s_expected, sizeof(s_expected), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "RSA PRIVATE KEY");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "RSA PRIVATE KEY");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_PRIVATE_RSA_PKCS1, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down Expand Up @@ -957,16 +957,16 @@ static int s_test_pem_cert_chain_comments_and_whitespace(struct aws_allocator *a
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 0);
ASSERT_BIN_ARRAYS_EQUALS(
s_expected_intermediate_1, sizeof(s_expected_intermediate_1), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 1);
ASSERT_BIN_ARRAYS_EQUALS(
s_expected_intermediate_2, sizeof(s_expected_intermediate_2), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);
aws_array_list_get_at_ptr(&output_list, (void **)&pem_object, 2);
ASSERT_BIN_ARRAYS_EQUALS(s_expected_leaf, sizeof(s_expected_leaf), pem_object->data.buffer, pem_object->data.len);
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(&pem_object->type_string), "CERTIFICATE");
ASSERT_CURSOR_VALUE_CSTRING_EQUALS(aws_byte_cursor_from_string(pem_object->type_string), "CERTIFICATE");
ASSERT_INT_EQUALS(AWS_PEM_TYPE_X509, pem_object->type);

aws_pem_objects_clear(&output_list);
Expand Down

0 comments on commit 85b96d1

Please sign in to comment.