How is private key handled when an external PKCS #11 module is loaded? Is it picked up from the token when securing, or does NSS expect it to be added in its private key database to use it?
While certificates may be read into the temporary database, private keys are never extracted from the PKCS #11 module unless the user is trying to back up the key. NSS represents each private key and a pointer to its PKCS #11 slot as a CK_OBJECT_HANDLE. When NSS needs to do anything with a private key, it calls the PCKS #11 module that holds the key.