On 01/10/2017 10:18 AM, Opa114 wrote:
thanks, but these facts i know.
I don't want top let multiple applications open one Database, i want to open 
multiple different Mozilla databases, in the old standard format, with one (my) 
application.

I tried to use the NSS_Init functions. These works with openening one database, 
but when i open a second one the whole application crashes,so that's why i 
asked the question and may be get some working example c++ code?
1) Where are you crashing (it's not expected to work, but I don't expect a crash because you called NSS_Init again).

2) To open additional databases you want to use SECMOD_OpenUserDB:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11_Functions#SECMOD_OpenUserDB

You can call that multiple times.
Once the database is opened any of the NSS find functions will find all the certs in both databases. The slot returned from SECOMD_OpenUserDB can be used in functions that take a slot to narrow the operations just to that particular database.

To NSS each database will look basically like a smart card.

When you are through with that database you can use SECMOD_CloseUserDB()

bob


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

Reply via email to