summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libssl/src/crypto/evp/e_aes.c4
-rw-r--r--lib/libssl/src/crypto/evp/e_chacha20poly1305.c4
-rw-r--r--lib/libssl/src/crypto/rsa/rsa_lib.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libssl/src/crypto/evp/e_aes.c b/lib/libssl/src/crypto/evp/e_aes.c
index 4da61b8f626..2e81495e5f4 100644
--- a/lib/libssl/src/crypto/evp/e_aes.c
+++ b/lib/libssl/src/crypto/evp/e_aes.c
@@ -1294,7 +1294,7 @@ aead_aes_gcm_init(EVP_AEAD_CTX *ctx, const unsigned char *key, size_t key_len,
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;
@@ -1321,7 +1321,7 @@ aead_aes_gcm_cleanup(EVP_AEAD_CTX *ctx)
{
struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
- OPENSSL_free(gcm_ctx);
+ free(gcm_ctx);
}
static ssize_t
diff --git a/lib/libssl/src/crypto/evp/e_chacha20poly1305.c b/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
index 75ff7f209cc..7e32668b7fc 100644
--- a/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
+++ b/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
@@ -85,7 +85,7 @@ aead_chacha20_poly1305_init(EVP_AEAD_CTX *ctx, const unsigned char *key,
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;
@@ -101,7 +101,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx)
{
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
diff --git a/lib/libssl/src/crypto/rsa/rsa_lib.c b/lib/libssl/src/crypto/rsa/rsa_lib.c
index a618d70f92c..1ea5e7bc64e 100644
--- a/lib/libssl/src/crypto/rsa/rsa_lib.c
+++ b/lib/libssl/src/crypto/rsa/rsa_lib.c
@@ -229,7 +229,7 @@ void RSA_free(RSA *r)
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);
}
@@ -275,7 +275,7 @@ int RSA_memory_lock(RSA *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);