OpenSSL 1.1.1-pre2
This commit is contained in:
@@ -523,7 +523,7 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
|
||||
if (b > 1) {
|
||||
if (ctx->buf_len || !ctx->final_used) {
|
||||
EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_WRONG_FINAL_BLOCK_LENGTH);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
OPENSSL_assert(b <= sizeof(ctx->final));
|
||||
|
||||
@@ -534,12 +534,12 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
|
||||
n = ctx->final[b - 1];
|
||||
if (n == 0 || n > (int)b) {
|
||||
EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_BAD_DECRYPT);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
if (ctx->final[--b] != n) {
|
||||
EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_BAD_DECRYPT);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
n = ctx->cipher->block_size - n;
|
||||
@@ -548,7 +548,7 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
|
||||
*outl = n;
|
||||
} else
|
||||
*outl = 0;
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
|
||||
|
||||
Reference in New Issue
Block a user