static int aes_xts_check_keys_differ(const unsigned char *key, size_t bytes,
int enc)
{
- if ((!allow_insecure_decrypt || enc)
+ if ((!ossl_aes_xts_allow_insecure_decrypt || enc)
&& CRYPTO_memcmp(key, key + bytes, bytes) == 0) {
ERR_raise(ERR_LIB_PROV, PROV_R_XTS_DUPLICATED_KEYS);
return 0;
return NULL;
}
ret = OPENSSL_malloc(sizeof(*ret));
- if (ret == NULL) {
- ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
+ if (ret == NULL)
return NULL;
- }
in->base.hw->copyctx(&ret->base, &in->base);
return ret;
}