# Trying pkcs11.installmodule() Webextension Api

**URL:** <https://discourse.mozilla.org/t/trying-pkcs11-installmodule-webextension-api/35816>\
**Category:** Development\
**Created:** [February 9, 2019, 12:51am UTC](https://discourse.mozilla.org/t/trying-pkcs11-installmodule-webextension-api/35816 "2019-02-09T00:51:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalbj](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishalbj](https://discourse.mozilla.org/u/vishalbj)\
**Post date:** [February 9, 2019, 12:51am UTC](https://discourse.mozilla.org/t/trying-pkcs11-installmodule-webextension-api/35816/1 "2019-02-09T00:51:41Z")

</div>

Hi,

While testing my new signed add-on, Mozilla was able to add extension automatically, but the PKCS11 api installmodule() called in my background script is reporting the following error

Error: No such PKCS#11 module acpkcs211

Following are the files implemented as part of the add-on and their registry settings.

## manifest.json

{  
“name”: “ActivClient Security Module”,  
“manifest\_version”: 2,  
“version”: “1.1”,  
“description”: “ActivClient Security Module”,  
“applications”: {  
“gecko”: {  
“id”: “{2faa6adf-08f5-418f-b6cf-b303bb71d2f1}”,  
“strict\_min\_version”: “64.0”  
}  
},  
“permissions”: [“pkcs11”],  
“background”: {  
“scripts”: [“ActivClient-Security-Module.js”]  
}  
}

## ActivClient-Security-Module.js:

try  
{  
browser.pkcs11.installModule(“acpkcs211”);  
console.log(“module installed”);  
}  
catch(e)  
{  
console.log("module could not be installed "+e);  
}

activclient\_security\_module.json  
{  
“name”: “acpkcs211”,  
“type”: “pkcs11”,  
“description”: “ActivClient Security Module”,  
“path”: “C:\Program Files\HID Global\ActivClient\acpkcs211.dll”,  
“allowed\_extensions”: ["{2faa6adf-08f5-418f-b6cf-b303bb71d2f1}"]  
}

## Registry settings:

HKEY\_LOCAL\_MACHINE\SOFTWARE\Mozilla\Firefox\PKCS11Modules\acpkcs211 = C:\Program Files\HID Global\ActivClient\Mozilla Extensions\ActivClient PKCS #11 Security Module\activclient\_security\_module.json

Please let me know if i am missing something here.

Thank you,  
Vishal
