- You need to specify the same alias to the jarsigner tool. You used 'myself' when building the keystore: use that again.
- Definitely not. It contains your private key. Keep it private.
issues in Signing a jar in java : public key issue
-
23-06-2022 - |
题
I am working on one swing application and i want to make it "web start" for that i need to sign my jar
For this, I followed following steps : 1. Create a key store file using following command
keytool -genkey -keystore myKeystore -alias myself
keytool -selfcert -alias myself -keystore myKeystore
Enter keystore password:
keytool -list -keystore myKeystore
Enter keystore password:
Keystore type: JKS Keystore provider: SUN
Your keystore contains 1 entry
myself, Aug 7, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 9A:CD:47:D2:9D:51:F4:5A:56:FB:5C:27:7B:E6:03:EE: 65:70:F7:7B
Private Key is genarated above successfully.
2.
jarsigner -keystore myKeystore "C:..\myApp.jar" sourabh Enter Passphrase for keystore:
jarsigner: Certificate chain not found for: sourabh. sourabh must reference a v alid KeyStore key entry containing a private key and corresponding public key ce rtificate chain.
It is showing above error.
Issue 1: From where i can get this public key?
I googled it. Information is there for public key but could not get any information about creating. How can we generate it for my application.
Issue 2 : If i am moving my application to online server (e.g. apache derver) do i need to copy keystore file also>?
解决方案