/* If not padding input must be multiple of 8 */
if (!pad && inlen & 0x7)
return -1;
- if (is_partially_overlapping(out, in, inlen)) {
+ if (ossl_is_partially_overlapping(out, in, inlen)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
buf = octx->data_buf;
buf_len = &(octx->data_buf_len);
- if (is_partially_overlapping(out + *buf_len, in, len)) {
+ if (ossl_is_partially_overlapping(out + *buf_len, in, len)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
if (inl >= EVP_MAXCHUNK || inl % 8)
return -1;
- if (is_partially_overlapping(out, in, inl)) {
+ if (ossl_is_partially_overlapping(out, in, inl)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
# define PTRDIFF_T size_t
#endif
-int is_partially_overlapping(const void *ptr1, const void *ptr2, int len)
+int ossl_is_partially_overlapping(const void *ptr1, const void *ptr2, int len)
{
PTRDIFF_T diff = (PTRDIFF_T)ptr1-(PTRDIFF_T)ptr2;
/*
if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
/* If block size > 1 then the cipher will have to do this check */
- if (bl == 1 && is_partially_overlapping(out, in, cmpl)) {
+ if (bl == 1 && ossl_is_partially_overlapping(out, in, cmpl)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
*outl = 0;
return inl == 0;
}
- if (is_partially_overlapping(out + ctx->buf_len, in, cmpl)) {
+ if (ossl_is_partially_overlapping(out + ctx->buf_len, in, cmpl)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
cmpl = (cmpl + 7) / 8;
if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
- if (b == 1 && is_partially_overlapping(out, in, cmpl)) {
+ if (b == 1 && ossl_is_partially_overlapping(out, in, cmpl)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
if (ctx->final_used) {
/* see comment about PTRDIFF_T comparison above */
if (((PTRDIFF_T)out == (PTRDIFF_T)in)
- || is_partially_overlapping(out, in, b)) {
+ || ossl_is_partially_overlapping(out, in, b)) {
ERR_raise(ERR_LIB_EVP, EVP_R_PARTIALLY_OVERLAPPING);
return 0;
}
typedef struct evp_pbe_st EVP_PBE_CTL;
DEFINE_STACK_OF(EVP_PBE_CTL)
-int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);
+int ossl_is_partially_overlapping(const void *ptr1, const void *ptr2, int len);
#include <openssl/types.h>
#include <openssl/core.h>