# Module signing tool

**URL:** <https://forum.inductiveautomation.com/t/module-signing-tool/18885>\
**Category:** Module Development\
**Created:** [July 18, 2018, 8:18pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885 "2018-07-18T20:18:48Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [July 18, 2018, 8:18pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/1 "2018-07-18T20:18:48Z")

</div>

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 this tool?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 18, 2018, 8:35pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/2 "2018-07-18T20:35:39Z")

</div>

In KeyStore Explorer you can right-click on a key pair entry, Export \> Export Certificate Chain. Choose PKCS #7 as the format.

Then give the module-signer utility the path to that p7b file in the -chain parameter.

---

<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:** [July 19, 2018, 4:12am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/3 "2018-07-19T04:12:24Z")

</div>

I did that but get the same error "no RSA **PrivateKey** found for alias 'gcm\_certificate'." Please note it says "PrivateKey" not found not the chain path for p7b file.

I did export the private key and public key as well with the same process that you explained for , but still it gives the error! It stores the private key in pkcs8 format. Is that the issue that it expects it to be in pkcs7 format! Is it due to the new version of KeyStore explorer tool? How to export it in pksc7 format? ShouldI use the older version of the tool? Or is there an option in module-signer POM file to accept the PKCS8 format as well?

I have the following files exported from the KeyStore tool in my folder:

19-07-2018 09:20 1,269 gcm\_certificate.cer  
19-07-2018 01:34 1,088 gcm\_certificate.csr  
19-07-2018 09:20 2,625 gcm\_certificate.p12  
19-07-2018 09:51 1,318 gcm\_certificate.p7b  
19-07-2018 09:33 1,785 gcm\_certificate.pkcs8  
19-07-2018 09:21 451 gcm\_certificate.pub

If it helps to identify the problem.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 19, 2018, 12:08pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/4 "2018-07-19T12:08:54Z")

</div>

What’s the full command you’re running (passwords omitted)?

What format did you create your keystore in? None of those other files you exported are needed. You just need the keystore and the chain in PKCS#7 format.

---

<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:** [July 19, 2018, 2:33pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/5 "2018-07-19T14:33:11Z")

</div>

java -jar module-signer-1.0.0-SNAPSHOT-jar-with-dependencies.jar -keystore=C:\Users\imex.keystore -keystore-pwd=\*\*\*\*\*\*\*\*\* -alias=gcm\_certificate -alias-pwd=\*\*\*\*\*\*\*\*\* -chain=C:\Users\imex\gcm\_certificate.p7b -module-in=C:\Users\imex\Documents\NetBeansProjects\GCM\GCM-build\target\GCM-Ignition-Module-unsigned.modl -module-out=C:\Users\imex\Documents\NetBeansProjects\GCM\GCM-build\target\GCM-Ignition-Module-signed.modl

I created KeyStore in jks format and exported the certificate chain in PKCS # 7 format.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 19, 2018, 3:58pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/6 "2018-07-19T15:58:00Z")

</div>

Looks okay to me. Since I can’t reasonably inspect your KeyStore the only thing I can assume is that the KeyPair inside was not created correctly, or didn’t get created using RSA, or you’re using the wrong alias.

---

<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:** [July 19, 2018, 4:04pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/7 "2018-07-19T16:04:21Z")

</div>

hmm....Let me try some more things on my own. Hopefully I would be able too figure it out soon.

Best Regards

---

<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:** [July 20, 2018, 3:17am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/8 "2018-07-20T03:17:56Z")

</div>

Got it! Its working ! I think the problem was the name for the keystore file which was .keystore by default, which I changed to some some thing else, or it could be case sensitivity of the alias name which was different in the command line than as defined in the editor tool!

Whatever it is , its working fine now!

regards

---

<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 8, 2018, 11:48am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/9 "2018-08-08T11:48:55Z")

</div>

Now that module signing is working, how to put the Licensing and documentation information in .modl files? Earlier version had an HTML page for documentation & Licensing information.

Also hope self signed modules will suffice for putting in module showcase?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 8, 2018, 12:12pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/10 "2018-08-08T12:12:13Z")

</div>

Licensing and documentation hasn’t changed. The module.conf file must have a `<Licence>` section specifying the file name of the license document, typically `license.html`, in the root of the .modl file. A `<Documentation>` section similarly specifies the top level html file of your documentation, or a PDF file. This is assumed to be in a `doc` folder of your .modl file.

---

<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 8, 2018, 12:29pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/11 "2018-08-08T12:29:38Z")

</div>

Thanks a lot for the reply.

What about self signed models , are they acceptable in module showcase ?  
Kevin McCluskey has also created a module Showcase API project in Ignition which has text section for Module Info and Module License. Where does this info go? Directly on the Module Showcase page?

I am yet to publish information here as well.

---

<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 8, 2018, 2:13pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/12 "2018-08-08T14:13:18Z")

</div>

> [@pturmel](#):
>
> The module.conf file must have a \<Licence\> section specifying the file name of the license document, typically license.html, in the root of the .modl file. A \<Documentation\> section similarly specifies the top level html file of your documentation, or a PDF file. This is assumed to be in a doc folder of your .modl file.

The modl file is generated by maven , so where do I keep the license.html and documentation html or pdf file in my project so that maven bundles them in the .modl file?

---

<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 8, 2018, 4:35pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/13 "2018-08-08T16:35:42Z")

</div>

How are modules to be distributed for evaluation? Do we include the signed .modl files in our downloads?  
Does the License Key management have to be done by us using the tool supplied by Ignition on 15/09/2015 for all versions of Ignition, or only for 7.9 and above? Then how licenses are managed for 7.7 & 7.8?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 8, 2018, 5:36pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/14 "2018-08-08T17:36:14Z")

</div>

> [@PRAMANJ](#):
>
> The modl file is generated by maven

Sorry, I still use ant, so I can build modules that support many versions of Ignition. The only maven project in my dev box is the module-signer tool. /-:

> [@PRAMANJ](#):
>
> How are modules to be distributed for evaluation? Do we include the signed .modl files in our downloads?

Yes, you must host your signed module downloads and online documentation yourself. You can offer signed modules for eval purposes before you update the showcase, but you have to get the links to your customers yourself. Like with forum links here -- that's how I publish my betas.

> [@PRAMANJ](#):
>
> Does the License Key management have to be done by us using the tool supplied by Ignition on 15/09/2015 for all versions of Ignition, or only for 7.9 and above?

Only 7.9+

> [@PRAMANJ](#):
>
> Then how licenses are managed for 7.7 & 7.8?

You nicely ask your sales contact at IA to attach your module license to your customer's license key. Each and every time.

---

<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 8, 2018, 6:10pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/15 "2018-08-08T18:10:30Z")

</div>

> [@pturmel](#):
>
> Sorry, I still use ant, so I can build modules that support many versions of Ignition. The only maven project in my dev box is the module-signer tool. /-:

Thanks a lot Phil. So I will be able to include the self signed modl files in my downloads. I will give you and kyle the first beta before I make them available on gitHub (perhaps by tomorrow) so that you can tell if I have included the right modl files or not.

However the above information (attaching License html file and a bit of documentation) will be a must. request Kevin to throw some light.

Thanks for the other information.

b/r

---

<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 12, 2018, 6:29am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/16 "2018-08-12T06:29:18Z")

</div>

I got the answer to my previous quest.  
Another question, how to find out if our module is Licensed or not. (Like the isFreeModule(), is there any function that returns the Licensed status of our modl?).

I mean a flag to determine whether the License is activated or still its trial version?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 13, 2018, 4:08am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/17 "2018-08-13T04:08:38Z")

</div>

> [@PRAMANJ](#):
>
> I mean a flag to determine whether the License is activated or still its trial version?

LicenseState is passed on startup and later in change events to the module hook. You must implement those methods and save the state when it is delivered.

---

<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 13, 2018, 4:49am UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/18 "2018-08-13T04:49:10Z")

</div>

Even if its available at start up ts fine, we can restrict some of the features if required between Licensed and unlicensed. I hope I can find some documentation on these methods somewhere.

Thanks for the reply.  
regards

---

<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 13, 2018, 4:31pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/19 "2018-08-13T16:31:33Z")

</div>

Is LicenseState the parameter for it in startup function? Where to find the documentation for the Class. The offline version had the complete documentation for the class library. I don't know where to find it online? Any help will be appreciated.  
b/r

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 13, 2018, 4:43pm UTC](https://forum.inductiveautomation.com/t/module-signing-tool/18885/20 "2018-08-13T16:43:48Z")

</div>

[http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/common/licensing/LicenseState.html](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/common/licensing/LicenseState.html)

LicenseState values are provided to the GatewayModuleHook on `startup` and in `notifyLicenseStateChanged`:  
[http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/gateway/model/GatewayModuleHook.html](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/gateway/model/GatewayModuleHook.html)

[Next page](https://forum.inductiveautomation.com/t/module-signing-tool/18885.md?page=2)
