diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_enc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index e3e1147969..2e863ac542 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -533,6 +533,11 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) return(0); } 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]; if (n == 0 || n > (int)b) { |