Skip to content

Commit

Permalink
removed commented out code in symmetric_decrypt_verify
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanYarotsky committed Sep 13, 2024
1 parent cf2d1bd commit d853f0d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/src/core/comms/secure_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1209,13 +1209,7 @@ impl SecureChannel {
}
MessageSecurityMode::SignAndEncrypt => {
self.expect_supported_security_policy();

// There is an expectation that the block is padded so, this is a quick test
let ciphertext_size = encrypted_range.end - encrypted_range.start;
// if ciphertext_size % 16 != 0 {
// error!("The cipher text size is not padded properly, size = {}", ciphertext_size);
// return Err(StatusCode::BadUnexpectedError);
// }

// Copy security header
dst[..encrypted_range.start].copy_from_slice(&src[..encrypted_range.start]);
Expand All @@ -1235,7 +1229,6 @@ impl SecureChannel {
&mut decrypted_tmp[..],
)?;

// Self::log_crypto_data("Encrypted buffer", &src[..encrypted_range.end]);
let encrypted_range =
encrypted_range.start..(encrypted_range.start + decrypted_size);
dst[encrypted_range.clone()].copy_from_slice(&decrypted_tmp[..decrypted_size]);
Expand Down

0 comments on commit d853f0d

Please sign in to comment.