summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-12-02 00:49:35 +0100
committerRichard Levitte <levitte@openssl.org>2015-12-07 17:40:20 +0100
commitbfb0641f932490c2e7fb5f9f7cb4a88017a5abfa (patch)
tree6b6b0a9dfe55b4b3a2e5961ed1778dd156128f35 /apps/req.c
parent959ed5316c84d0e12ad18acfd40cefe15603ddfb (diff)
Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/req.c b/apps/req.c
index 267a0a025a..c275763932 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1511,7 +1511,7 @@ int do_X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md,
STACK_OF(OPENSSL_STRING) *sigopts)
{
int rv;
- EVP_MD_CTX *mctx = EVP_MD_CTX_create();
+ EVP_MD_CTX *mctx = EVP_MD_CTX_new();
rv = do_sign_init(mctx, pkey, md, sigopts);
/* Note: X509_sign_ctx() calls ASN1_item_sign_ctx(), which destroys
@@ -1520,7 +1520,7 @@ int do_X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md,
if (rv > 0)
rv = X509_sign_ctx(x, mctx);
else
- EVP_MD_CTX_destroy(mctx);
+ EVP_MD_CTX_free(mctx);
return rv > 0 ? 1 : 0;
}
@@ -1528,7 +1528,7 @@ int do_X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md,
STACK_OF(OPENSSL_STRING) *sigopts)
{
int rv;
- EVP_MD_CTX *mctx = EVP_MD_CTX_create();
+ EVP_MD_CTX *mctx = EVP_MD_CTX_new();
rv = do_sign_init(mctx, pkey, md, sigopts);
/* Note: X509_REQ_sign_ctx() calls ASN1_item_sign_ctx(), which destroys
* the EVP_MD_CTX we send it, so only destroy it here if the former
@@ -1536,7 +1536,7 @@ int do_X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md,
if (rv > 0)
rv = X509_REQ_sign_ctx(x, mctx);
else
- EVP_MD_CTX_destroy(mctx);
+ EVP_MD_CTX_free(mctx);
return rv > 0 ? 1 : 0;
}
@@ -1544,7 +1544,7 @@ int do_X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md,
STACK_OF(OPENSSL_STRING) *sigopts)
{
int rv;
- EVP_MD_CTX *mctx = EVP_MD_CTX_create();
+ EVP_MD_CTX *mctx = EVP_MD_CTX_new();
rv = do_sign_init(mctx, pkey, md, sigopts);
/* Note: X509_CRL_sign_ctx() calls ASN1_item_sign_ctx(), which destroys
* the EVP_MD_CTX we send it, so only destroy it here if the former
@@ -1552,6 +1552,6 @@ int do_X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md,
if (rv > 0)
rv = X509_CRL_sign_ctx(x, mctx);
else
- EVP_MD_CTX_destroy(mctx);
+ EVP_MD_CTX_free(mctx);
return rv > 0 ? 1 : 0;
}