as new stuff was brought in.
ok miod@
return 0;
}
- gcm_ctx = OPENSSL_malloc(sizeof(struct aead_aes_gcm_ctx));
+ gcm_ctx = malloc(sizeof(struct aead_aes_gcm_ctx));
if (gcm_ctx == NULL)
return 0;
{
struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
- OPENSSL_free(gcm_ctx);
+ free(gcm_ctx);
}
static ssize_t
if (key_len != sizeof(c20_ctx->key))
return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */
- c20_ctx = OPENSSL_malloc(sizeof(struct aead_chacha20_poly1305_ctx));
+ c20_ctx = malloc(sizeof(struct aead_chacha20_poly1305_ctx));
if (c20_ctx == NULL)
return 0;
{
struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key));
- OPENSSL_free(c20_ctx);
+ free(c20_ctx);
}
static void
if (r->iqmp != NULL) BN_clear_free(r->iqmp);
if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
- if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
+ free(r->bignum_data);
free(r);
}
j=1;
for (i=0; i<6; i++)
j+= (*t[i])->top;
- if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL)
+ if ((p=reallocarray(NULL, (off+j), sizeof(BN_ULONG))) == NULL)
{
RSAerr(RSA_F_RSA_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
return(0);
return 0;
}
- gcm_ctx = OPENSSL_malloc(sizeof(struct aead_aes_gcm_ctx));
+ gcm_ctx = malloc(sizeof(struct aead_aes_gcm_ctx));
if (gcm_ctx == NULL)
return 0;
{
struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
- OPENSSL_free(gcm_ctx);
+ free(gcm_ctx);
}
static ssize_t
if (key_len != sizeof(c20_ctx->key))
return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */
- c20_ctx = OPENSSL_malloc(sizeof(struct aead_chacha20_poly1305_ctx));
+ c20_ctx = malloc(sizeof(struct aead_chacha20_poly1305_ctx));
if (c20_ctx == NULL)
return 0;
{
struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key));
- OPENSSL_free(c20_ctx);
+ free(c20_ctx);
}
static void
if (r->iqmp != NULL) BN_clear_free(r->iqmp);
if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
- if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
+ free(r->bignum_data);
free(r);
}
j=1;
for (i=0; i<6; i++)
j+= (*t[i])->top;
- if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL)
+ if ((p=reallocarray(NULL, (off+j), sizeof(BN_ULONG))) == NULL)
{
RSAerr(RSA_F_RSA_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
return(0);