Skip to content

Commit a039f5c

Browse files
committed
apply clang-format
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent 2191c75 commit a039f5c

File tree

6 files changed

+184
-191
lines changed

6 files changed

+184
-191
lines changed

apps/src/lc_x509_generator_checker.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ int apply_checks_x509(const struct lc_x509_certificate *x509,
319319
char buf[33] = { 0 };
320320

321321
lc_bin2hex(x509->san_ip, x509->san_ip_len, buf,
322-
sizeof(buf) - 1, 1);
322+
sizeof(buf) - 1, 1);
323323

324324
printf("SAN IP: names mismatch (expected %s, actual %s)\n",
325325
parsed_opts->san_ip, buf);
@@ -334,7 +334,7 @@ int apply_checks_x509(const struct lc_x509_certificate *x509,
334334
size_t exp_id_len = strlen(parsed_opts->skid);
335335

336336
lc_hex2bin(parsed_opts->skid, exp_id_len, exp_id_bin,
337-
sizeof(exp_id_bin));
337+
sizeof(exp_id_bin));
338338

339339
if (exp_id_len / 2 != x509->raw_skid_size) {
340340
printf("SKID: lengths differ (expected %zu, actual %zu)\n",
@@ -346,7 +346,7 @@ int apply_checks_x509(const struct lc_x509_certificate *x509,
346346
char buf[65] = { 0 };
347347

348348
lc_bin2hex(x509->raw_skid, x509->raw_skid_size, buf,
349-
sizeof(buf) - 1, 1);
349+
sizeof(buf) - 1, 1);
350350

351351
printf("SKID: names mismatch (expected %s, actual %s)\n",
352352
parsed_opts->skid, buf);
@@ -368,7 +368,7 @@ int apply_checks_x509(const struct lc_x509_certificate *x509,
368368
size_t exp_id_len = strlen(parsed_opts->akid);
369369

370370
lc_hex2bin(parsed_opts->akid, exp_id_len, exp_id_bin,
371-
sizeof(exp_id_bin));
371+
sizeof(exp_id_bin));
372372

373373
if (exp_id_len / 2 != x509->raw_akid_size) {
374374
printf("AKID: lengths differ (expected %zu, actual %zu)\n",
@@ -380,7 +380,7 @@ int apply_checks_x509(const struct lc_x509_certificate *x509,
380380
char buf[65] = { 0 };
381381

382382
lc_bin2hex(x509->raw_akid, x509->raw_akid_size, buf,
383-
sizeof(buf) - 1, 1);
383+
sizeof(buf) - 1, 1);
384384

385385
printf("AKID: names mismatch (expected %s, actual %s)\n",
386386
parsed_opts->akid, buf);
@@ -693,7 +693,7 @@ int apply_checks_pkcs7(const struct lc_pkcs7_message *pkcs7_msg,
693693
int found = 0;
694694

695695
lc_hex2bin(parsed_opts->skid, exp_id_len, exp_id_bin,
696-
sizeof(exp_id_bin));
696+
sizeof(exp_id_bin));
697697

698698
for (sinfo = pkcs7_msg->list_head_sinfo; sinfo;
699699
sinfo = sinfo->next) {

apps/src/sbattach.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,23 @@ static struct option options[] = {
9696
static void usage(void)
9797
{
9898
printf("Usage: %s --attach <sigfile> <efi-boot-image>\n"
99-
" or: %s --detach <sigfile> [--remove] <efi-boot-image>\n"
100-
" or: %s --remove <efi-boot-image>\n"
101-
"Attach or detach a signature file to/from a boot image\n"
102-
"\n"
103-
"Options:\n"
104-
"\t--attach <sigfile> set <sigfile> as the boot image's\n"
105-
"\t signature table\n"
106-
"\t--detach <sigfile> copy the boot image's signature table\n"
107-
"\t to <sigfile>\n"
108-
"\t--remove remove the boot image's signature\n"
109-
"\t table from the original file\n"
110-
"\t--signum signature to operate on (defaults to\n"
111-
"\t first)\n"
112-
"\t--print Verify PKCS#7 message and print content\n"
113-
"\t--cert <certfile> certificate (x509 certificate) used for\n"
114-
" PKCS#7 verification with --print",
115-
toolname, toolname, toolname);
99+
" or: %s --detach <sigfile> [--remove] <efi-boot-image>\n"
100+
" or: %s --remove <efi-boot-image>\n"
101+
"Attach or detach a signature file to/from a boot image\n"
102+
"\n"
103+
"Options:\n"
104+
"\t--attach <sigfile> set <sigfile> as the boot image's\n"
105+
"\t signature table\n"
106+
"\t--detach <sigfile> copy the boot image's signature table\n"
107+
"\t to <sigfile>\n"
108+
"\t--remove remove the boot image's signature\n"
109+
"\t table from the original file\n"
110+
"\t--signum signature to operate on (defaults to\n"
111+
"\t first)\n"
112+
"\t--print Verify PKCS#7 message and print content\n"
113+
"\t--cert <certfile> certificate (x509 certificate) used for\n"
114+
" PKCS#7 verification with --print",
115+
toolname, toolname, toolname);
116116
}
117117

118118
static void version(void)
@@ -220,8 +220,8 @@ static int attach_sig(struct pkcs7_generator_opts *opts, struct image *image,
220220
CKINT(image_add_signature(image, sigbuf, size));
221221

222222
/* Write the PE/COFF structure out to file */
223-
CKINT_LOG(image_write(image, image_filename),
224-
"Error writing %s: %s\n", image_filename, strerror(errno));
223+
CKINT_LOG(image_write(image, image_filename), "Error writing %s: %s\n",
224+
image_filename, strerror(errno));
225225

226226
out:
227227
release_data(sigbuf, size, lc_pem_flag_nopem);
@@ -240,8 +240,8 @@ static int remove_sig(struct image *image, unsigned int signum,
240240
"Error, image has no signature at %u\n", signum + 1);
241241

242242
/* Write the PE/COFF structure out to file */
243-
CKINT_LOG(image_write(image, image_filename),
244-
"Error writing %s: %s\n", image_filename, strerror(errno));
243+
CKINT_LOG(image_write(image, image_filename), "Error writing %s: %s\n",
244+
image_filename, strerror(errno));
245245

246246
out:
247247
return ret;
@@ -295,7 +295,7 @@ int main(int argc, char **argv)
295295
return -EINVAL;
296296

297297
/* humans count from 1 not zero */
298-
signum = (unsigned int)val - 1;
298+
signum = (unsigned int)val - 1;
299299
break;
300300
case 'r':
301301
remove = true;
@@ -313,7 +313,7 @@ int main(int argc, char **argv)
313313
ws->parsed_opts.trust_anchor = optarg;
314314
CKINT(pkcs7_collect_trust(&ws->parsed_opts));
315315
break;
316-
/*
316+
/*
317317
* NOTE: we also could check for EKU/key usage during PKCS#7
318318
* verify:
319319
*/

0 commit comments

Comments
 (0)