Skip to content

Commit

Permalink
Reformat some files with clang-format
Browse files Browse the repository at this point in the history
Signed-off-by: latal-1 <[email protected]>
  • Loading branch information
Kirill Ermoshin committed Dec 13, 2024
1 parent 57fb91a commit 9fd45c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
{
Expand Down
14 changes: 6 additions & 8 deletions src/signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9fd45c3

Please sign in to comment.