# Self-Signing a Module

**URL:** <https://forum.inductiveautomation.com/t/self-signing-a-module/12380>\
**Category:** 3rd Party Modules\
**Created:** [November 18, 2016, 3:57pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380 "2016-11-18T15:57:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polynomial](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Polynomial](https://forum.inductiveautomation.com/u/Polynomial)\
**Post date:** [November 18, 2016, 3:57pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380/1 "2016-11-18T15:57:07Z")

</div>

I’m trying to follow the directions on this page ([docs.inductiveautomation.com:84 … le+Signing](https://docs.inductiveautomation.com:8443/display/SE/Module+Signing)) but I don’t think I’m doing it the right way.

How do you use KeyStore Explorer to create the files I need to self-sign a module? Can anyone give me some step-by-step instruction?

I also ran into a “JNI error has occurred. Check your installation error” when I tried to run the Module Signer. I’m not sure it was due to the files I was trying to feed it or something else though.

Any help would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![Polynomial](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Polynomial](https://forum.inductiveautomation.com/u/Polynomial)\
**Post date:** [November 21, 2016, 2:29pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380/2 "2016-11-21T14:29:18Z")

</div>

I figured it out so I’ll post the basic steps here for posterity:

[ul]1. In KeyStore Explorer, generate a new Key Pair.  
2. Right-click on the new Key Pair, select Export-\>Export Certificate Chain. Select the “Entire Chain” option and pick PKCS #7 to get the p7b file.  
3. Run the command given on the documentation page for the module-signer. I used Windows PowerShell and had to put quotes around the variable values (alias, chain, etc).[/ul]

I hope this’ll help someone else!

---

<div class="post-metadata">

**Author:** ![JWolnisty](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@JWolnisty](https://forum.inductiveautomation.com/u/JWolnisty)\
**Post date:** [August 24, 2018, 4:36pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380/3 "2018-08-24T16:36:40Z")

</div>

I’m at my wits end with the module signer and I’m sure it is something simple.  
No matter what I do I constantly get “keystore was tampered with or password is incorrect”.  
I have created keystores, recreated them, added key-pairs, exported, imported, put quotes around every parameter, taken them off. I’m considering sacrificing a chicken, sprinkling its blood on the keyboard and bowing towards Folsom next.  
Any suggestions (to save the life of a chicken?)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [August 24, 2018, 4:47pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380/4 "2018-08-24T16:47:59Z")

</div>

See first few entries in the post

> [@Module signing tool](http://forum.inductiveautomation.com/t/module-signing-tool/18885):
>
> While self signing modules using java -jar module-signer.jar \ -keystore=/keystore.jks -keystore-pwd= -alias= -alias-pwd= -chain=/cert.p7b -module-in=/my-unsigned-module.modl -module-out=/my-signed-module.modl as given in the SDK documentation, how to get chain path /cert.p7b? I don't see any such files in my folder where I created the keypair using the keystore explorer tool ver 5.3.2? I get error "no RSA PrivateKey found for alias 'gcm\_certificate'." I am at a loss how to use …

You have run the module-signer tool with proper command after you have generated and exported the keys with KeyStore Explorer tool.

---

<div class="post-metadata">

**Author:** ![JWolnisty](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@JWolnisty](https://forum.inductiveautomation.com/u/JWolnisty)\
**Post date:** [August 24, 2018, 5:16pm UTC](https://forum.inductiveautomation.com/t/self-signing-a-module/12380/5 "2018-08-24T17:16:37Z")

</div>

The chicken blood fixed it!

Actually I found a typo.
