Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shared security Db in FF-3.5?

9 views
Skip to first unread message

Andrei Korostelev

unread,
Jul 3, 2009, 4:43:51 AM7/3/09
to
Hi all,

Does Firefox 3.5 already support multi-process shared secrurity
database or it is still single-process?

Andrei

Nelson Bolyard

unread,
Jul 6, 2009, 1:22:09 AM7/6/09
to
On 2009-07-03 01:43 PDT, Andrei Korostelev wrote:

> Does Firefox 3.5 already support multi-process shared secrurity
> database or it is still single-process?

By default, it is still the old single-process cert8 and key3 DBs,
as before.

However, FF 3.5 has the code to support shared-access cert9 and key4 DBs,
based on sqlite3. You can force FF 3.5 to use that by setting an
environment variable.

> Is non-shared security Db still the case with upcoming Firefox 3.5?

The old non-shared security DBs are still the default in FF 3.5.

> Is SecurityDb in Firefox 3 multiuser?

Multi-user is a different matter than multi-process.
FF 3.5's new cert9 and key3 DB are multi-process capable,
but I would NOT describe them as multi-user.
They are a pair, and the private keys in the key DB are, of course,
private to each individual user. So, each user needs his/her own
key DB, and since they are a pair, this implies that each user needs
his/her own cert DB too. But with cert9.db, all that user's processes
can share a common pair of DBs.

Andrei Korostelev

unread,
Jul 6, 2009, 3:09:17 AM7/6/09
to

Thank you. Are there plans to make this shared Db default, say, in FF
4?

Jean-Marc Desperrier

unread,
Jul 6, 2009, 5:17:42 AM7/6/09
to
Nelson Bolyard wrote:
> By default, it is still the old single-process cert8 and key3 DBs,
> as before.
>
> However, FF 3.5 has the code to support shared-access cert9 and key4 DBs,
> based on sqlite3. You can force FF 3.5 to use that by setting an
> environment variable.

My understanding is that is you start FF *once* with the setting enabled
for the new db format, the base will be converted, and then it will use
the new format every time after that point, without any special setting.

Maybe even you could externally convert the base, and Fx will use the
new format the next time it starts ?

An annoying limitation is that the certificate file *must* be in the
profile directory, there's no way to set an absolute path, so it's still
hard to use it as a multi-application db.


Nelson Bolyard

unread,
Jul 13, 2009, 10:48:10 PM7/13/09
to
On 2009-07-06 02:17 PDT, Jean-Marc Desperrier wrote:
> Nelson Bolyard wrote:
>> By default, it is still the old single-process cert8 and key3 DBs,
>> as before.
>>
>> However, FF 3.5 has the code to support shared-access cert9 and key4 DBs,
>> based on sqlite3. You can force FF 3.5 to use that by setting an
>> environment variable.
>
> My understanding is that is you start FF *once* with the setting enabled
> for the new db format, the base will be converted, and then it will use
> the new format every time after that point, without any special setting.

That's how conversions were done in the past, but that's not how the
conversion in NSS 3.12 works. In NSS 3.12, you must tell NSS every time
it is initialized whether it is using old (Berkeley, default) or new
(Sqlite3) DBs. This may be done in any of (at least) 3 different ways,
including an environment variable, a directory name prefix, or a
programmatic function call (IIRC).

> Maybe even you could externally convert the base, and Fx will use the
> new format the next time it starts ?

You could indeed do an external conversion. the certutil program will
happily do it. But you must still tell the programs to use the new DB,
or the programs will use the old one.

> An annoying limitation is that the certificate file *must* be in the
> profile directory, there's no way to set an absolute path, so it's still
> hard to use it as a multi-application db.

hmm. I think that is a Firefox limitation, not an NSS limitation.
But I could be wrong about that.

Jean-Marc Desperrier

unread,
Jul 16, 2009, 4:00:37 AM7/16/09
to
Nelson Bolyard wrote:
> [...] In NSS 3.12, you must tell NSS every time

> it is initialized whether it is using old (Berkeley, default) or new
> (Sqlite3) DBs. This may be done in any of (at least) 3 different ways,
> including an environment variable, a directory name prefix, or a
> programmatic function call (IIRC).

Oh, too bad. I think it would be better then if Firefox were to
programmatic set it to use sqlite3 when the sqlite3 file exists.

>> An annoying limitation is that the certificate file*must* be in the


>> profile directory, there's no way to set an absolute path, so it's still
>> hard to use it as a multi-application db.
> hmm. I think that is a Firefox limitation, not an NSS limitation.
> But I could be wrong about that.

Yes, it is a Firefox limitation. I think there's already a bug open
about that.

Wan-Teh Chang

unread,
Jul 16, 2009, 2:23:48 PM7/16/09
to Andrei Korostelev, dev-se...@lists.mozilla.org
On Mon, Jul 6, 2009 at 12:09 AM, Andrei Korostelev<and...@korostelev.net> wrote:
>
> Thank you. Are there plans to make this shared Db default, say, in FF
> 4?

Yes, there are, and now is a good time in the Firefox
development cycle to start that work. But it seems that the
right people to do that are bogged down by their other
important work (such as FIPS validation).

The Linux version of the Chromium browser uses NSS and
is using the NSS shared databases. It creates them in
the ~/.pki/nssdb directory, following the NSS team's proposal
at https://wiki.mozilla.org/NSS_Shared_DB_And_LINUX

Wan-Teh

aero...@gmail.com

unread,
Jul 16, 2009, 4:46:42 PM7/16/09
to Nelson Bolyard, dev-se...@lists.mozilla.org

On Sun, Jul 5, 2009 at 10:22 PM, Nelson Bolyard<NOnels...@nobolyardspam.me> wrote:
> However, FF 3.5 has the code to support shared-access cert9 and key4 DBs,
> based on sqlite3.  You can force FF 3.5 to use that by setting an
> environment variable.
>

>> Is non-shared security Db still the case with upcoming Firefox 3.5?
>
> The old non-shared security DBs are still the default in FF 3.5.

What is the environment variable?

Thanks,

-Kyle H

Wan-Teh Chang

unread,
Jul 16, 2009, 5:02:42 PM7/16/09
to aero...@gmail.com, dev-se...@lists.mozilla.org, Nelson Bolyard
On Thu, Jul 16, 2009 at 1:46 PM, <aero...@gmail.com> wrote:
> What is the environment variable?

Set the environment variable NSS_DEFAULT_DB_TYPE to sql.

All environment variables used by NSS are documented at
https://developer.mozilla.org/en/NSS_reference/NSS_environment_variables

Wan-Teh

0 new messages