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/cmp/cmp_protect.c | 6 +++--- crypto/cmp/cmp_util.c | 2 +- crypto/cmp/cmp_vfy.c | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'crypto/cmp') diff --git a/crypto/cmp/cmp_protect.c b/crypto/cmp/cmp_protect.c index eb162e3..9b28f1b 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 12afe57..2eb58da 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 00757c1..f9981c2 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; -- cgit v1.1