]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
gnutls_tpm2_esys: Mark globally defined templates as const
authorDaiki Ueno <ueno@gnu.org>
Sun, 15 Aug 2021 20:08:09 +0000 (22:08 +0200)
committerDaiki Ueno <ueno@gnu.org>
Sun, 15 Aug 2021 20:08:09 +0000 (22:08 +0200)
Signed-off-by: Daiki Ueno <ueno@gnu.org>
gnutls_tpm2_esys.c

index 54a3cc85af0178aac1c386679c2578d0c904a103..7f54b0b09c96002a1ff77fb2223831907e0791db 100644 (file)
@@ -75,7 +75,7 @@ struct oc_tpm2_ctx {
        unsigned int parent;
 };
 
-static TPM2B_PUBLIC primaryTemplate = {
+static const TPM2B_PUBLIC primaryTemplate = {
        .publicArea = {
                .type = TPM2_ALG_ECC,
                .nameAlg = TPM2_ALG_SHA256,
@@ -112,7 +112,7 @@ static TPM2B_PUBLIC primaryTemplate = {
        }
 };
 
-static TPM2B_PUBLIC primaryTemplate_legacy = {
+static const TPM2B_PUBLIC primaryTemplate_legacy = {
        .publicArea = {
                .type = TPM2_ALG_ECC,
                .nameAlg = TPM2_ALG_SHA256,
@@ -147,7 +147,7 @@ static TPM2B_PUBLIC primaryTemplate_legacy = {
        }
 };
 
-static TPM2B_SENSITIVE_CREATE primarySensitive = {
+static const TPM2B_SENSITIVE_CREATE primarySensitive = {
        .sensitive = {
                .userAuth = {
                        .size = 0,
@@ -157,10 +157,10 @@ static TPM2B_SENSITIVE_CREATE primarySensitive = {
                }
        }
 };
-static TPM2B_DATA allOutsideInfo = {
+static const TPM2B_DATA allOutsideInfo = {
        .size = 0,
 };
-static TPML_PCR_SELECTION allCreationPCR = {
+static const TPML_PCR_SELECTION allCreationPCR = {
        .count = 0,
 };