Hi Nelson,
thanks for your quick reply!
Am 13.09.2009, 01:30 Uhr, schrieb Nelson Bolyard <nonelsons...@nobolyardspam.me>:

On 2009-09-12 09:23 PDT, Guenter wrote:
Then I've seen code like:
rv = NSS_Initialize(certDir, NULL, NULL, "secmod.db", NSS_INIT_READONLY);
is it really necessary to specify secmod.db with NSS_Initialize() ?

No.  A NULL or empty string will be replaced by an appropriate default.

Note that when used with the Berkeley DBs, the PKCS#11 module configuration
information is stored in secmod.db, which is also a Berkeley DB; but when
used with the SQLite3 DBs, the PKCS#11 module configuration information is
stored into a file named pkcs11.txt, which (as the name suggests) is a
plain text file.
yup, know that, and therefore asked to ommit secmod.db - so I assume that:
rv = NSS_Initialize(certDir, "", "", "",  NSS_INIT_READONLY);
works also fine with pre-3.12.0, and there's no need to specify secmod.db as 4th argument, right?

conclusion - would something like that work from 3.2.1 to recent?

char *certDir = PR_smprintf("%s%s",
    NSS_VersionCheck("3.12.0") ? "sql:" : "",
    SSL_DIR);
rv = NSS_Initialize(certDir, "", "", "",  NSS_INIT_READONLY);
PR_smprintf_free(cerDir);

I guess I can already right after the call to NSS_Initialize() call PR_smprintf_free() ?

thanks, Günter.
--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to