shinigami wrote:
Are you two working together, by any chance?

Yes, in the same project. Sorry for duplicated post. A communication mistake.
Now I will go to try explain my situation.
I�m developing a java aplication. My aplication already list the tokens and modules when they are inserted before aplication started. If i remove some token my list is updated successfully. But when my aplication is started without none token, the same update not occur. The firefox browser use 4 Virtual Readers gotten of ikey module. This readers are responsible to listen all insertions and removals events. Everything functions perfectly. The ikey Rainbow aplication (vendor program) also do this. "Everybody" obtains positive results less me, *crying*. The key for my success in this case is this "Virtual Reader". Using the bellow code i obtain the list of tokens. But the "mod.reloadTokens();" it does not function.
Still thus it could be problem with driver of vendor?

Sorry for my english. And thanks.

while (modulos.hasMoreElements()) {

   mod = (PK11Module) modulos.nextElement();
   if(!mod.getName().equals("Builtin Roots Module") &&
     !mod.getName().equals("NSS Internal PKCS #11 Module")){

    mod.reloadTokens();

    listaTokens.clear();

    Enumeration en = mod.getTokens();
    while (en.hasMoreElements()) {
     PK11Token pk11token = (PK11Token) en.nextElement();
     if( pk11token.isPresent() ){
      listaTokens.add( pk11token );
     }
    }
   }
  }
Ah So you are running a different application and you don't know how to see the iKey's!

The important part of the code would be where you initialize JSS/NSS. Make sure that the iKey is installed in the secmod.db for your application. To verify this, look at the directory you point JSS and NSS to at initialization time (where your keys and certs are). You can use the modutil command (modutil -list -dbdir {your db directory}) to list the tokens that are installed. If iKey is not installed, you can use modutil to add it.


bob


"Nelson B" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED]
shinigami wrote:
I'm using JSS 3.4 (with NSS 3.10) in a Java application.  The Java app
cannot see token events (such as smart card insertions and removals)
unless I exit the app and restart.  The public JSS methods
PK11Module.getTokens() and CryptoManager.getModules() return JSS's
snapshot of the tokens and modules present when the app started.  The
private JSS methods PK11Module.reloadTokens() and
CryptoManager.reloadModules() return NSS's snapshot of the tokens and
modules present when the app started (I made them public and called
them; this is what I saw).

When the Certificate Manager window is opened (or
chrome://pippki/content/certManager.xul is reloaded in the browser) the
certificates list is current, displaying only the certs on the inserted
tokens (therefore, I know that this functionality exists somewhere in
Mozilla).
How do I get JSS to take a current snapshot of the modules and tokens
without restarting the app?
Your question is very similar to Igor Delacroix's recent question in this
newsgroup.  Are you two working together, by any chance?
I'll give you an answer similar to what I gave him.

All the information that FireFox gets about tokens in "slots" comes from
a (your?) PKCS#11 module.  If that information is not updating, it is
conceivable that the reason is that the PKCS#11 module is not providing
updated information.

You can see the information about that PKCS#11 module in FireFox by going to
 Tools -> Options -> Advanced (tab) -> Security Devices (button)

I'll also ask our JSS expert to look at this question.

--
Nelson B


_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to