Skip to content

Commit

Permalink
test print
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Oct 30, 2024
1 parent ea96182 commit eef1651
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/rsa_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,14 @@ static int s_rsa_verify_signing_pkcs1_sha1(struct aws_allocator *allocator, void
allocator, aws_byte_cursor_from_c_str(TEST_RSA_SIGNATURE_PKCS1_SHA1), &signature_buf));
struct aws_byte_cursor signature_cur = aws_byte_cursor_from_buf(&signature_buf);

AWS_LOGF_DEBUG(0, "foo " PRInSTR " bar " PRInSTR, AWS_BYTE_CURSOR_PRI(signature_cur), AWS_BYTE_CURSOR_PRI(hash_cur));
size_t encoded_length = 0;
struct aws_byte_buf enc_buf;
ASSERT_SUCCESS(aws_base64_compute_encoded_len(hash_cur.len, &encoded_length));
ASSERT_SUCCESS(aws_byte_buf_init(&enc_buf, allocator, encoded_length));
ASSERT_SUCCESS(aws_base64_encode(&hash_cur, &enc_buf));
struct aws_byte_cursor enc_cur = aws_byte_cursor_from_buf(&enc_buf);

AWS_LOGF_DEBUG(0, "foo " PRInSTR " bar " PRInSTR, AWS_BYTE_CURSOR_PRI(enc_cur));

ASSERT_SUCCESS(aws_rsa_key_pair_verify_signature(
key_pair_public, AWS_CAL_RSA_SIGNATURE_PKCS1_5_SHA1, hash_cur, signature_cur));
Expand Down

0 comments on commit eef1651

Please sign in to comment.