From 3ed342562ada6198f24760b21634273181a2d4df Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Mon, 2 Oct 2023 16:25:10 -0400 Subject: [PATCH] tpm2: edit tpm2_get_or_create_srk() comment Adjust the comment to correct the return value, i.e. 1 for SRK created, 0 for SRK already exists, <0 on error. --- src/shared/tpm2-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index 3374bd4f783..4060617f3f0 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -1174,7 +1174,8 @@ static int tpm2_get_srk( return tpm2_index_to_handle(c, TPM2_SRK_HANDLE, session, ret_public, ret_name, ret_qname, ret_handle); } -/* Get the SRK, creating one if needed. Returns 0 on success, or < 0 on error. */ +/* Get the SRK, creating one if needed. Returns 1 if a new SRK was created and persisted, 0 if an SRK already + * exists, or < 0 on error. */ int tpm2_get_or_create_srk( Tpm2Context *c, const Tpm2Handle *session, -- 2.47.3