How to sign a Applet JAR

Document ID : KB000129838
Last Modified Date : 21/03/2019
Show Technical Document Details
Introduction:
The CA Strong Authentication Client Applet JARs can be customized and then signed by a customer using the procedure below. This ensures that the authentic Applet JAR file signed by a valid Certificate Authority is downloaded and run in the given environment.
Background:
None.
Environment:
CA Strong Authentication Client code (Such as ArcotAFM client code)
Instructions:
To Sign Applet JAR Please follow below steps: 

Step 1: To Obtain Alias Name from Certificate 

1. Open Command Prompt and navigate to %JAVA_HOME%/bin 
2. Execute command as follows 

Command: keytool -list -storetype pkcs12 -keystore <Certificate> -storepass <password> 

For example: 

keytool -list -storetype pkcs12 -keystore CompanyCert.pfx -storepass myStorePass 

(<Certificate> -> Provide complete path along with certificate name and extension) 
(<Password> -> Provide Correct Store Password) 


Step 2: Sign Applet JAR 

1. Execute Command as follows 

Command: jarsigner -storetype pkcs12 -keystore <certificate> -storepass <Password> <appletjar> <aliasname> -tsahttp://timestamp.comodoca.com/rfc3161 

For Example: 

jarsigner -storetype pkcs12 -keystore CompanyCert.pfx -storepass myStorePass Applet.jar myAlias -tsa http://timestamp.comodoca.com/rfc3161 

(<Certificate> -> Provide Certificate complete path) 
(<Password> -> Provide Correct Store Password) 
(<appletjar> -> Provide ArcotApplet JAR Complete path) (<aliasname> -> Provide correct Alias Name which we got in Step 1) 
Additional Information:
None