Skip to content

Commit 62fa4ee

Browse files
committed
Fix indentation and formatting
1 parent ae17f1f commit 62fa4ee

25 files changed

+359
-353
lines changed

examples/decrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
6060
PKCS11_CTX *ctx;
6161
PKCS11_SLOT *slots, *slot;
6262
PKCS11_CERT *certs;
63-
63+
6464
PKCS11_KEY *authkey;
6565
PKCS11_CERT *authcert;
6666
EVP_PKEY *pubkey = NULL;

examples/eckeygen.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ int main(int argc, char *argv[])
9292
PKCS11_params params = {.sensitive = 1, .extractable = 0};
9393
PKCS11_EC_KGEN ec = {.curve = "P-256"};
9494
PKCS11_KGEN_ATTRS eckg = {0};
95-
95+
9696
if (argc < 6) {
9797
fprintf(stderr, "usage: %s [module] [TOKEN] [KEY-LABEL] [KEY-ID] [PIN]\n", argv[0]);
9898
return 1;
9999
}
100-
100+
101101
key_id_len = strlen(argv[4]);
102102
rc = parse_hex_key_id(argv[4], &key_id, &key_id_len);
103103
CHECK_ERR(rc < 0, "Invalid key ID format", 1);
104-
104+
105105
ctx = PKCS11_CTX_new();
106106
error_queue("PKCS11_CTX_new");
107107

@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
130130
printf("Slot description.......: %s\n", slot->description);
131131
printf("Slot token label.......: %s\n", slot->token->label);
132132
printf("Slot token serialnr....: %s\n", slot->token->serialnr);
133-
133+
134134
rc = PKCS11_login(slot, 0, argv[5]);
135135
error_queue("PKCS11_login");
136136
CHECK_ERR(rc < 0, "PKCS11_login failed", 5);

examples/rsakeygen.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ int main(int argc, char *argv[])
9292
PKCS11_params params = {.sensitive = 1, .extractable = 0};
9393
PKCS11_RSA_KGEN rsa = {.bits = 2048};
9494
PKCS11_KGEN_ATTRS rsakg = {0};
95-
95+
9696
if (argc < 6) {
9797
fprintf(stderr, "usage: %s [module] [TOKEN] [KEY-LABEL] [KEY-ID] [PIN]\n", argv[0]);
9898
return 1;
9999
}
100-
100+
101101
key_id_len = strlen(argv[4]);
102102
rc = parse_hex_key_id(argv[4], &key_id, &key_id_len);
103103
CHECK_ERR(rc < 0, "Invalid key ID format", 1);
104-
104+
105105
ctx = PKCS11_CTX_new();
106106
error_queue("PKCS11_CTX_new");
107107

@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
130130
printf("Slot description.......: %s\n", slot->description);
131131
printf("Slot token label.......: %s\n", slot->token->label);
132132
printf("Slot token serialnr....: %s\n", slot->token->serialnr);
133-
133+
134134
rc = PKCS11_login(slot, 0, argv[5]);
135135
error_queue("PKCS11_login");
136136
CHECK_ERR(rc < 0, "PKCS11_login failed", 5);

src/eng_front.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static const ENGINE_CMD_DEFN engine_cmd_defns[] = {
8484
"VLOG_A",
8585
"Set the logging callback",
8686
ENGINE_CMD_FLAG_INTERNAL},
87-
{CMD_DEBUG_LEVEL,
87+
{CMD_DEBUG_LEVEL,
8888
"DEBUG_LEVEL",
8989
"Set the debug level: 0=emerg, 1=alert, 2=crit, 3=err, 4=warning, 5=notice (default), 6=info, 7=debug",
9090
ENGINE_CMD_FLAG_NUMERIC},

src/p11_pthread.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,5 @@ static int pthread_cond_signal(pthread_cond_t *cond)
9292
#error Locking not supported on this platform.
9393

9494
#endif
95+
96+
/* vim: set noexpandtab: */

src/p11_slot.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,17 @@ int pkcs11_init_token(PKCS11_SLOT_private *slot, const char *pin, const char *la
318318
(CK_UTF8CHAR *) ck_label));
319319
CRYPTOKI_checkerr(CKR_F_PKCS11_INIT_TOKEN, rv);
320320

321-
/* FIXME: how to update the token?
322-
* PKCS11_CTX_private *cpriv;
323-
* int n;
324-
* cpriv = PRIVCTX(ctx);
325-
* for (n = 0; n < cpriv->nslots; n++) {
326-
* if (pkcs11_check_token(ctx, cpriv->slots + n) < 0)
327-
* return -1;
328-
* }
329-
*/
321+
/* FIXME: how to update the token? */
322+
#if 0
323+
PKCS11_CTX_private *cpriv;
324+
int n;
325+
cpriv = PRIVCTX(ctx);
326+
327+
for (n = 0; n < cpriv->nslots; n++) {
328+
if (pkcs11_check_token(ctx, cpriv->slots + n) < 0)
329+
return -1;
330+
}
331+
#endif
330332

331333
return 0;
332334
}

src/pkcs11.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ extern "C" {
9696
#endif
9797

9898
#ifdef CRYPTOKI_COMPAT
99-
/* If we are in compatibility mode, switch all exposed names to the
100-
PKCS #11 variant. There are corresponding #undefs below. */
99+
/* If we are in compatibility mode, switch all exposed names to the
100+
* PKCS #11 variant. There are corresponding #undefs below. */
101101

102102
#define ck_flags_t CK_FLAGS
103103
#define ck_version _CK_VERSION

src/provider.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static int PROVIDER_CTX_set_parameters(PROVIDER_CTX *prov_ctx)
288288
if (!PROVIDER_CTX_get_specific_parameters(prov_ctx)) {
289289
return 0;
290290
}
291-
291+
292292
if (prov_ctx->p_debug_level && *prov_ctx->p_debug_level != '\0') {
293293
prov_ctx->debug_level = atoi(prov_ctx->p_debug_level);
294294
}
@@ -470,7 +470,7 @@ static int provider_init(const OSSL_CORE_HANDLE *handle, const OSSL_DISPATCH *in
470470

471471
/* Get all core functions and check existence of required ones */
472472
PROVIDER_CTX_get_core_functions(prov_ctx, in);
473-
473+
474474
/* Get core default parameters */
475475
if (!PROVIDER_CTX_get_core_parameters(prov_ctx))
476476
goto err;

src/util_uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ UTIL_CTX *UTIL_CTX_new()
8585

8686
if (!ctx)
8787
return NULL;
88-
88+
8989
memset(ctx, 0, sizeof(UTIL_CTX));
9090
pthread_mutex_init(&ctx->lock, 0);
9191
return ctx;

tests/check-all-prov.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ int main(int argc, char *argv[])
4646
return ret;
4747

4848
/* Load pkcs11prov and default providers */
49-
if (!providers_load()) {
49+
if (!providers_load()) {
5050
display_openssl_errors();
5151
return ret;
52-
}
52+
}
5353

5454
/* Load private key, public key and certificate */
5555
load_objects(argv[1], NULL, obj_set);

0 commit comments

Comments
 (0)