From 9fd45c3c9623ae91da9f22f17b5a497b55b4c3b9 Mon Sep 17 00:00:00 2001 From: Kirill Ermoshin Date: Thu, 5 Dec 2024 13:23:50 +0300 Subject: [PATCH] Reformat some files with clang-format Signed-off-by: latal-1 --- src/objects.c | 5 +++-- src/signature.c | 14 ++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/objects.c b/src/objects.c index 118c7c39..ede1782c 100644 --- a/src/objects.c +++ b/src/objects.c @@ -110,8 +110,8 @@ void p11prov_obj_pool_free(P11PROV_OBJ_POOL *pool) } OPENSSL_free(pool->objects); (void)MUTEX_UNLOCK(pool); - /* ------------- LOCKED SECTION */ } - else { + /* ------------- LOCKED SECTION */ + } else { P11PROV_debug("Failed to lock object pool, leaking it!"); return; } @@ -4030,6 +4030,7 @@ CK_RV p11prov_obj_copy_specific_attr(P11PROV_OBJ *pub_key, #define RSA_PRIV_ATTRS_NUM 2 #define EC_PRIV_ATTRS_NUM 3 +// TODO: maybe remove after public key object was added in P11PROV_OBJ CK_RV p11prov_merge_pub_attrs_into_priv(P11PROV_OBJ *pub_key, P11PROV_OBJ *priv_key) { diff --git a/src/signature.c b/src/signature.c index e0bbb8ca..43872106 100644 --- a/src/signature.c +++ b/src/signature.c @@ -1256,10 +1256,9 @@ static int p11prov_rsasig_digest_sign_final(void *ctx, unsigned char *sig, /* the siglen might be uninitialized when called from openssl */ *siglen = 0; - P11PROV_debug( - "rsa digest sign final (ctx=%p, sig=%p, siglen=%zu, " - "sigsize=%zu)", - ctx, sig, *siglen, sigsize); + P11PROV_debug("rsa digest sign final (ctx=%p, sig=%p, siglen=%zu, " + "sigsize=%zu)", + ctx, sig, *siglen, sigsize); if (sigctx == NULL) { return RET_OSSL_ERR; @@ -1907,10 +1906,9 @@ static int p11prov_ecdsa_digest_sign_final(void *ctx, unsigned char *sig, /* the siglen might be uninitialized when called from openssl */ *siglen = 0; - P11PROV_debug( - "ecdsa digest sign final (ctx=%p, sig=%p, siglen=%zu, " - "sigsize=%zu)", - ctx, sig, *siglen, sigsize); + P11PROV_debug("ecdsa digest sign final (ctx=%p, sig=%p, siglen=%zu, " + "sigsize=%zu)", + ctx, sig, *siglen, sigsize); if (sigctx == NULL) { return RET_OSSL_ERR;