OK guys, I have found that I must go into MY profile folder, not just the
folder where all profiles are stored. I must go one level deeper to find
secmod.db that belongs to me. The one I can find now, is one template on
which FF build all profile when they are created.

Thanks. It's solved now.



2016-11-04 10:27 GMT+01:00 Ding Yangliang <torres...@gmail.com>:

> Hi everyone.
>
> I am using NSS in Ubuntu 16.04 with Java 7. I installed several modules in
> FireFox, but modutil shipped with NSS only lists me NSS internal one . I
> add my external Izenpe modules in secmod.db by
>
> modutil -add "Module Name" -libdir "/some/quoted/dir" -dbdir
> "/correct/db_dir/"
>
> and now I can see them when I do
>
> modutil -list
>
> But they are still not accessible in my Java code.
>
> With these lines I load the config file for my provider:
>
>     String config = "library=/usr/lib/i386-linux-gnu/nss/libsoftokn3.so\n"
> + "name=NSSCrypto-Firma\n"
> + "attributes=compatibility\n"
> + "slot=2\n"
> + "showInfo=true\n"
> + "allowSingleThreadedModules=true\n"
> + "nssArgs=\"configdir='" + NSS_JSS_Utils.getFireFoxProfilePath() + "'
> certPrefix='' keyPrefix='' secmod='secmod.db' + flags='readOnly'\" "
> + "\n"
> + "library=/usr/lib/libbit4ipki.so\n"
> + "name=\"Izenpe PKCS#11\"\n";
>     Provider provider = new SunPKCS11(new ByteArrayInputStream(config.
> getBytes()));
>
> But it complains about "name" is appearing in two places, so I guess I can
> only configure one provider here? But I have tried leaving only one of them
> and none is working. CryptoManager is initialized correctly with FireFox
> profile directory(/home/UserName/.mozilla/firefox), and modules are
> listed, but only one.
>
> Any help is appreciated, and thanks in advance.
>
>
>
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to