]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tpm2: edit tpm2_get_or_create_srk() comment
authorDan Streetman <ddstreet@ieee.org>
Mon, 2 Oct 2023 20:25:10 +0000 (16:25 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 2 Oct 2023 21:58:13 +0000 (22:58 +0100)
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

index 3374bd4f7833ce7e82226f93c95cf1c66d1647ac..4060617f3f05b0633e05baedbaf1d2a6a9278655 100644 (file)
@@ -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,