I'm using yubikey for signing. I use GnuPG and also java keytool.
The problem is that when I do anything (for example: gpg --card-status) then I can't use java to sign:
Code:
$ keytool -providerClass sun.security.pkcs11.SunPKCS11 -providerArg ./pkcs11_java.cfg -keystore NONE -storetype PKCS11 -list
keytool error: java.lang.reflect.InvocationTargetException
The solutions I found are two:
1. killall gpg-agent; killall scdaemon
2. plug out and plug in yubikey (without killing anything)
I just realized that gpg also blocks Yubikey Authenticator (YubiKey already in use!)
Is there a way to make it everything works without conflicts?