Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Jun 20, 2024
1 parent bc2f091 commit 60d8f23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/aws/cal/private/symmetric_cipher_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct aws_symmetric_cipher {
/**
deprecated for use, only for backwards compat.
Use state to represent current state of cipher.
good represented if the ciphter was initialized
good represented if the cipher was initialized
without any errors, ready to process input,
and not finialized yet. This corresponds to
and not finalized yet. This corresponds to
the state AWS_SYMMETRIC_CIPHER_READY.
*/
bool good;
Expand Down
6 changes: 3 additions & 3 deletions source/windows/bcrypt_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ static int s_aes_default_encrypt(
struct aws_byte_buf *out) {
struct aes_bcrypt_cipher *cipher_impl = cipher->impl;

if (to_encrypt->len == 0 && cipher_impl->auth_info_ptr == NULL) {
return AWS_OP_SUCCESS;
}
//if (to_encrypt->len == 0 && cipher_impl->auth_info_ptr == NULL) {
// return AWS_OP_SUCCESS;
//}

size_t predicted_write_length =
cipher_impl->cipher_flags & BCRYPT_BLOCK_PADDING
Expand Down
4 changes: 2 additions & 2 deletions tests/aes256_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,9 @@ static int s_aes_gcm_test_with_generated_key_iv_fn(struct aws_allocator *allocat

struct aws_byte_buf decrypted_buf;
aws_byte_buf_init(&decrypted_buf, allocator, AWS_AES_256_CIPHER_BLOCK_SIZE);
struct aws_byte_cursor encryted_cur = aws_byte_cursor_from_buf(&encrypted_buf);
struct aws_byte_cursor encrypted_cur = aws_byte_cursor_from_buf(&encrypted_buf);
ASSERT_INT_EQUALS(AWS_SYMMETRIC_CIPHER_READY, aws_symmetric_cipher_get_state(cipher));
ASSERT_SUCCESS(aws_symmetric_cipher_decrypt(cipher, encryted_cur, &decrypted_buf));
ASSERT_SUCCESS(aws_symmetric_cipher_decrypt(cipher, encrypted_cur, &decrypted_buf));
ASSERT_INT_EQUALS(AWS_SYMMETRIC_CIPHER_READY, aws_symmetric_cipher_get_state(cipher));
ASSERT_SUCCESS(aws_symmetric_cipher_finalize_decryption(cipher, &decrypted_buf));
ASSERT_INT_EQUALS(AWS_SYMMETRIC_CIPHER_FINALIZED, aws_symmetric_cipher_get_state(cipher));
Expand Down

0 comments on commit 60d8f23

Please sign in to comment.