Search code examples
javasecurityappletjarsignersigned-applet

Author is unknown for signed jar


Signing jar in Java, I have followed these three step to sign

  1. keytool -genkey -keystore myKeyStore -alias me
  2. keytool -selfcert -keystore myKeyStore -alias me
  3. jarsigner -keystore myKeyStore jarfile.jar me

My questions are as follows :

  1. After that I have run my applet, why it shows author is unknown?
  2. I can able to give -validity no of days for my jar, what is the maximum days I can give?

Solution

    1. The certificate you have created is a self-signed one. Only certificates that has been signed by one of the trust centers marked as trusted in the Java settings are shown as "verified author".

    2. The validity does not have anything to to how long your JAR file will work. The validity period only marks the time you can use the certificate (or better the private key that belongs to the certificate) for signing