Packagedom.objects
Classpublic class Pkcs11
InheritancePkcs11 Inheritance Object

Introduced in: DOM 0 

PKCS11 modules are external modules which provide access to smart-card readers, biometric security devices, or external certificate stores. There are two methods for installing PKCS11 modules into Firefox. Users can use the preferences dialog to install or remove PKCS11 module. Extensions can programmatically manage PKCS11 modules using the nsIPKCS11 programming interface.

Note (Mozilla): The information in this article is specific to Firefox 3.5 and newer, support for window.pkcs11 property was disabled due to security concerns.

Mechanism Flag Definitions

In general, most tokens should not set any of the cipher flags. Setting these flags means you want your token to supply the default implementation for these functions. Normally Mozilla uses its own internal module to supply these functions. These flags override that preference. If you choose to implement these flags, your module must supply the following additional functions for each flag:

See also

MDC - PKCS11
MDC - window.pkcs11
MDC - JavaScript crypto


Public Methods
 MethodDefined By
  
DOM 0 addModule(moduleName:DOMString, libraryFullPath:DOMString, cryptoMechanismFlags:Number, cipherFlags:Number):Number
Loads a new PKCS #11 module.
Pkcs11
  
DOM 0 deletemodule(moduleName:DOMString):Number
Removes a PKCS #11 module.
Pkcs11
Method Detail
DOM 0 addModule()method
public function addModule(moduleName:DOMString, libraryFullPath:DOMString, cryptoMechanismFlags:Number, cipherFlags:Number):Number

Introduced in: DOM 0 

Loads a new PKCS #11 module.

Note (Mozilla): The module will be placed in the NSS secmod.db database and will be loaded automatically on application restart.

Parameters

moduleName:DOMString — Name of the module.
 
libraryFullPath:DOMString — The filename of the library prepended with its full path.
 
cryptoMechanismFlags:Number — A bit vector indicating all cryptographic mechanisms should be turned on by default (see above).
 
cipherFlags:Number — A bit vector indicating all SSL or S/MIME cipher functions supported by the module (see above).

Returns
Number — Unknown

See also

DOM 0 deletemodule()method 
public function deletemodule(moduleName:DOMString):Number

Introduced in: DOM 0 

Removes a PKCS #11 module.

Note (Mozilla): In the delete case, the module is removed from the NSS secmod.db. This function will issue a user prompt to confirm the operation before the add or delete actually occurs.

Parameters

moduleName:DOMString — Name of the module.

Returns
Number — Unknown

See also