Commit 750b640c authored by Geoff Simmons's avatar Geoff Simmons

Add some assertions to decrypt_record().

parent 25a79768
...@@ -202,11 +202,13 @@ decrypt_record(EVP_CIPHER_CTX *ctx, unsigned char *ciphertext, ...@@ -202,11 +202,13 @@ decrypt_record(EVP_CIPHER_CTX *ctx, unsigned char *ciphertext,
AN(ctx); AN(ctx);
AN(ciphertext); AN(ciphertext);
AN(tag);
AN(cek); AN(cek);
AN(nonce); AN(nonce);
AN(plaintext); AN(plaintext);
AN(last); AN(last);
AN(errmsg); AN(errmsg);
assert(ciphertext_len >= 0);
if (EVP_CipherInit_ex(ctx, EVP_aes_128_gcm(), NULL, cek, nonce, -1) if (EVP_CipherInit_ex(ctx, EVP_aes_128_gcm(), NULL, cek, nonce, -1)
!= 1) { != 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment