This involves gcm_cipher() (providers/common/ciphers/cipher_gcm.c),
ccm_cipher() (providers/common/ciphers/cipher_ccm.c), and
tdes_wrap_cipher() (providers/common/ciphers/cipher_tdes_wrap.c)
These are generic implementations of the OSSL_FUNC_CIPHER_CIPHER
function, which returned -1 on error when they should return 0.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10137)
if (outsize < inl) {
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
- return -1;
+ return 0;
}
if (ccm_cipher_internal(ctx, out, outl, in, inl) <= 0)
- return -1;
+ return 0;
*outl = inl;
return 1;
if (outsize < inl) {
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
- return -1;
+ return 0;
}
if (gcm_cipher_internal(ctx, out, outl, in, inl) <= 0)
- return -1;
+ return 0;
*outl = inl;
return 1;
*outl = 0;
if (outsize < inl) {
PROVerr(0, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
- return -1;
+ return 0;
}
ret = tdes_wrap_cipher_internal(ctx, out, in, inl);