Hello,
we are trying to get S/MIME-based email signing and decryption working using Yubikey Neo and Yubikey 4 with Thunderbird / opensc on Linux. Unfortunately we always encounter the same problems.
Thunderbird cannot reliably communicate with Yubikey and always looses the reference to the certificate.The first time we try to send a signed mail or decrypt a stored mail it works. Thunderbirds asks for the PIN (strangely called master password for some reason) and resumes operation as expected. However, after that, both signing and decryption ceases to function.
Trying to sign mails fails with:
Code:
Sending of the message failed.
You specified that this message should be digitally signed, but the application either failed to find the signing certificate specified in your Mail & Newsgroup Account Settings, or the certificate has expired.
Decrypting mails fails with:
Code:
Thunderbird cannot decrypt this message
The sender encrypted this message to you using one of your digital certificates, however Thunderbird was not able to find this certificate and corresponding private key.
Sometimes Thunderbird will repeatedly ask for the "master password for PIV" without managing to log into the key, sometimes it will not ask at all. In any case it does not work.
The only solution we found so far was to eject and reinsert the Yubikey. Then the next single signing or decryption operation will succeed. After that, the error reoccurs.
We have confirmed that on two different machines running two newly installed flavors of Ubuntu. I am unsure whether this is Yubikey or opensc related, so it could as well be an opensc bug. But since opensc is apparently the only driver for Yubikey it's effectively a Yubikey problem.
Software:
xubuntu / ubunut-gnome 15.10 x86_64 4.2.0-27-generic
Thunderbird 38.5.1
OpenSC 0.15.0 [gcc 4.9.2]
Best regards