I am trying to read VPN certificate from token device as below:
keystore = KeyStore.getInstance("Windows-MY","SunMSCAPI");
keystore.load(null, null);
int i=0;
for(Enumeration oEnum = keystore.aliases(); oEnum.hasMoreElements();)
{
sAlias = (String) oEnum.nextElement();
TokenReader tr = new TokenReader();
String id = tr.readToken(sAlias, keystore);
setFont(new Font("Helvetica", Font.BOLD, 36));
i++;
}
It's asking for PIN again, where as when already I am connected to vpn, which affirmed already I provided PIN once.
Is it possible to load the same instance of keystroke one has already connected to VPN, avoiding PIN request?
Moreover on some machines, it's giving Please insert a smart card error box what could be the issue?
or any other, suggested way for reading certificate from Smart Card/VPN Token?