diff options
author | Matt Caswell <matt@openssl.org> | 2020-09-24 11:42:23 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-01 10:25:20 +0200 |
commit | d8652be06e2778e8898453a391deb7253e1a35a2 (patch) | |
tree | fe40e22edb39642aa7ae633320c1900388f2e7ee /crypto/ct | |
parent | Perl util to do with_libctx renaming (diff) | |
download | openssl-d8652be06e2778e8898453a391deb7253e1a35a2.tar.xz openssl-d8652be06e2778e8898453a391deb7253e1a35a2.zip |
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/ct')
-rw-r--r-- | crypto/ct/ct_b64.c | 11 | ||||
-rw-r--r-- | crypto/ct/ct_log.c | 14 | ||||
-rw-r--r-- | crypto/ct/ct_policy.c | 6 | ||||
-rw-r--r-- | crypto/ct/ct_vfy.c | 5 |
4 files changed, 17 insertions, 19 deletions
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)) |