Set error if EVP_CipherUpdate fails.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit ee6ce5cc36
)
Conflicts:
crypto/evp/bio_enc.c
This commit is contained in:
parent
325da8231c
commit
97a7b2ebd9
1 changed files with 8 additions and 3 deletions
|
@ -201,9 +201,14 @@ static int enc_read(BIO *b, char *out, int outl)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
EVP_CipherUpdate(&(ctx->cipher),
|
if (!EVP_CipherUpdate(&ctx->cipher,
|
||||||
(unsigned char *)ctx->buf, &ctx->buf_len,
|
(unsigned char *)ctx->buf, &ctx->buf_len,
|
||||||
(unsigned char *)&(ctx->buf[BUF_OFFSET]), i);
|
(unsigned char *)&(ctx->buf[BUF_OFFSET]),
|
||||||
|
i)) {
|
||||||
|
BIO_clear_retry_flags(b);
|
||||||
|
ctx->ok = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
ctx->cont = 1;
|
ctx->cont = 1;
|
||||||
/*
|
/*
|
||||||
* Note: it is possible for EVP_CipherUpdate to decrypt zero
|
* Note: it is possible for EVP_CipherUpdate to decrypt zero
|
||||||
|
|
Loading…
Reference in a new issue