return 0; /* 0 → SRK already set up */
/* No SRK, create and persist one */
- TPM2B_PUBLIC template = { .size = sizeof(TPMT_PUBLIC), };
+ TPM2B_PUBLIC template = {
+ .size = sizeof(TPMT_PUBLIC),
+ };
r = tpm2_get_best_srk_template(c, &template.publicArea);
if (r < 0)
return log_debug_errno(r, "Could not get best SRK template: %m");
if (extend)
sha256_process_bytes(digest->buffer, digest->size, &ctx);
else {
- *digest = (TPM2B_DIGEST){ .size = SHA256_DIGEST_SIZE, };
+ *digest = (TPM2B_DIGEST) {
+ .size = SHA256_DIGEST_SIZE,
+ };
if (n_data == 0) /* If not extending and no data, return zero hash */
return 0;
}
if (r < 0)
return r;
} else if (primary_alg != 0) {
- TPM2B_PUBLIC template = { .size = sizeof(TPMT_PUBLIC), };
+ TPM2B_PUBLIC template = {
+ .size = sizeof(TPMT_PUBLIC),
+ };
r = tpm2_get_legacy_template(primary_alg, &template.publicArea);
if (r < 0)
return log_debug_errno(r, "Could not get legacy template: %m");