Add a comment noting the padding oracle.
Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
parent
4ad2d3ac0e
commit
03af843039
@ -524,6 +524,11 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
OPENSSL_assert(b <= sizeof ctx->final);
|
OPENSSL_assert(b <= sizeof ctx->final);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following assumes that the ciphertext has been authenticated.
|
||||||
|
* Otherwise it provides a padding oracle.
|
||||||
|
*/
|
||||||
n=ctx->final[b-1];
|
n=ctx->final[b-1];
|
||||||
if (n == 0 || n > (int)b)
|
if (n == 0 || n > (int)b)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user