ModuleSigner issue

Hi all,

I'm trying to sign my build using gradle and for now am trying to sign it via command line:

./gradlew :signModule --certAlias server --certFile ./cert.crt --certPassword xxx --keystoreFile keystore.jks --keystorePassword xxx

but I keep getting a response of:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':signModule'.
> 'void com.inductiveautomation.ignitionsdk.ModuleSigner.<init>(java.security.PrivateKey, java.io.InputStream)'

The odd thing is if I plug all the same passwords and keystore and what not into the java signer

module-signer-1.0.0-SNAPSHOT-jar-with-dependencies.jar

then everything just works. I'll raise a similar issue on the ignition-module-tools/issues github page but I just wonder if anyone else has had these problems? I'm a bit stumped

Which version of Java/keytool are you using to create the .jks Key Store? There is a change to the Key Store in Java 22. I don't have the issue with Java 17.

Thanks Bill - I changed over to Java17 and after a false start or two finally managed to get everything signing.

I've been out of Java for a few years - getting involved in this stuff has just reminded me what a complete mess the whole ecosystem is in :frowning:

Thanks though!

You must not have been out doing web development then :laughing:

2 Likes

I take it all back. Tried building on my desktop machine, same repo, so same gradlew, same javac and java from open_sdk_17 - this build fails with the same private key issue.

Also, we have 3 modules, core - quality and ops. Core and Ops build and sign fine but quality gets the same error on both machines. Truly frustrating.

Maybe it's something in my .m2 cache - I'll keep hunting - but at least one machine can sign a gradle build :slight_smile:

Finally got to the bottom of all this. I rebuilt the module signer and the gradle module tool and installed them into my local .m2 repo. Now my build scripts reference my custom builds and everything signs perfectly. It may be something specific to my setup but there was definitely something screwy going on - and now everything just works....step slowly away from the code!

It may be worth bringing the module signer up to Java17 which seems to be where the example code currently is - @Kevin.Herron - your fingerprints seem to be all over the module signer. Is it worth doing do you think?

1 Like

I don't think the standalone module signer has anything to do with your issue at all. Aside from the fact that it already works on both JDK 11 and 17, a while back @Brian_Ray copy/pasted/updated module signer into the gradle module plugin source code, so there's no dependency or link to the standalone version.