Re: Default {cert8, key3} db internals: lg_GetPublicKey()->nsslowkey_ConvertToPublicKey()

2009-10-26 Thread Robert Relyea
> Given that, I am curious, why this code exists: > > lg_GetPublicKey @ softoken/legacydb/lgattr.c > static NSSLOWKEYPublicKey * > lg_GetPublicKey(LGObjectCache *obj) > { > NSSLOWKEYPublicKey *pubKey; > NSSLOWKEYPrivateKey *privKey; > ... > privKey = lg_FindKeyByPublicKey

Re: Encrypt(), Decrypt() and ChangePassword() pkcs11-modificationin nsSDR.cpp

2009-10-26 Thread Robert Relyea
On 10/24/2009 12:34 AM, Marc Kaeser wrote: > Thx a lot, > > But what if I just want to "hardcode" the use of another token, > without any ability to choose the one sdr should use? My first idea > was to replace slot = GetInternalModule() by slot = > GetSlotByName(const char * name); because they're

Default {cert8, key3} db internals: lg_GetPublicKey()->nsslowkey_ConvertToPublicKey()

2009-10-26 Thread Konstantin Andreev
Hello. AFAIK, default (so-called legacydb) database manages private keys storage as follows: -- crypto-keys stored in dbm file "key3.db" -- every (dbm_key,dbm_value) pair in "key3.db" is a pair of cryptographic public/private keys: ( public key, encrypted PKCS#8 PrivateKeyInfo ) Giv