【黑基原创】How to sign the java applet in firefox
作者:意识[HackBase]
How to sign the java applet using the keytool , jar , and jarsigner with in firefox
1.We have to create a key pairs in the default keystore
In command line type
keytool –genkey –alias keyname
(keyname is your key pairs name, which you give)
And follow the step to greate the key
You will ask to give a password for the keystore
The key pairs will store in a .keystore file in the user directory e.g. C:\Documents and Settings\S3073989
2. We export the key to get a self signed certificate
In the command line type
keytool –export –alias keyname –file anyname.crt
(anyname is the certificate name you given)
Now you get a self signed certificate
3.jar the class file
In the file class files directory type
jar –cvf jarname.jar *.class
(jarname is the name for the .jar file)
4. sign the jar with your certificate
jarsigner jarname.jar keyname
You need to type in the password
In the applet tab include that archive="jarname.jar"
e.g. <applet code=example.class width="200" archive="ex.jar" height="200" >
</applet>
Each time you compiled the class
You have to jar the class file again and sign the jar using the jarsigner
You can copy that .keystore file and export that to aa self signed certificate in another machine.