Hi Walter.
In our company we have a similar scenario: certificates on
smartcard+pkcs#11 (not opensc based)+jss4+applet+firefox.
Im the developer and mantainer of the smartcard+pkcs11+installers, and
a partner is it for jss4+applet.
AFAIK, we are using jss4 'cause we had some problems with jss3. I can
ask for more info when he comes back from holidays.
Looking at your message i agree with Robert: Your PKCS#11 module is
not listed, so your certificates will not be accesible.
As Firefox initializes and loads the token/module on start (not like
chrome, that does it on first use), i dont think its an order running
issue.
I bet for the jss3/jss4 issue.
Just to try helping, this is a snippet of code from our applet:
//...
CryptoManager cm = null;
cm = CryptoManager.getInstance();
cm.setPasswordCallback(this);
Enumeration listmodules = cm.getModules();
PK11Module module = null;
CryptoToken ctoken = null;
while (listmodules.hasMoreElements()) {
module = (PK11Module) listmodules.nextElement();
Enumeration listokens = module.getTokens();
while (listokens.hasMoreElements()) {
ctoken = (CryptoToken) listokens.nextElement();
org.mozilla.jss.crypto.X509Certificate[] certs = null;
tokename = ctoken.getName();
if (ctoken.isPresent()) {
CryptoStore cstore = ctoken.getCryptoStore();
certs = cstore.getCertificates();
//...
I dont know if this its enough, either if its the correct code. I have
no played with jss development yet.
Anyway, this requieres SUN (not openjdk) Java >=1.6 and A LOT of
discussion with mozilla guys, related "why JSS was not designed to be
used for applets".
I hope it helps.
--
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto