[gnutls-devel] GnuTLS | pkcs11: ensure C_SignInit is called before C_Sign (!2016)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Sep 8 11:38:15 CEST 2025




Daiki Ueno commented: https://gitlab.com/gnutls/gnutls/-/merge_requests/2016#note_2735741109


> According to PKCS#11 specification v3.1 part 5.13.1, C_SignInit must be called before every C_Sign operation, otherwise the operation may return with CKR_OPERATION_NOT_INITIALIZED.

I know it's already closed, but I don't think this is the case; the [spec](https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.2/pkcs11-spec-v3.2.html#_Toc195693140) says "**To process additional data** (in single or multiple parts), the application MUST call C_SignInit again." In this case, the application calls C_Sign twice, first to determine the length of the signature, and then obtain the signature itself, calculated over the same data.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2016#note_2735741109
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20250908/7675d936/attachment.html>


More information about the Gnutls-devel mailing list