I need to sign jar files using Google Cloud HSM. The standard tool for signing jar files that comes with the JDK is jarsigner. I see that AWS Cloud HSM has documentation on using AWS Cloud HSM with jarsigner to sign jar files.
https://docs.aws.amazon.com/cloudhsm/latest/userguide/keystore-third-party-tools.html
However, I could not find any documentation directly addressing how to use Google Cloud HSM with jarsigner to sign jar files. If there is no native support for this in Google Cloud HSM, what would be required to make jarsigner work with Google Cloud HSM to do the jar signing? Any pointers are welcome.
Jsign provides a JCA provider that can be used with jarsigner to sign with a Google Cloud HSM key (disclaimer: I'm the author of this project).
The syntax looks like this: