I should be able to specify the certificate to use just by its standard PKCS#11 URI, for example 'pkcs11:manufacturer=piv_II;id=%01'. As it is I have to jump through lots of hoops to create a NSS database, manually add the tokens (or p11-kit-proxy.so), and then find the label. Perhaps it would be better to port pesign to GnuTLS so that this Just Works?
For reference, this is how I did get it working with a key in a hardware token, working around the NSS problems mentioned above by explicitly adding the p11-kit-proxy.so module so that the proper tokens are visible, and then finding the 'nickname' of the key since I can't specify it by its RFC7512 URI. [dwoodhou@i7 linux-2.6]$ certutil -d sql:`pwd` -N --empty-password [dwoodhou@i7 linux-2.6]$ modutil -add p11-kit -libfile /usr/lib64/p11-kit-proxy.so -dbdir sql:`pwd` -force Module "p11-kit" added to database. [dwoodhou@i7 linux-2.6]$ modutil -dbdir sql:`pwd` -list Listing of PKCS #11 Modules ----------------------------------------------------------- ... 2. p11-kit ... slot: Yubico Yubikey NEO OTP+CCID 00 00 token: PIV_II (PIV Card Holder pin) ----------------------------------------------------------- [dwoodhou@i7 linux-2.6]$ certutil -d sql:`pwd` -h 'PIV_II (PIV Card Holder pin)' -L Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI Enter Password or Pin for "PIV_II (PIV Card Holder pin)": PIV_II (PIV Card Holder pin):Certificate for PIV Authentication u,u,u [dwoodhou@i7 linux-2.6]$ pesign -s -i arch/x86/boot/bzImage -o signed-kernel -n sql:`pwd` -t "PIV_II (PIV Card Holder pin)" -c "Certificate for PIV Authentication" Enter Password or Pin for "PIV_II (PIV Card Holder pin)": [dwoodhou@i7 linux-2.6]$
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'.
This should already be completed as NSS already supports PKCS#11 URIs. I haven't verified it though.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.