File tmpConfigFile = File.createTempFile("pkcs11-", "conf");
tmpConfigFile.deleteOnExit();
PrintWriter configWriter = new PrintWriter(new FileOutputStream(
tmpConfigFile), true);
configWriter.println("name=SmartCard");
configWriter.println("library=" + getPkcs11Path());
configWriter.println("slotListIndex= " + numerSlot);
// load security provider
this.pkcs11Provider = new SunPKCS11(tmpConfigFile.getAbsolutePath());
Security.addProvider(this.pkcs11Provider);
środa, 5 października 2011
Sun PKCS#11
Dostawca Sun PKCS#11 miał problematyczną konfigurację. Przed dodaniem providera trzeba było podać numer slotu (pod którym spodziewaliśmy się klucza). KIR / SIGILLUM instaluje swoje klucze na pierwszym slocie (nie podawałem go wogóle w konfiguracji), a UNIZETO na trzecim:
Subskrybuj:
Komentarze do posta (Atom)
Brak komentarzy:
Prześlij komentarz