My company sent me a set of certificates that I'm supposed to use to sign my jars. I can't figure out how to do it. Currently I'm getting the following error:
jarsigner: Certificate chain not found for: mykey. mykey must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.
Here's what I've done: Two of the files I got had .spc and .p7b extensions. It seems they are binary PKCS #7 certificates, which keytool wouldn't read (though it says it will.) So, I imported them into the Microsoft Certificate store and re-exported them as base64 X.501 certificates and keytool accepted them. But jarsigner won't sign jars with them, as per the error message.
I also got a file with a pvk extension, which is apparently a Microsoft private key. I have no idea what, if anything, I can do with it.
Is it possible to sign jars with anything other than jarsigner?
Is it possible to sign jars with certificates that weren't generated by the process given in the jarsigner documentation: genseckey, certreq?
The probably easiest way would be for you to ask them to combine all those files into a PKCS#12 (.p12/.pfx) file which you can easily import into the java key store. Otherwise, you would need to combine all those files yourself using some third party tools. I got a tool that can do all that if you get really stuck.
Great! That got me past that problem, to another one. When I use the certificate to sign stuff, the Java accept-certificate dialog says it's not verified. It's a completely legit, paid for certificate. I figure it's a messed up chain back to a CA root in the keystore, yes? I used -trustcacerts when I imported, but that didn't change anything.
I am a newbie on ADF and I also encountered this problem and eventually solved it by the solution i found on this thread.
But my next problem i encountered is the jarsigner: jarsigner: Certificate chain not found for: employees. employees must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.
I am just following this tutorial: http://docs.oracle.com/cd/E18941_01/tutorials/BuildingMobileApps/ADFMobileTutorial_1.html