A feast of certs --#-- Netscape 3.x keeps its certs in a file named cert5.db and Netscape 4.x keeps them in cert7.db. Both these files are in the Berkeley DB format, and you will need the free Berkeley DB library from Sleepy Cat Software to dump them out. Most Unix/Linux distributions come with Berkeley DB already installed. Not only is the library installed, but the Perl module DB_File.pm is there, too.

If you have DB_File.pm on your system you're in great luck, because that's what I'm going to use in this example. (Later I may add the C code to do it without using Perl.) Netscape stored the certs in cert5.db and cert7.db using Berkeley DB 1.85, an out of date and no longer supported version. If you have an older Linux installation (say, RedHat 5.0), you may have 1.85 on your system, but for those with newer systems, you probably don't. One way to tell is if you have db_dump185 on your system. If you do, then you have a newer versions. db_dump185 is there to assist in converting old Berkeley DB files to the newer format now supported.

I'm going to assume you have a newer Berkeley library and need to convert the file. Just do this:

db_dump185 cert7.db | db_load mycerts.db -t hash
Now we're set to write some Perl code to dump out the certs.