[gnutls-devel] GnuTLS | Getting error "Please insert token 'TEE_TOKEN' in slot and press enter" on searching private objects. (#583)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Oct 5 08:21:04 CEST 2018

New Issue was created.

Issue 583: https://gitlab.com/gnutls/gnutls/issues/583
Author:    Sahil Malhotra


Met following issue when trying to list down the private objects.

root at localhost:/greengrass# p11tool --login --list-all-privkeys pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN
Token 'TEE_TOKEN' with URL 'pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN' requires user PIN
Enter PIN:
Object 0:
        URL: pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN;id=%00%00;object=iotkey;type=private
Please insert token 'TEE_TOKEN' in slot and press enter

On analyzing the code I found at https://gitlab.com/gnutls/gnutls/blob/master/lib/pkcs11_privkey.c#L217

we are checking if (count == 1) for success, I was not able to understand why this check was added, because if no object matches with template C_FindObjects will write 0 in count.

Please check this and let me know if I am missing something.


Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/583
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/20181005/737da41d/attachment.html>

More information about the Gnutls-devel mailing list