diff options
author | Matt Caswell <matt@openssl.org> | 2020-09-24 10:42:23 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-01 09:25:20 +0100 |
commit | d8652be06e2778e8898453a391deb7253e1a35a2 (patch) | |
tree | fe40e22edb39642aa7ae633320c1900388f2e7ee /crypto/asn1 | |
parent | aedac96c1172ca9a9efe72e027e935504b599e2f (diff) |
Run the withlibctx.pl script
Automatically rename all instances of _with_libctx() to _ex() as per
our coding style.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12970)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_digest.c | 9 | ||||
-rw-r--r-- | crypto/asn1/a_sign.c | 16 | ||||
-rw-r--r-- | crypto/asn1/a_verify.c | 14 | ||||
-rw-r--r-- | crypto/asn1/asn_mime.c | 13 | ||||
-rw-r--r-- | crypto/asn1/d2i_pr.c | 6 |
5 files changed, 27 insertions, 31 deletions
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; |