Skip to content

Commit

Permalink
feat(pkcs11-tool): an invalid signature is a fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreGonzalo authored and frankmorgner committed Jun 12, 2024
1 parent 82e8216 commit c3e4d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/pkcs11-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2541,9 +2541,9 @@ static void verify_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
if (rv == CKR_OK)
printf("Signature is valid\n");
else if (rv == CKR_SIGNATURE_INVALID)
printf("Invalid signature\n");
util_fatal("Invalid signature");
else
printf("Cryptoki returned error: %s\n", CKR2Str(rv));
util_fatal("Signature verification failed: rv = %s (0x%0x)\n", CKR2Str(rv), (unsigned int)rv);
}

static void decrypt_data(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
Expand Down

0 comments on commit c3e4d2a

Please sign in to comment.