diff options
Diffstat (limited to 'lib/libssl/src/crypto/cms/cms_env.c')
-rw-r--r-- | lib/libssl/src/crypto/cms/cms_env.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libssl/src/crypto/cms/cms_env.c b/lib/libssl/src/crypto/cms/cms_env.c index be20b1c024c..78fa2aa7b73 100644 --- a/lib/libssl/src/crypto/cms/cms_env.c +++ b/lib/libssl/src/crypto/cms/cms_env.c @@ -334,7 +334,7 @@ static int cms_RecipientInfo_ktri_encrypt(CMS_ContentInfo *cms, if (EVP_PKEY_encrypt(pctx, NULL, &eklen, ec->key, ec->keylen) <= 0) goto err; - ek = OPENSSL_malloc(eklen); + ek = malloc(eklen); if (ek == NULL) { @@ -355,7 +355,7 @@ static int cms_RecipientInfo_ktri_encrypt(CMS_ContentInfo *cms, if (pctx) EVP_PKEY_CTX_free(pctx); if (ek) - OPENSSL_free(ek); + free(ek); return ret; } @@ -399,7 +399,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, ktri->encryptedKey->length) <= 0) goto err; - ek = OPENSSL_malloc(eklen); + ek = malloc(eklen); if (ek == NULL) { @@ -421,7 +421,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, if (ec->key) { OPENSSL_cleanse(ec->key, ec->keylen); - OPENSSL_free(ec->key); + free(ec->key); } ec->key = ek; @@ -431,7 +431,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, if (pctx) EVP_PKEY_CTX_free(pctx); if (!ret && ek) - OPENSSL_free(ek); + free(ek); return ret; } @@ -671,7 +671,7 @@ static int cms_RecipientInfo_kekri_encrypt(CMS_ContentInfo *cms, goto err; } - wkey = OPENSSL_malloc(ec->keylen + 8); + wkey = malloc(ec->keylen + 8); if (!wkey) { @@ -695,7 +695,7 @@ static int cms_RecipientInfo_kekri_encrypt(CMS_ContentInfo *cms, err: if (!r && wkey) - OPENSSL_free(wkey); + free(wkey); OPENSSL_cleanse(&actx, sizeof(actx)); return r; @@ -748,7 +748,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, goto err; } - ukey = OPENSSL_malloc(kekri->encryptedKey->length - 8); + ukey = malloc(kekri->encryptedKey->length - 8); if (!ukey) { @@ -776,7 +776,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, err: if (!r && ukey) - OPENSSL_free(ukey); + free(ukey); OPENSSL_cleanse(&actx, sizeof(actx)); return r; @@ -864,7 +864,7 @@ BIO *cms_EnvelopedData_init_bio(CMS_ContentInfo *cms) if (ec->key) { OPENSSL_cleanse(ec->key, ec->keylen); - OPENSSL_free(ec->key); + free(ec->key); ec->key = NULL; ec->keylen = 0; } |