zkey-cryptsetup: Fix handling of 'hmac(sha512)' integrity algorithm

Fix a copy & paste error on handling the 'hmac(sha512)' integrity algorithm
with the 'convert' command.

Fixes: 97136585da ("zkey-cryptsetup: Support PHMAC integrity with convert command")
Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2026-06-09 10:12:26 +02:00
committed by Jan Höppner
parent 610cc581da
commit c953486dec

View File

@@ -3040,7 +3040,7 @@ static int command_convert(void)
strcmp(ip.integrity, "hmac(sha256") == 0)
hmac_vp_alg = "hmac(sha256)";
else if (strcmp(ip.integrity, "hmac(sha384)") == 0 ||
strcmp(ip.integrity, "hmac(sha512)") != 0)
strcmp(ip.integrity, "hmac(sha512)") == 0)
hmac_vp_alg = "hmac(sha512)";
rc = generate_hmac_key_verification_pattern(key + ekeysize,