Found it.! One of the things Netscape 6.2 (and I think other versions) do to the secmod database is to place the full path to the nsscbki.dll into the secmod.db. On my systems, Netscape always installs itself into the \PROGRAM FILES\NETSCAPE\NETSCAPE 6 directory, by default. This is shown in the partial dump of the secmod.db file. The problem appears to be the spaces contined within at least the \NETSCAPE 6\ portion of the path. If you edit this file with a hex editor and replace the spaces in the path with some non space character, my program and the NSS tools no longer abort.
I don't know if this is the only problem, but it is the one that is causing all non Netscape programs to bomb out when they make the NSS_Init call after the secmod database has been "messed" with by Netscape. Note that I seen this same type of behavior when I was testing the new 3.4 softoken. If you pass a database path containing spaces into that program with the C_Initialize call, softoken will abort. I "fixed" that by simply normalizing all references to a database path to the old DOS 8.3 format prior to calling the softoken startup functions. The following is a partial dump of the secmod.db AFTER it had been opened and closed by Netscape 6. 1ED0 00 00 00 00 00 05 00 10 00 58 00 00 00 00 00 00 *.........X......* 1EE0 00 00 00 00 00 14 42 75 69 6C 74 69 6E 20 52 6F *......Builtin Ro* 1EF0 6F 74 73 20 4D 6F 64 75 6C 65 00 30 43 3A 5C 50 *ots Module.0C:\P* 1F00 52 4F 47 52 41 4D 20 46 49 4C 45 53 5C 4E 45 54 *ROGRAM FILES\NET* 1F10 53 43 41 50 45 5C 4E 45 54 53 43 41 50 45 20 36 *SCAPE\NETSCAPE 6* 1F20 5C 6E 73 73 63 6B 62 69 2E 64 6C 6C 00 00 42 75 *\nssckbi.dll..Bu* 1F30 69 6C 74 69 6E 20 52 6F 6F 74 73 20 4D 6F 64 75 *iltin Roots Modu* 1F40 6C 65 00 05 00 10 00 36 00 00 00 00 00 00 00 00 *le.....6........* 1F50 00 00 00 06 65 54 6F 6B 65 6E 00 1C 5C 77 69 6E *....eToken..\win* 1F60 64 6F 77 73 5C 73 79 73 74 65 6D 5C 65 74 70 6B *dows\system\etpk* 1F70 63 73 31 31 2E 64 6C 6C 00 04 00 00 00 00 00 00 *cs11.dll........* Ken "Kenneth R. Robinette" <[EMAIL PROTECTED]> wrote in message a1solg$[EMAIL PROTECTED]">news:a1solg$[EMAIL PROTECTED]... > I found the problem I was having trying to use NSS on windows 98. I was > using the Netscape 6.2 certificate, key and secmod databases. As is turns > out, no NSS based application can access these databases; if they try, the > program aborts on the NSS_Init call. > > If you use the NSS utilities modutil and certutil to create new databases, > define various PKCS11 smart card/USB tokens PKCS11 dll's and add a few > certificates to the internal module, then all the utilities will work, > including my program. > > If you copy these databases to the Netscape user profile and start Netscape > 6.2, use PSM to list the certificates, all works well. Then if you close > Netscape and then copy the databases back to the test directory, all NSS > based programs that try to access the databases will abort. > > I guess this means trying to use NSS on a windows based system is not such a > good idea unless you have no plans to ever use Netscape to use the > certificates/keys contained within the certificate database used by all > other applications, or to never use the certificates contained within the > Netscape databases in all the other applications. Might as well use the > Microsoft browser/cryptoapi, where all security aware programs can share the > common certificates. > > Ken > > > > >
