On 01/08/2017 05:34 AM, Opa114 wrote:
Hi there,

i have to use NSS in one of my applications and therefor i have to open 
multiple databases (for example Firefox and Thunderbird) at once to read and 
write into these. How can i do this programatically in C++? Some exmaple Code 
would be very helpful because the whole NSS-Stuff is not very well documented.

Thnaks in advice! :)

NSS does have a database format that can allow multiple applications to open the same database at the same time, but neither Firefox nor Thunderbird has yet moved to that database. It is possible to force them to use this database format by setting the NSS_DEFAULT_DB_TYPE to sql. Once they are using the same database, you will have to use symbolic links so that the NSS databases in the separate firefox and thunderbird point to a single database.

https://wiki.mozilla.org/NSS_Shared_DB_Howto explains how to do set up the above.

If you have an application, you can open the shared database by passing "sql:{shared directory path}" to the configdir parameter of the NSS_Initxxx function you are calling to initialize NSS (where {shared directory path} is replaced by a path to a common directory you which your applications to share. Some recommendations for Linux based applications can be found here: https://wiki.mozilla.org/NSS_Shared_DB_And_LINUX


bob



--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to