From aa8c5d12efc9a673723a1a17308b92c4ff3cac83 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 3 Mar 2023 20:44:24 +0900 Subject: Fix keygrip computation. Signed-off-by: NIIBE Yutaka --- tkd/pkcs11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tkd/pkcs11.c b/tkd/pkcs11.c index 4f00137ee..d5b11b40b 100644 --- a/tkd/pkcs11.c +++ b/tkd/pkcs11.c @@ -350,7 +350,7 @@ examine_public_key (struct token *token, struct key *k, unsigned long keytype, k->flags &= ~KEY_FLAGS_NO_PUBKEY; if ((modulus[0] & 0x80)) { - memmove (modulus+1, modulus, templ[1].ulValueLen); + memmove (modulus+1, modulus, templ[0].ulValueLen); templ[0].ulValueLen++; modulus[0] = 0; } -- cgit v1.2.3