From d8652be06e2778e8898453a391deb7253e1a35a2 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 24 Sep 2020 10:42:23 +0100 Subject: Run the withlibctx.pl script Automatically rename all instances of _with_libctx() to _ex() as per our coding style. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/12970) --- crypto/asn1/a_digest.c | 9 +++--- crypto/asn1/a_sign.c | 16 +++++------ crypto/asn1/a_verify.c | 14 ++++------ crypto/asn1/asn_mime.c | 13 ++++----- crypto/asn1/d2i_pr.c | 6 ++-- crypto/cmp/cmp_protect.c | 6 ++-- crypto/cmp/cmp_util.c | 2 +- crypto/cmp/cmp_vfy.c | 14 +++++----- crypto/cms/cms_cd.c | 2 +- crypto/cms/cms_dd.c | 2 +- crypto/cms/cms_env.c | 19 ++++++------- crypto/cms/cms_ess.c | 13 ++++----- crypto/cms/cms_io.c | 10 +++---- crypto/cms/cms_lib.c | 7 ++--- crypto/cms/cms_sd.c | 20 ++++++------- crypto/cms/cms_smime.c | 65 +++++++++++++++++++------------------------ crypto/conf/conf_lib.c | 4 +-- crypto/conf/conf_mod.c | 9 +++--- crypto/context.c | 2 +- crypto/crmf/crmf_lib.c | 16 +++++------ crypto/ct/ct_b64.c | 11 ++++---- crypto/ct/ct_log.c | 14 +++++----- crypto/ct/ct_policy.c | 6 ++-- crypto/ct/ct_vfy.c | 5 ++-- crypto/dh/dh_ameth.c | 2 +- crypto/dh/dh_gen.c | 2 +- crypto/dh/dh_group_params.c | 6 ++-- crypto/dh/dh_lib.c | 2 +- crypto/ec/ec_ameth.c | 15 ++++------ crypto/ec/ec_curve.c | 12 ++++---- crypto/ec/ec_cvt.c | 4 +-- crypto/ec/ec_key.c | 15 +++++----- crypto/ec/ec_lib.c | 13 ++++----- crypto/ec/ec_local.h | 4 +-- crypto/ec/ecx_meth.c | 13 ++++----- crypto/evp/digest.c | 9 +++--- crypto/evp/evp_pkey.c | 10 +++---- crypto/evp/m_sigver.c | 14 ++++------ crypto/evp/p5_crpt2.c | 13 ++++----- crypto/evp/p_lib.c | 25 +++++++---------- crypto/evp/p_sign.c | 8 +++--- crypto/evp/p_verify.c | 8 +++--- crypto/pem/pem_info.c | 21 +++++++------- crypto/pkcs7/pk7_asn1.c | 2 +- crypto/pkcs7/pk7_doit.c | 13 ++++----- crypto/pkcs7/pk7_mime.c | 9 +++--- crypto/pkcs7/pk7_smime.c | 22 +++++++-------- crypto/rsa/rsa_local.h | 12 ++++---- crypto/rsa/rsa_oaep.c | 22 ++++++--------- crypto/rsa/rsa_ossl.c | 11 +++----- crypto/rsa/rsa_pk1.c | 9 +++--- crypto/rsa/rsa_ssl.c | 7 ++--- crypto/store/store_lib.c | 19 ++++++------- crypto/store/store_local.h | 2 +- crypto/store/store_register.c | 8 +++--- crypto/store/store_result.c | 2 +- crypto/trace.c | 0 crypto/x509/by_dir.c | 28 ++++++++----------- crypto/x509/by_file.c | 53 +++++++++++++++++------------------ crypto/x509/by_store.c | 24 ++++++++-------- crypto/x509/x509_d2.c | 41 +++++++++++++-------------- crypto/x509/x509_local.h | 4 +-- crypto/x509/x509_lu.c | 32 ++++++++++----------- crypto/x509/x509_vfy.c | 5 ++-- crypto/x509/x_all.c | 23 ++++++++------- crypto/x509/x_x509.c | 4 +-- 66 files changed, 381 insertions(+), 452 deletions(-) mode change 100755 => 100644 crypto/trace.c (limited to 'crypto') diff --git a/crypto/asn1/a_digest.c b/crypto/asn1/a_digest.c index 9211d7a968..66c99862e5 100644 --- a/crypto/asn1/a_digest.c +++ b/crypto/asn1/a_digest.c @@ -53,10 +53,9 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, #endif -int asn1_item_digest_with_libctx(const ASN1_ITEM *it, const EVP_MD *md, - void *asn, unsigned char *data, - unsigned int *len, OPENSSL_CTX *libctx, - const char *propq) +int asn1_item_digest_ex(const ASN1_ITEM *it, const EVP_MD *md, void *asn, + unsigned char *data, unsigned int *len, + OPENSSL_CTX *libctx, const char *propq) { int i, ret = 0; unsigned char *str = NULL; @@ -90,6 +89,6 @@ err: int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *md, void *asn, unsigned char *data, unsigned int *len) { - return asn1_item_digest_with_libctx(it, md, asn, data, len, NULL, NULL); + return asn1_item_digest_ex(it, md, asn, data, len, NULL, NULL); } diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c index 04edd1b28c..4242e9a70e 100644 --- a/crypto/asn1/a_sign.c +++ b/crypto/asn1/a_sign.c @@ -119,18 +119,18 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, const void *data, EVP_PKEY *pkey, const EVP_MD *md) { - return ASN1_item_sign_with_libctx(it, algor1, algor2, signature, data, NULL, - pkey, md, NULL, NULL); + return ASN1_item_sign_ex(it, algor1, algor2, signature, data, NULL, pkey, + md, NULL, NULL); } -int ASN1_item_sign_with_libctx(const ASN1_ITEM *it, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - const void *data, const ASN1_OCTET_STRING *id, - EVP_PKEY *pkey, const EVP_MD *md, - OPENSSL_CTX *libctx, const char *propq) +int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1, + X509_ALGOR *algor2, ASN1_BIT_STRING *signature, + const void *data, const ASN1_OCTET_STRING *id, + EVP_PKEY *pkey, const EVP_MD *md, OPENSSL_CTX *libctx, + const char *propq) { int rv = 0; - EVP_MD_CTX *ctx = evp_md_ctx_new_with_libctx(pkey, id, libctx, propq); + EVP_MD_CTX *ctx = evp_md_ctx_new_ex(pkey, id, libctx, propq); if (ctx == NULL) { ASN1err(0, ERR_R_MALLOC_FAILURE); diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c index e3471c8141..d8cea688d5 100644 --- a/crypto/asn1/a_verify.c +++ b/crypto/asn1/a_verify.c @@ -89,20 +89,18 @@ int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg, const ASN1_BIT_STRING *signature, const void *data, EVP_PKEY *pkey) { - return ASN1_item_verify_with_libctx(it, alg, signature, data, NULL, pkey, - NULL, NULL); + return ASN1_item_verify_ex(it, alg, signature, data, NULL, pkey, NULL, NULL); } -int ASN1_item_verify_with_libctx(const ASN1_ITEM *it, const X509_ALGOR *alg, - const ASN1_BIT_STRING *signature, - const void *data, - const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, - OPENSSL_CTX *libctx, const char *propq) +int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg, + const ASN1_BIT_STRING *signature, const void *data, + const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, + OPENSSL_CTX *libctx, const char *propq) { EVP_MD_CTX *ctx; int rv = -1; - if ((ctx = evp_md_ctx_new_with_libctx(pkey, id, libctx, propq)) != NULL) { + if ((ctx = evp_md_ctx_new_ex(pkey, id, libctx, propq)) != NULL) { rv = ASN1_item_verify_ctx(it, alg, signature, data, ctx); EVP_PKEY_CTX_free(EVP_MD_CTX_pkey_ctx(ctx)); EVP_MD_CTX_free(ctx); diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 596b32a57e..adf368f72f 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -229,11 +229,10 @@ static int asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs) /* SMIME sender */ -int SMIME_write_ASN1_with_libctx(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, - int ctype_nid, int econt_nid, - STACK_OF(X509_ALGOR) *mdalgs, - const ASN1_ITEM *it, - OPENSSL_CTX *libctx, const char *propq) +int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, + int ctype_nid, int econt_nid, + STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it, + OPENSSL_CTX *libctx, const char *propq) { char bound[33], c; int i; @@ -326,8 +325,8 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, int ctype_nid, int econt_nid, STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it) { - return SMIME_write_ASN1_with_libctx(bio, val, data, flags, ctype_nid, - econt_nid, mdalgs, it, NULL, NULL); + return SMIME_write_ASN1_ex(bio, val, data, flags, ctype_nid, econt_nid, + mdalgs, it, NULL, NULL); } /* Handle output of ASN1 data */ diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index fcf8d2f8d0..838ce25b90 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -48,13 +48,13 @@ EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp, if (!ret->ameth->old_priv_decode || !ret->ameth->old_priv_decode(ret, &p, length)) { if (ret->ameth->priv_decode != NULL - || ret->ameth->priv_decode_with_libctx != NULL) { + || ret->ameth->priv_decode_ex != NULL) { EVP_PKEY *tmp; PKCS8_PRIV_KEY_INFO *p8 = NULL; p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); if (p8 == NULL) goto err; - tmp = EVP_PKCS82PKEY_with_libctx(p8, libctx, propq); + tmp = EVP_PKCS82PKEY_ex(p8, libctx, propq); PKCS8_PRIV_KEY_INFO_free(p8); if (tmp == NULL) goto err; @@ -121,7 +121,7 @@ EVP_PKEY *d2i_AutoPrivateKey_ex(EVP_PKEY **a, const unsigned char **pp, ASN1err(0, ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); return NULL; } - ret = EVP_PKCS82PKEY_with_libctx(p8, libctx, propq); + ret = EVP_PKCS82PKEY_ex(p8, libctx, propq); PKCS8_PRIV_KEY_INFO_free(p8); if (ret == NULL) return NULL; diff --git a/crypto/cmp/cmp_protect.c b/crypto/cmp/cmp_protect.c index eb162e382d..9b28f1b09b 100644 --- a/crypto/cmp/cmp_protect.c +++ b/crypto/cmp/cmp_protect.c @@ -119,9 +119,9 @@ ASN1_BIT_STRING *ossl_cmp_calc_protection(const OSSL_CMP_CTX *ctx, if ((prot = ASN1_BIT_STRING_new()) == NULL) return NULL; - if (ASN1_item_sign_with_libctx(ASN1_ITEM_rptr(OSSL_CMP_PROTECTEDPART), - NULL, NULL, prot, &prot_part, NULL, - ctx->pkey, md, ctx->libctx, ctx->propq)) + if (ASN1_item_sign_ex(ASN1_ITEM_rptr(OSSL_CMP_PROTECTEDPART), NULL, + NULL, prot, &prot_part, NULL, ctx->pkey, md, + ctx->libctx, ctx->propq)) return prot; ASN1_BIT_STRING_free(prot); return NULL; diff --git a/crypto/cmp/cmp_util.c b/crypto/cmp/cmp_util.c index 12afe57028..2eb58da21c 100644 --- a/crypto/cmp/cmp_util.c +++ b/crypto/cmp/cmp_util.c @@ -230,7 +230,7 @@ STACK_OF(X509) goto err; } - if ((csc = X509_STORE_CTX_new_with_libctx(libctx, propq)) == NULL) + if ((csc = X509_STORE_CTX_new_ex(libctx, propq)) == NULL) goto err; if (store == NULL && certs != NULL && !ossl_cmp_X509_STORE_add1_certs(ts, certs, 0)) diff --git a/crypto/cmp/cmp_vfy.c b/crypto/cmp/cmp_vfy.c index 00757c11ae..f9981c2330 100644 --- a/crypto/cmp/cmp_vfy.c +++ b/crypto/cmp/cmp_vfy.c @@ -50,10 +50,10 @@ static int verify_signature(const OSSL_CMP_CTX *cmp_ctx, prot_part.header = msg->header; prot_part.body = msg->body; - if (ASN1_item_verify_with_libctx(ASN1_ITEM_rptr(OSSL_CMP_PROTECTEDPART), - msg->header->protectionAlg, - msg->protection, &prot_part, NULL, pubkey, - cmp_ctx->libctx, cmp_ctx->propq) > 0) { + if (ASN1_item_verify_ex(ASN1_ITEM_rptr(OSSL_CMP_PROTECTEDPART), + msg->header->protectionAlg, msg->protection, + &prot_part, NULL, pubkey, cmp_ctx->libctx, + cmp_ctx->propq) > 0) { res = 1; goto end; } @@ -118,7 +118,7 @@ int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx, return 0; } - if ((csc = X509_STORE_CTX_new_with_libctx(ctx->libctx, ctx->propq)) == NULL + if ((csc = X509_STORE_CTX_new_ex(ctx->libctx, ctx->propq)) == NULL || !X509_STORE_CTX_init(csc, trusted_store, cert, ctx->untrusted)) goto err; @@ -825,8 +825,8 @@ int ossl_cmp_verify_popo(const OSSL_CMP_CTX *ctx, { X509_REQ *req = msg->body->value.p10cr; - if (X509_REQ_verify_with_libctx(req, X509_REQ_get0_pubkey(req), - ctx->libctx, ctx->propq) <= 0) { + if (X509_REQ_verify_ex(req, X509_REQ_get0_pubkey(req), ctx->libctx, + ctx->propq) <= 0) { #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION CMPerr(0, CMP_R_REQUEST_NOT_ACCEPTED); return 0; diff --git a/crypto/cms/cms_cd.c b/crypto/cms/cms_cd.c index c596eab2c2..2abc867a59 100644 --- a/crypto/cms/cms_cd.c +++ b/crypto/cms/cms_cd.c @@ -36,7 +36,7 @@ CMS_ContentInfo *cms_CompressedData_create(int comp_nid, OPENSSL_CTX *libctx, CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM); return NULL; } - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL) return NULL; diff --git a/crypto/cms/cms_dd.c b/crypto/cms/cms_dd.c index 2b2d970acd..6b3796e7c0 100644 --- a/crypto/cms/cms_dd.c +++ b/crypto/cms/cms_dd.c @@ -23,7 +23,7 @@ CMS_ContentInfo *cms_DigestedData_create(const EVP_MD *md, CMS_ContentInfo *cms; CMS_DigestedData *dd; - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL) return NULL; diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index 068696586e..b1bba4c2d6 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -203,14 +203,14 @@ EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri) return NULL; } -CMS_ContentInfo *CMS_EnvelopedData_create_with_libctx(const EVP_CIPHER *cipher, - OPENSSL_CTX *libctx, - const char *propq) +CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher, + OPENSSL_CTX *libctx, + const char *propq) { CMS_ContentInfo *cms; CMS_EnvelopedData *env; - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL) goto merr; env = cms_enveloped_data_init(cms); @@ -229,18 +229,17 @@ CMS_ContentInfo *CMS_EnvelopedData_create_with_libctx(const EVP_CIPHER *cipher, CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher) { - return CMS_EnvelopedData_create_with_libctx(cipher, NULL, NULL); + return CMS_EnvelopedData_create_ex(cipher, NULL, NULL); } CMS_ContentInfo * -CMS_AuthEnvelopedData_create_with_libctx(const EVP_CIPHER *cipher, - OPENSSL_CTX *libctx, - const char *propq) +CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OPENSSL_CTX *libctx, + const char *propq) { CMS_ContentInfo *cms; CMS_AuthEnvelopedData *aenv; - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL) goto merr; aenv = cms_auth_enveloped_data_init(cms); @@ -259,7 +258,7 @@ CMS_AuthEnvelopedData_create_with_libctx(const EVP_CIPHER *cipher, CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher) { - return CMS_AuthEnvelopedData_create_with_libctx(cipher, NULL, NULL); + return CMS_AuthEnvelopedData_create_ex(cipher, NULL, NULL); } /* Key Transport Recipient Info (KTRI) routines */ diff --git a/crypto/cms/cms_ess.c b/crypto/cms/cms_ess.c index fa81b65c7b..7a617c3419 100644 --- a/crypto/cms/cms_ess.c +++ b/crypto/cms/cms_ess.c @@ -114,7 +114,7 @@ int ess_check_signing_certs(CMS_SignerInfo *si, STACK_OF(X509) *chain) return ret; } -CMS_ReceiptRequest *CMS_ReceiptRequest_create0_with_libctx( +CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex( unsigned char *id, int idlen, int allorfirst, STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo, OPENSSL_CTX *libctx, const char *propq) @@ -159,9 +159,8 @@ CMS_ReceiptRequest *CMS_ReceiptRequest_create0( unsigned char *id, int idlen, int allorfirst, STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo) { - return CMS_ReceiptRequest_create0_with_libctx(id, idlen, allorfirst, - receiptList, receiptsTo, - NULL, NULL); + return CMS_ReceiptRequest_create0_ex(id, idlen, allorfirst, receiptList, + receiptsTo, NULL, NULL); } int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr) @@ -221,9 +220,9 @@ static int cms_msgSigDigest(CMS_SignerInfo *si, if (md == NULL) return 0; - if (!asn1_item_digest_with_libctx(ASN1_ITEM_rptr(CMS_Attributes_Verify), md, - si->signedAttrs, dig, diglen, - si->cms_ctx->libctx, si->cms_ctx->propq)) + if (!asn1_item_digest_ex(ASN1_ITEM_rptr(CMS_Attributes_Verify), md, + si->signedAttrs, dig, diglen, si->cms_ctx->libctx, + si->cms_ctx->propq)) return 0; return 1; } diff --git a/crypto/cms/cms_io.c b/crypto/cms/cms_io.c index 70a7c652e9..55a2510ad6 100644 --- a/crypto/cms/cms_io.c +++ b/crypto/cms/cms_io.c @@ -83,11 +83,11 @@ int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) else mdalgs = NULL; - return SMIME_write_ASN1_with_libctx(bio, (ASN1_VALUE *)cms, data, flags, - ctype_nid, econt_nid, mdalgs, - ASN1_ITEM_rptr(CMS_ContentInfo), - cms_ctx_get0_libctx(ctx), - cms_ctx_get0_propq(ctx)); + return SMIME_write_ASN1_ex(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, + econt_nid, mdalgs, + ASN1_ITEM_rptr(CMS_ContentInfo), + cms_ctx_get0_libctx(ctx), + cms_ctx_get0_propq(ctx)); } CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, BIO **bcont, CMS_ContentInfo **cms) diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c index bc7da7ff94..f35e503308 100644 --- a/crypto/cms/cms_lib.c +++ b/crypto/cms/cms_lib.c @@ -40,8 +40,7 @@ int i2d_CMS_ContentInfo(const CMS_ContentInfo *a, unsigned char **out) return ASN1_item_i2d((const ASN1_VALUE *)a, out, (CMS_ContentInfo_it())); } -CMS_ContentInfo *CMS_ContentInfo_new_with_libctx(OPENSSL_CTX *libctx, - const char *propq) +CMS_ContentInfo *CMS_ContentInfo_new_ex(OPENSSL_CTX *libctx, const char *propq) { CMS_ContentInfo *ci; @@ -63,7 +62,7 @@ CMS_ContentInfo *CMS_ContentInfo_new_with_libctx(OPENSSL_CTX *libctx, CMS_ContentInfo *CMS_ContentInfo_new(void) { - return CMS_ContentInfo_new_with_libctx(NULL, NULL); + return CMS_ContentInfo_new_ex(NULL, NULL); } void CMS_ContentInfo_free(CMS_ContentInfo *cms) @@ -120,7 +119,7 @@ const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms) CMS_ContentInfo *cms_Data_create(OPENSSL_CTX *libctx, const char *propq) { - CMS_ContentInfo *cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + CMS_ContentInfo *cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms != NULL) { cms->contentType = OBJ_nid2obj(NID_pkcs7_data); diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 121390a8d5..1338211072 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -411,10 +411,8 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, goto err; if (EVP_PKEY_CTX_set_signature_md(si->pctx, md) <= 0) goto err; - } else if (EVP_DigestSignInit_with_libctx(si->mctx, &si->pctx, - EVP_MD_name(md), - ctx->libctx, ctx->propq, - pk) <= 0) { + } else if (EVP_DigestSignInit_ex(si->mctx, &si->pctx, EVP_MD_name(md), + ctx->libctx, ctx->propq, pk) <= 0) { goto err; } } @@ -676,8 +674,8 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms, CMSerr(CMS_F_CMS_SIGNERINFO_CONTENT_SIGN, ERR_R_MALLOC_FAILURE); goto err; } - if (!EVP_SignFinal_with_libctx(mctx, sig, &siglen, si->pkey, - ctx->libctx, ctx->propq)) { + if (!EVP_SignFinal_ex(mctx, sig, &siglen, si->pkey, ctx->libctx, + ctx->propq)) { CMSerr(CMS_F_CMS_SIGNERINFO_CONTENT_SIGN, CMS_R_SIGNFINAL_ERROR); OPENSSL_free(sig); goto err; @@ -735,9 +733,8 @@ int CMS_SignerInfo_sign(CMS_SignerInfo *si) pctx = si->pctx; else { EVP_MD_CTX_reset(mctx); - if (EVP_DigestSignInit_with_libctx(mctx, &pctx, - md_name, ctx->libctx, ctx->propq, - si->pkey) <= 0) + if (EVP_DigestSignInit_ex(mctx, &pctx, md_name, ctx->libctx, ctx->propq, + si->pkey) <= 0) goto err; si->pctx = pctx; } @@ -844,9 +841,8 @@ int CMS_SignerInfo_verify(CMS_SignerInfo *si) goto err; } mctx = si->mctx; - if (EVP_DigestVerifyInit_with_libctx(mctx, &si->pctx, - EVP_MD_name(md), ctx->libctx, NULL, - si->pkey) <= 0) + if (EVP_DigestVerifyInit_ex(mctx, &si->pctx, EVP_MD_name(md), ctx->libctx, + NULL, si->pkey) <= 0) goto err; if (!cms_sd_asn1_ctrl(si, 1)) diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index a50eee9fa9..f9a851950f 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -118,9 +118,8 @@ int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags) return r; } -CMS_ContentInfo *CMS_data_create_with_libctx(BIO *in, unsigned int flags, - OPENSSL_CTX *libctx, - const char *propq) +CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags, + OPENSSL_CTX *libctx, const char *propq) { CMS_ContentInfo *cms = cms_Data_create(libctx, propq); @@ -136,7 +135,7 @@ CMS_ContentInfo *CMS_data_create_with_libctx(BIO *in, unsigned int flags, CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags) { - return CMS_data_create_with_libctx(in, flags, NULL, NULL); + return CMS_data_create_ex(in, flags, NULL, NULL); } int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, @@ -164,11 +163,9 @@ int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, return r; } -CMS_ContentInfo *CMS_digest_create_with_libctx(BIO *in, - const EVP_MD *md, - unsigned int flags, - OPENSSL_CTX *ctx, - const char *propq) +CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md, + unsigned int flags, OPENSSL_CTX *ctx, + const char *propq) { CMS_ContentInfo *cms; @@ -191,7 +188,7 @@ CMS_ContentInfo *CMS_digest_create_with_libctx(BIO *in, CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags) { - return CMS_digest_create_with_libctx(in, md, flags, NULL, NULL); + return CMS_digest_create_ex(in, md, flags, NULL, NULL); } int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, @@ -220,13 +217,11 @@ int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, return r; } -CMS_ContentInfo *CMS_EncryptedData_encrypt_with_libctx(BIO *in, - const EVP_CIPHER *cipher, - const unsigned char *key, - size_t keylen, - unsigned int flags, - OPENSSL_CTX *libctx, - const char *propq) +CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher, + const unsigned char *key, + size_t keylen, unsigned int flags, + OPENSSL_CTX *libctx, + const char *propq) { CMS_ContentInfo *cms; @@ -234,7 +229,7 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt_with_libctx(BIO *in, CMSerr(0, CMS_R_NO_CIPHER); return NULL; } - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL) return NULL; if (!CMS_EncryptedData_set1_key(cms, cipher, key, keylen)) @@ -255,8 +250,8 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen, unsigned int flags) { - return CMS_EncryptedData_encrypt_with_libctx(in, cipher, key, keylen, flags, - NULL, NULL); + return CMS_EncryptedData_encrypt_ex(in, cipher, key, keylen, flags, NULL, + NULL); } static int cms_signerinfo_verify_cert(CMS_SignerInfo *si, @@ -270,7 +265,7 @@ static int cms_signerinfo_verify_cert(CMS_SignerInfo *si, X509 *signer; int i, j, r = 0; - ctx = X509_STORE_CTX_new_with_libctx(cms_ctx->libctx, cms_ctx->propq); + ctx = X509_STORE_CTX_new_ex(cms_ctx->libctx, cms_ctx->propq); if (ctx == NULL) { CMSerr(CMS_F_CMS_SIGNERINFO_VERIFY_CERT, ERR_R_MALLOC_FAILURE); goto err; @@ -503,15 +498,15 @@ int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, return cms_Receipt_verify(rcms, ocms); } -CMS_ContentInfo *CMS_sign_with_libctx(X509 *signcert, EVP_PKEY *pkey, - STACK_OF(X509) *certs, BIO *data, - unsigned int flags, - OPENSSL_CTX *libctx, const char *propq) +CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey, + STACK_OF(X509) *certs, BIO *data, + unsigned int flags, OPENSSL_CTX *libctx, + const char *propq) { CMS_ContentInfo *cms; int i; - cms = CMS_ContentInfo_new_with_libctx(libctx, propq); + cms = CMS_ContentInfo_new_ex(libctx, propq); if (cms == NULL || !CMS_SignedData_init(cms)) goto merr; if (flags & CMS_ASCIICRLF @@ -551,7 +546,7 @@ CMS_ContentInfo *CMS_sign_with_libctx(X509 *signcert, EVP_PKEY *pkey, CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, unsigned int flags) { - return CMS_sign_with_libctx(signcert, pkey, certs, data, flags, NULL, NULL); + return CMS_sign_ex(signcert, pkey, certs, data, flags, NULL, NULL); } CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, @@ -575,8 +570,7 @@ CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, /* Initialize signed data */ - cms = CMS_sign_with_libctx(NULL, NULL, certs, NULL, flags, - ctx->libctx, ctx->propq); + cms = CMS_sign_ex(NULL, NULL, certs, NULL, flags, ctx->libctx, ctx->propq); if (cms == NULL) goto err; @@ -623,10 +617,9 @@ CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, } -CMS_ContentInfo *CMS_encrypt_with_libctx(STACK_OF(X509) *certs, - BIO *data, const EVP_CIPHER *cipher, - unsigned int flags, - OPENSSL_CTX *libctx, const char *propq) +CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *data, + const EVP_CIPHER *cipher, unsigned int flags, + OPENSSL_CTX *libctx, const char *propq) { CMS_ContentInfo *cms; int i; @@ -634,8 +627,8 @@ CMS_ContentInfo *CMS_encrypt_with_libctx(STACK_OF(X509) *certs, cms = (EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) - ? CMS_AuthEnvelopedData_create_with_libctx(cipher, libctx, propq) - : CMS_EnvelopedData_create_with_libctx(cipher, libctx, propq); + ? CMS_AuthEnvelopedData_create_ex(cipher, libctx, propq) + : CMS_EnvelopedData_create_ex(cipher, libctx, propq); if (cms == NULL) goto merr; for (i = 0; i < sk_X509_num(certs); i++) { @@ -665,7 +658,7 @@ CMS_ContentInfo *CMS_encrypt_with_libctx(STACK_OF(X509) *certs, CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *data, const EVP_CIPHER *cipher, unsigned int flags) { - return CMS_encrypt_with_libctx(certs, data, cipher, flags, NULL, NULL); + return CMS_encrypt_ex(certs, data, cipher, flags, NULL, NULL); } static int cms_kari_set1_pkey_and_peer(CMS_ContentInfo *cms, diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index a9d960b721..4cc698400c 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -174,7 +174,7 @@ int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) * the "CONF classic" functions, for consistency. */ -CONF *NCONF_new_with_libctx(OPENSSL_CTX *libctx, CONF_METHOD *meth) +CONF *NCONF_new_ex(OPENSSL_CTX *libctx, CONF_METHOD *meth) { CONF *ret; @@ -193,7 +193,7 @@ CONF *NCONF_new_with_libctx(OPENSSL_CTX *libctx, CONF_METHOD *meth) CONF *NCONF_new(CONF_METHOD *meth) { - return NCONF_new_with_libctx(NULL, meth); + return NCONF_new_ex(NULL, meth); } void NCONF_free(CONF *conf) diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index fa7f6b9d9f..5359a7e06d 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -145,15 +145,14 @@ int CONF_modules_load(const CONF *cnf, const char *appname, } -int CONF_modules_load_file_with_libctx(OPENSSL_CTX *libctx, - const char *filename, - const char *appname, unsigned long flags) +int CONF_modules_load_file_ex(OPENSSL_CTX *libctx, const char *filename, + const char *appname, unsigned long flags) { char *file = NULL; CONF *conf = NULL; int ret = 0, diagnostics = 0; - conf = NCONF_new_with_libctx(libctx, NULL); + conf = NCONF_new_ex(libctx, NULL); if (conf == NULL) goto err; @@ -191,7 +190,7 @@ int CONF_modules_load_file_with_libctx(OPENSSL_CTX *libctx, int CONF_modules_load_file(const char *filename, const char *appname, unsigned long flags) { - return CONF_modules_load_file_with_libctx(NULL, filename, appname, flags); + return CONF_modules_load_file_ex(NULL, filename, appname, flags); } DEFINE_RUN_ONCE_STATIC(do_load_builtin_modules) diff --git a/crypto/context.c b/crypto/context.c index de289fcb68..1bc4bee290 100644 --- a/crypto/context.c +++ b/crypto/context.c @@ -170,7 +170,7 @@ OPENSSL_CTX *OPENSSL_CTX_new(void) #ifndef FIPS_MODULE int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file) { - return CONF_modules_load_file_with_libctx(ctx, config_file, NULL, 0) > 0; + return CONF_modules_load_file_ex(ctx, config_file, NULL, 0) > 0; } #endif diff --git a/crypto/crmf/crmf_lib.c b/crypto/crmf/crmf_lib.c index 5a6cdb7e82..3e971c7769 100644 --- a/crypto/crmf/crmf_lib.c +++ b/crypto/crmf/crmf_lib.c @@ -365,10 +365,9 @@ static int create_popo_signature(OSSL_CRMF_POPOSIGNINGKEY *ps, return 0; } - return ASN1_item_sign_with_libctx(ASN1_ITEM_rptr(OSSL_CRMF_CERTREQUEST), - ps->algorithmIdentifier, NULL, - ps->signature, cr, NULL, pkey, digest, - libctx, propq); + return ASN1_item_sign_ex(ASN1_ITEM_rptr(OSSL_CRMF_CERTREQUEST), + ps->algorithmIdentifier, NULL, ps->signature, cr, + NULL, pkey, digest, libctx, propq); } @@ -502,10 +501,9 @@ int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs, it = ASN1_ITEM_rptr(OSSL_CRMF_CERTREQUEST); asn = req->certReq; } - if (ASN1_item_verify_with_libctx(it, sig->algorithmIdentifier, - sig->signature, asn, NULL, - X509_PUBKEY_get0(pubkey), - libctx, propq) < 1) + if (ASN1_item_verify_ex(it, sig->algorithmIdentifier, sig->signature, + asn, NULL, X509_PUBKEY_get0(pubkey), libctx, + propq) < 1) return 0; break; case OSSL_CRMF_POPO_KEYENC: @@ -680,7 +678,7 @@ X509 outlen += n; /* convert decrypted certificate from DER to internal ASN.1 structure */ - if ((cert = X509_new_with_libctx(libctx, propq)) == NULL) + if ((cert = X509_new_ex(libctx, propq)) == NULL) goto end; if (d2i_X509(&cert, &p, outlen) == NULL) CRMFerr(CRMF_F_OSSL_CRMF_ENCRYPTEDVALUE_GET1_ENCCERT, diff --git a/crypto/ct/ct_b64.c b/crypto/ct/ct_b64.c index ab4aaf82c1..575524e1db 100644 --- a/crypto/ct/ct_b64.c +++ b/crypto/ct/ct_b64.c @@ -132,9 +132,9 @@ SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64, * 0 on decoding failure, or invalid parameter if any * -1 on internal (malloc) failure */ -int CTLOG_new_from_base64_with_libctx(CTLOG **ct_log, const char *pkey_base64, - const char *name, OPENSSL_CTX *libctx, - const char *propq) +int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64, + const char *name, OPENSSL_CTX *libctx, + const char *propq) { unsigned char *pkey_der = NULL; int pkey_der_len; @@ -160,7 +160,7 @@ int CTLOG_new_from_base64_with_libctx(CTLOG **ct_log, const char *pkey_base64, return 0; } - *ct_log = CTLOG_new_with_libctx(pkey, name, libctx, propq); + *ct_log = CTLOG_new_ex(pkey, name, libctx, propq); if (*ct_log == NULL) { EVP_PKEY_free(pkey); return 0; @@ -172,6 +172,5 @@ int CTLOG_new_from_base64_with_libctx(CTLOG **ct_log, const char *pkey_base64, int CTLOG_new_from_base64(CTLOG **ct_log, const char *pkey_base64, const char *name) { - return CTLOG_new_from_base64_with_libctx(ct_log, pkey_base64, name, NULL, - NULL); + return CTLOG_new_from_base64_ex(ct_log, pkey_base64, name, NULL, NULL); } diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index 32a29ed699..9a32054c41 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -100,7 +100,7 @@ err: return ret; } -CTLOG_STORE *CTLOG_STORE_new_with_libctx(OPENSSL_CTX *libctx, const char *propq) +CTLOG_STORE *CTLOG_STORE_new_ex(OPENSSL_CTX *libctx, const char *propq) { CTLOG_STORE *ret = OPENSSL_zalloc(sizeof(*ret)); @@ -132,7 +132,7 @@ err: CTLOG_STORE *CTLOG_STORE_new(void) { - return CTLOG_STORE_new_with_libctx(NULL, NULL); + return CTLOG_STORE_new_ex(NULL, NULL); } void CTLOG_STORE_free(CTLOG_STORE *store) @@ -161,8 +161,8 @@ static int ctlog_new_from_conf(CTLOG_STORE *store, CTLOG **ct_log, return 0; } - return CTLOG_new_from_base64_with_libctx(ct_log, pkey_base64, description, - store->libctx, store->propq); + return CTLOG_new_from_base64_ex(ct_log, pkey_base64, description, + store->libctx, store->propq); } int CTLOG_STORE_load_default_file(CTLOG_STORE *store) @@ -264,8 +264,8 @@ end: * Takes ownership of the public key. * Copies the name. */ -CTLOG *CTLOG_new_with_libctx(EVP_PKEY *public_key, const char *name, - OPENSSL_CTX *libctx, const char *propq) +CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OPENSSL_CTX *libctx, + const char *propq) { CTLOG *ret = OPENSSL_zalloc(sizeof(*ret)); @@ -301,7 +301,7 @@ err: CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name) { - return CTLOG_new_with_libctx(public_key, name, NULL, NULL); + return CTLOG_new_ex(public_key, name, NULL, NULL); } /* Frees CT log and associated structures */ diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c index e067fd8ea5..268ef22b58 100644 --- a/crypto/ct/ct_policy.c +++ b/crypto/ct/ct_policy.c @@ -25,8 +25,8 @@ */ static const time_t SCT_CLOCK_DRIFT_TOLERANCE = 300; -CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_with_libctx(OPENSSL_CTX *libctx, - const char *propq) +CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OPENSSL_CTX *libctx, + const char *propq) { CT_POLICY_EVAL_CTX *ctx = OPENSSL_zalloc(sizeof(CT_POLICY_EVAL_CTX)); @@ -54,7 +54,7 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_with_libctx(OPENSSL_CTX *libctx, CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void) { - return CT_POLICY_EVAL_CTX_new_with_libctx(NULL, NULL); + return CT_POLICY_EVAL_CTX_new_ex(NULL, NULL); } void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx) diff --git a/crypto/ct/ct_vfy.c b/crypto/ct/ct_vfy.c index b05e77b8a1..db0a3d83bd 100644 --- a/crypto/ct/ct_vfy.c +++ b/crypto/ct/ct_vfy.c @@ -122,9 +122,8 @@ int SCT_CTX_verify(const SCT_CTX *sctx, const SCT *sct) if (ctx == NULL) goto end; - if (!EVP_DigestVerifyInit_with_libctx(ctx, NULL, - "SHA2-256", sctx->libctx, sctx->propq, - sctx->pkey)) + if (!EVP_DigestVerifyInit_ex(ctx, NULL, "SHA2-256", sctx->libctx, + sctx->propq, sctx->pkey)) goto end; if (!sct_ctx_update(ctx, sctx, sct)) diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index f89dd44ffd..cd318654cf 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -560,7 +560,7 @@ static int dh_pkey_import_from_type(const OSSL_PARAM params[], void *vpctx, { EVP_PKEY_CTX *pctx = vpctx; EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); - DH *dh = dh_new_with_libctx(pctx->libctx); + DH *dh = dh_new_ex(pctx->libctx); if (dh == NULL) { ERR_raise(ERR_LIB_DH, ERR_R_MALLOC_FAILURE); diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c index 52f3151bc8..096cf12886 100644 --- a/crypto/dh/dh_gen.c +++ b/crypto/dh/dh_gen.c @@ -100,7 +100,7 @@ static int dh_gen_named_group(OPENSSL_CTX *libctx, DH *ret, int prime_len) if (nid == NID_undef) return 0; - dh = dh_new_by_nid_with_libctx(libctx, nid); + dh = dh_new_by_nid_ex(libctx, nid); if (dh != NULL && ffc_params_copy(&ret->params, &dh->params)) { ok = 1; diff --git a/crypto/dh/dh_group_params.c b/crypto/dh/dh_group_params.c index e0daa6ebc4..7a19f71b4d 100644 --- a/crypto/dh/dh_group_params.c +++ b/crypto/dh/dh_group_params.c @@ -103,7 +103,7 @@ const char *ffc_named_group_from_uid(int uid) static DH *dh_param_init(OPENSSL_CTX *libctx, int uid, const BIGNUM *p, const BIGNUM *q, const BIGNUM *g) { - DH *dh = dh_new_with_libctx(libctx); + DH *dh = dh_new_ex(libctx); if (dh == NULL) return NULL; @@ -136,7 +136,7 @@ static DH *dh_new_by_group_name(OPENSSL_CTX *libctx, const char *name) return NULL; } -DH *dh_new_by_nid_with_libctx(OPENSSL_CTX *libctx, int nid) +DH *dh_new_by_nid_ex(OPENSSL_CTX *libctx, int nid) { const char *name = ffc_named_group_from_uid(nid); @@ -145,7 +145,7 @@ DH *dh_new_by_nid_with_libctx(OPENSSL_CTX *libctx, int nid) DH *DH_new_by_nid(int nid) { - return dh_new_by_nid_with_libctx(NULL, nid); + return dh_new_by_nid_ex(NULL, nid); } int ffc_set_group_pqg(FFC_PARAMS *ffc, const char *group_name) diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index a6f4e64137..6c6eda27a2 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -63,7 +63,7 @@ DH *DH_new_method(ENGINE *engine) } #endif /* !FIPS_MODULE */ -DH *dh_new_with_libctx(OPENSSL_CTX *libctx) +DH *dh_new_ex(OPENSSL_CTX *libctx) { return dh_new_intern(NULL, libctx); } diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index 3312faa336..4bbbabff07 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -112,7 +112,7 @@ static EC_KEY *eckey_type2param(int ptype, const void *pval, EC_KEY *eckey = NULL; EC_GROUP *group = NULL; - if ((eckey = EC_KEY_new_with_libctx(libctx, propq)) == NULL) { + if ((eckey = EC_KEY_new_ex(libctx, propq)) == NULL) { ECerr(EC_F_ECKEY_TYPE2PARAM, ERR_R_MALLOC_FAILURE); goto ecerr; } @@ -134,8 +134,7 @@ static EC_KEY *eckey_type2param(int ptype, const void *pval, * type == V_ASN1_OBJECT => the parameters are given by an asn1 OID */ - group = EC_GROUP_new_by_curve_name_with_libctx(libctx, propq, - OBJ_obj2nid(poid)); + group = EC_GROUP_new_by_curve_name_ex(libctx, propq, OBJ_obj2nid(poid)); if (group == NULL) goto ecerr; EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE); @@ -206,10 +205,8 @@ static int eckey_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) return -2; } -static int eckey_priv_decode_with_libctx(EVP_PKEY *pkey, - const PKCS8_PRIV_KEY_INFO *p8, - OPENSSL_CTX *libctx, - const char *propq) +static int eckey_priv_decode_ex(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8, + OPENSSL_CTX *libctx, const char *propq) { const unsigned char *p = NULL; const void *pval; @@ -744,7 +741,7 @@ static int ec_pkey_import_from(const OSSL_PARAM params[], void *vpctx) { EVP_PKEY_CTX *pctx = vpctx; EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); - EC_KEY *ec = EC_KEY_new_with_libctx(pctx->libctx, pctx->propquery); + EC_KEY *ec = EC_KEY_new_ex(pctx->libctx, pctx->propquery); if (ec == NULL) { ERR_raise(ERR_LIB_DH, ERR_R_MALLOC_FAILURE); @@ -808,7 +805,7 @@ const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = { ec_pkey_dirty_cnt, ec_pkey_export_to, ec_pkey_import_from, - eckey_priv_decode_with_libctx + eckey_priv_decode_ex }; #if !defined(OPENSSL_NO_SM2) diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index a63a8535c3..d8f46f4849 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -3197,8 +3197,8 @@ static EC_GROUP *ec_group_new_from_data(OPENSSL_CTX *libctx, /* If no curve data curve method must handle everything */ if (curve.data == NULL) - return ec_group_new_with_libctx(libctx, propq, - curve.meth != NULL ? curve.meth() : NULL); + return ec_group_new_ex(libctx, propq, + curve.meth != NULL ? curve.meth() : NULL); if ((ctx = BN_CTX_new_ex(libctx)) == NULL) { ECerr(EC_F_EC_GROUP_NEW_FROM_DATA, ERR_R_MALLOC_FAILURE); @@ -3220,7 +3220,7 @@ static EC_GROUP *ec_group_new_from_data(OPENSSL_CTX *libctx, if (curve.meth != 0) { meth = curve.meth(); - if (((group = ec_group_new_with_libctx(libctx, propq, meth)) == NULL) || + if (((group = ec_group_new_ex(libctx, propq, meth)) == NULL) || (!(group->meth->group_set_curve(group, p, a, b, ctx)))) { ECerr(EC_F_EC_GROUP_NEW_FROM_DATA, ERR_R_EC_LIB); goto err; @@ -3290,8 +3290,8 @@ static EC_GROUP *ec_group_new_from_data(OPENSSL_CTX *libctx, return group; } -EC_GROUP *EC_GROUP_new_by_curve_name_with_libctx(OPENSSL_CTX *libctx, - const char *propq, int nid) +EC_GROUP *EC_GROUP_new_by_curve_name_ex(OPENSSL_CTX *libctx, const char *propq, + int nid) { EC_GROUP *ret = NULL; const ec_list_element *curve; @@ -3311,7 +3311,7 @@ EC_GROUP *EC_GROUP_new_by_curve_name_with_libctx(OPENSSL_CTX *libctx, #ifndef FIPS_MODULE EC_GROUP *EC_GROUP_new_by_curve_name(int nid) { - return EC_GROUP_new_by_curve_name_with_libctx(NULL, NULL, nid); + return EC_GROUP_new_by_curve_name_ex(NULL, NULL, nid); } #endif diff --git a/crypto/ec/ec_cvt.c b/crypto/ec/ec_cvt.c index e5e6f10ce4..57e53d752e 100644 --- a/crypto/ec/ec_cvt.c +++ b/crypto/ec/ec_cvt.c @@ -54,7 +54,7 @@ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, meth = EC_GFp_mont_method(); #endif - ret = ec_group_new_with_libctx(bn_get_lib_ctx(ctx), NULL, meth); + ret = ec_group_new_ex(bn_get_lib_ctx(ctx), NULL, meth); if (ret == NULL) return NULL; @@ -75,7 +75,7 @@ EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, meth = EC_GF2m_simple_method(); - ret = ec_group_new_with_libctx(bn_get_lib_ctx(ctx), NULL, meth); + ret = ec_group_new_ex(bn_get_lib_ctx(ctx), NULL, meth); if (ret == NULL) return NULL; diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 89a28622bb..807b5e670a 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -34,18 +34,18 @@ EC_KEY *EC_KEY_new(void) } #endif -EC_KEY *EC_KEY_new_with_libctx(OPENSSL_CTX *ctx, const char *propq) +EC_KEY *EC_KEY_new_ex(OPENSSL_CTX *ctx, const char *propq) { return ec_key_new_method_int(ctx, propq, NULL); } -EC_KEY *EC_KEY_new_by_curve_name_with_libctx(OPENSSL_CTX *ctx, - const char *propq, int nid) +EC_KEY *EC_KEY_new_by_curve_name_ex(OPENSSL_CTX *ctx, const char *propq, + int nid) { - EC_KEY *ret = EC_KEY_new_with_libctx(ctx, propq); + EC_KEY *ret = EC_KEY_new_ex(ctx, propq); if (ret == NULL) return NULL; - ret->group = EC_GROUP_new_by_curve_name_with_libctx(ctx, propq, nid); + ret->group = EC_GROUP_new_by_curve_name_ex(ctx, propq, nid); if (ret->group == NULL) { EC_KEY_free(ret); return NULL; @@ -61,7 +61,7 @@ EC_KEY *EC_KEY_new_by_curve_name_with_libctx(OPENSSL_CTX *ctx, #ifndef FIPS_MODULE EC_KEY *EC_KEY_new_by_curve_name(int nid) { - return EC_KEY_new_by_curve_name_with_libctx(NULL, NULL, nid); + return EC_KEY_new_by_curve_name_ex(NULL, NULL, nid); } #endif @@ -122,8 +122,7 @@ EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) if (src->group != NULL) { /* clear the old group */ EC_GROUP_free(dest->group); - dest->group = ec_group_new_with_libctx(src->libctx, src->propq, - src->group->meth); + dest->group = ec_group_new_ex(src->libctx, src->propq, src->group->meth); if (dest->group == NULL) return NULL; if (!EC_GROUP_copy(dest->group, src->group)) diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 222df55632..72ada1f723 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -26,8 +26,8 @@ /* functions for EC_GROUP objects */ -EC_GROUP *ec_group_new_with_libctx(OPENSSL_CTX *libctx, const char *propq, - const EC_METHOD *meth) +EC_GROUP *ec_group_new_ex(OPENSSL_CTX *libctx, const char *propq, + const EC_METHOD *meth) { EC_GROUP *ret; @@ -81,7 +81,7 @@ EC_GROUP *ec_group_new_with_libctx(OPENSSL_CTX *libctx, const char *propq, # ifndef FIPS_MODULE EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) { - return ec_group_new_with_libctx(NULL, NULL, meth); + return ec_group_new_ex(NULL, NULL, meth); } # endif #endif @@ -271,7 +271,7 @@ EC_GROUP *EC_GROUP_dup(const EC_GROUP *a) if (a == NULL) return NULL; - if ((t = ec_group_new_with_libctx(a->libctx, a->propq, a->meth)) == NULL) + if ((t = ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL) return NULL; if (!EC_GROUP_copy(t, a)) goto err; @@ -1438,8 +1438,7 @@ static EC_GROUP *ec_group_explicit_to_named(const EC_GROUP *group, curve_name_nid = NID_secp224r1; #endif /* !def(OPENSSL_NO_EC_NISTP_64_GCC_128) */ - ret_group = EC_GROUP_new_by_curve_name_with_libctx(libctx, propq, - curve_name_nid); + ret_group = EC_GROUP_new_by_curve_name_ex(libctx, propq, curve_name_nid); if (ret_group == NULL) goto err; @@ -1522,7 +1521,7 @@ static EC_GROUP *group_new_from_name(const OSSL_PARAM *p, ECerr(0, EC_R_INVALID_CURVE); return NULL; } else { - return EC_GROUP_new_by_curve_name_with_libctx(libctx, propq, nid); + return EC_GROUP_new_by_curve_name_ex(libctx, propq, nid); } } return NULL; diff --git a/crypto/ec/ec_local.h b/crypto/ec/ec_local.h index 11fab6b985..33f40167aa 100644 --- a/crypto/ec/ec_local.h +++ b/crypto/ec/ec_local.h @@ -601,8 +601,8 @@ int ec_group_simple_order_bits(const EC_GROUP *group); * \param meth EC_METHOD to use * \return newly created EC_GROUP object or NULL in case of an error. */ -EC_GROUP *ec_group_new_with_libctx(OPENSSL_CTX *libctx, const char *propq, - const EC_METHOD *meth); +EC_GROUP *ec_group_new_ex(OPENSSL_CTX *libctx, const char *propq, + const EC_METHOD *meth); #ifdef ECP_NISTZ256_ASM /** Returns GFp methods using montgomery multiplication, with x86-64 optimized diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c index 99f1e480c1..9aab96a050 100644 --- a/crypto/ec/ecx_meth.c +++ b/crypto/ec/ecx_meth.c @@ -149,9 +149,8 @@ static int ecx_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; } -static int ecx_priv_decode_with_libctx(EVP_PKEY *pkey, - const PKCS8_PRIV_KEY_INFO *p8, - OPENSSL_CTX *libctx, const char *propq) +static int ecx_priv_decode_ex(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8, + OPENSSL_CTX *libctx, const char *propq) { const unsigned char *p; int plen; @@ -505,7 +504,7 @@ const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth = { ecx_pkey_export_to, x25519_import_from, - ecx_priv_decode_with_libctx + ecx_priv_decode_ex }; static int x448_import_from(const OSSL_PARAM params[], void *vpctx) @@ -558,7 +557,7 @@ const EVP_PKEY_ASN1_METHOD ecx448_asn1_meth = { ecx_pkey_export_to, x448_import_from, - ecx_priv_decode_with_libctx + ecx_priv_decode_ex }; static int ecd_size25519(const EVP_PKEY *pkey) @@ -684,7 +683,7 @@ const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { ecx_pkey_export_to, ed25519_import_from, - ecx_priv_decode_with_libctx + ecx_priv_decode_ex }; static int ed448_import_from(const OSSL_PARAM params[], void *vpctx) @@ -736,7 +735,7 @@ const EVP_PKEY_ASN1_METHOD ed448_asn1_meth = { ecx_pkey_export_to, ed448_import_from, - ecx_priv_decode_with_libctx + ecx_priv_decode_ex }; static int pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index fb29ab5f08..524d3ede8d 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -82,9 +82,8 @@ int EVP_MD_CTX_reset(EVP_MD_CTX *ctx) } #ifndef FIPS_MODULE -EVP_MD_CTX *evp_md_ctx_new_with_libctx(EVP_PKEY *pkey, - const ASN1_OCTET_STRING *id, - OPENSSL_CTX *libctx, const char *propq) +EVP_MD_CTX *evp_md_ctx_new_ex(EVP_PKEY *pkey, const ASN1_OCTET_STRING *id, + OPENSSL_CTX *libctx, const char *propq) { EVP_MD_CTX *ctx; EVP_PKEY_CTX *pctx = NULL; @@ -351,8 +350,8 @@ int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate(). * Some code calls EVP_DigestUpdate() directly even when initialised - * with EVP_DigestSignInit_with_libctx() or - * EVP_DigestVerifyInit_with_libctx(), so we detect that and redirect to + * with EVP_DigestSignInit_ex() or + * EVP_DigestVerifyInit_ex(), so we detect that and redirect to * the correct EVP_Digest*Update() function */ if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX) diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 45666a2c42..b9fabf29f0 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -18,8 +18,8 @@ /* Extract a private key from a PKCS8 structure */ -EVP_PKEY *EVP_PKCS82PKEY_with_libctx(const PKCS8_PRIV_KEY_INFO *p8, - OPENSSL_CTX *libctx, const char *propq) +EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OPENSSL_CTX *libctx, + const char *propq) { EVP_PKEY *pkey = NULL; const ASN1_OBJECT *algoid; @@ -40,8 +40,8 @@ EVP_PKEY *EVP_PKCS82PKEY_with_libctx(const PKCS8_PRIV_KEY_INFO *p8, goto error; } - if (pkey->ameth->priv_decode_with_libctx != NULL) { - if (!pkey->ameth->priv_decode_with_libctx(pkey, p8, libctx, propq)) + if (pkey->ameth->priv_decode_ex != NULL) { + if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) goto error; } else if (pkey->ameth->priv_decode != NULL) { if (!pkey->ameth->priv_decode(pkey, p8)) { @@ -62,7 +62,7 @@ EVP_PKEY *EVP_PKCS82PKEY_with_libctx(const PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8) { - return EVP_PKCS82PKEY_with_libctx(p8, NULL, NULL); + return EVP_PKCS82PKEY_ex(p8, NULL, NULL); } /* Turn a private key into a PKCS8 structure */ diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c index e83a7e654a..faf5191234 100644 --- a/crypto/evp/m_sigver.c +++ b/crypto/evp/m_sigver.c @@ -310,10 +310,9 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, return ret > 0 ? 1 : 0; } -int EVP_DigestSignInit_with_libctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, - const char *mdname, - OPENSSL_CTX *libctx, const char *props, - EVP_PKEY *pkey) +int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, + const char *mdname, OPENSSL_CTX *libctx, + const char *props, EVP_PKEY *pkey) { return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, NULL, pkey, 0); } @@ -324,10 +323,9 @@ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, return do_sigver_init(ctx, pctx, type, NULL, NULL, NULL, e, pkey, 0); } -int EVP_DigestVerifyInit_with_libctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, - const char *mdname, - OPENSSL_CTX *libctx, const char *props, - EVP_PKEY *pkey) +int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, + const char *mdname, OPENSSL_CTX *libctx, + const char *props, EVP_PKEY *pkey) { return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, NULL, pkey, 1); } diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c index 7b8f99d511..b827899445 100644 --- a/crypto/evp/p5_crpt2.c +++ b/crypto/evp/p5_crpt2.c @@ -19,11 +19,10 @@ #include "crypto/evp.h" #include "evp_local.h" -int pkcs5_pbkdf2_hmac_with_libctx(const char *pass, int passlen, - const unsigned char *salt, int saltlen, - int iter, const EVP_MD *digest, int keylen, - unsigned char *out, - OPENSSL_CTX *libctx, const char *propq) +int pkcs5_pbkdf2_hmac_ex(const char *pass, int passlen, + const unsigned char *salt, int saltlen, int iter, + const EVP_MD *digest, int keylen, unsigned char *out, + OPENSSL_CTX *libctx, const char *propq) { const char *empty = ""; int rv = 1, mode = 1; @@ -84,8 +83,8 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, const EVP_MD *digest, int keylen, unsigned char *out) { - return pkcs5_pbkdf2_hmac_with_libctx(pass, passlen, salt, saltlen, iter, - digest, keylen, out, NULL, NULL); + return pkcs5_pbkdf2_hmac_ex(pass, passlen, salt, saltlen, iter, digest, + keylen, out, NULL, NULL); } diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index f3ada343fc..e3a885cd7a 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -450,11 +450,10 @@ static EVP_PKEY *new_raw_key_int(OPENSSL_CTX *libctx, return pkey; } -EVP_PKEY *EVP_PKEY_new_raw_private_key_with_libctx(OPENSSL_CTX *libctx, - const char *keytype, - const char *propq, - const unsigned char *priv, - size_t len) +EVP_PKEY *EVP_PKEY_new_raw_private_key_ex(OPENSSL_CTX *libctx, + const char *keytype, + const char *propq, + const unsigned char *priv, size_t len) { return new_raw_key_int(libctx, keytype, propq, EVP_PKEY_NONE, NULL, priv, len, 1); @@ -467,11 +466,9 @@ EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e, return new_raw_key_int(NULL, NULL, NULL, type, e, priv, len, 1); } -EVP_PKEY *EVP_PKEY_new_raw_public_key_with_libctx(OPENSSL_CTX *libctx, - const char *keytype, - const char *propq, - const unsigned char *pub, - size_t len) +EVP_PKEY *EVP_PKEY_new_raw_public_key_ex(OPENSSL_CTX *libctx, + const char *keytype, const char *propq, + const unsigned char *pub, size_t len) { return new_raw_key_int(libctx, keytype, propq, EVP_PKEY_NONE, NULL, pub, len, 0); @@ -636,11 +633,9 @@ static EVP_PKEY *new_cmac_key_int(const unsigned char *priv, size_t len, # endif } -EVP_PKEY *EVP_PKEY_new_CMAC_key_with_libctx(const unsigned char *priv, - size_t len, - const char *cipher_name, - OPENSSL_CTX *libctx, - const char *propq) +EVP_PKEY *EVP_PKEY_new_CMAC_key_ex(const unsigned char *priv, size_t len, + const char *cipher_name, OPENSSL_CTX *libctx, + const char *propq) { return new_cmac_key_int(priv, len, cipher_name, NULL, libctx, propq, NULL); } diff --git a/crypto/evp/p_sign.c b/crypto/evp/p_sign.c index 2c4f49a528..f530091a3e 100644 --- a/crypto/evp/p_sign.c +++ b/crypto/evp/p_sign.c @@ -14,9 +14,9 @@ #include #include "crypto/evp.h" -int EVP_SignFinal_with_libctx(EVP_MD_CTX *ctx, unsigned char *sigret, - unsigned int *siglen, EVP_PKEY *pkey, - OPENSSL_CTX *libctx, const char *propq) +int EVP_SignFinal_ex(EVP_MD_CTX *ctx, unsigned char *sigret, + unsigned int *siglen, EVP_PKEY *pkey, OPENSSL_CTX *libctx, + const char *propq) { unsigned char m[EVP_MAX_MD_SIZE]; unsigned int m_len = 0; @@ -65,5 +65,5 @@ int EVP_SignFinal_with_libctx(EVP_MD_CTX *ctx, unsigned char *sigret, int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey) { - return EVP_SignFinal_with_libctx(ctx, sigret, siglen, pkey, NULL, NULL); + return EVP_SignFinal_ex(ctx, sigret, siglen, pkey, NULL, NULL); } diff --git a/crypto/evp/p_verify.c b/crypto/evp/p_verify.c index db14866af0..dc1ee84c15 100644 --- a/crypto/evp/p_verify.c +++ b/crypto/evp/p_verify.c @@ -14,9 +14,9 @@ #include #include "crypto/evp.h" -int EVP_VerifyFinal_with_libctx(EVP_MD_CTX *ctx, const unsigned char *sigbuf, - unsigned int siglen, EVP_PKEY *pkey, - OPENSSL_CTX *libctx, const char *propq) +int EVP_VerifyFinal_ex(EVP_MD_CTX *ctx, const unsigned char *sigbuf, + unsigned int siglen, EVP_PKEY *pkey, OPENSSL_CTX *libctx, + const char *propq) { unsigned char m[EVP_MAX_MD_SIZE]; unsigned int m_len = 0; @@ -59,5 +59,5 @@ int EVP_VerifyFinal_with_libctx(EVP_MD_CTX *ctx, const unsigned char *sigbuf, int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, unsigned int siglen, EVP_PKEY *pkey) { - return EVP_VerifyFinal_with_libctx(ctx, sigbuf, siglen, pkey, NULL, NULL); + return EVP_VerifyFinal_ex(ctx, sigbuf, siglen, pkey, NULL, NULL); } diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index ef023205c0..57e02e9db3 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -25,9 +25,8 @@ #ifndef OPENSSL_NO_STDIO STACK_OF(X509_INFO) -*PEM_X509_INFO_read_with_libctx(FILE *fp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) +*PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, + void *u, OPENSSL_CTX *libctx, const char *propq) { BIO *b; STACK_OF(X509_INFO) *ret; @@ -37,7 +36,7 @@ STACK_OF(X509_INFO) return 0; } BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = PEM_X509_INFO_read_bio_with_libctx(b, sk, cb, u, libctx, propq); + ret = PEM_X509_INFO_read_bio_ex(b, sk, cb, u, libctx, propq); BIO_free(b); return ret; } @@ -45,14 +44,14 @@ STACK_OF(X509_INFO) STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u) { - return PEM_X509_INFO_read_with_libctx(fp, sk, cb, u, NULL, NULL); + return PEM_X509_INFO_read_ex(fp, sk, cb, u, NULL, NULL); } #endif STACK_OF(X509_INFO) -*PEM_X509_INFO_read_bio_wi