Use different return values in payload decryption to distinguish between integrity and syntax errors

This commit is contained in:
Martin Willi
2010-08-25 15:29:53 +02:00
parent f1a74a3cab
commit e5c6ebb697
3 changed files with 16 additions and 12 deletions
+2 -2
View File
@@ -1224,9 +1224,9 @@ static status_t decrypt_payloads(private_message_t *this, aead_t *aead)
break;
}
chunk.len -= encryption->get_length(encryption);
if (!encryption->decrypt(encryption, chunk))
status = encryption->decrypt(encryption, chunk);
if (status != SUCCESS)
{
status = VERIFY_ERROR;
break;
}