Creating your Own Certificate , Keystore file, signing the jar using jarsigner & verifying.
#To Generate keystore file.
keytool -genkey -alias <your keystore alias name> -keyalg DSA -keystore <your keystore name>
#To create your own self signed certificate and binding with the keystore file
keytool -certreq -keyalg DSA -alias <your keystore alias name> -file <your certificate request.csr> -keystore <your keystore name>
#To make a signed jar
jarsigner -keystore <your keystore name> <your jar name> <your keystore alias name>
#To verify the signed jar
jarsigner -verify -verbose -keystore <your keystore name> -certs <your jar name>
#To Generate keystore file.
keytool -genkey -alias <your keystore alias name> -keyalg DSA -keystore <your keystore name>
#To create your own self signed certificate and binding with the keystore file
keytool -certreq -keyalg DSA -alias <your keystore alias name> -file <your certificate request.csr> -keystore <your keystore name>
#To make a signed jar
jarsigner -keystore <your keystore name> <your jar name> <your keystore alias name>
#To verify the signed jar
jarsigner -verify -verbose -keystore <your keystore name> -certs <your jar name>
No comments:
Post a Comment