applet签名实录
首先,确保keystore中存在一个私钥证书E:\security\testapplet>jar cfv Testapplet.jar Testapplet.class
标明清单(manifest)
增加:Testapplet.class(读入= 1175) (写出= 708)(压缩了 39%)E:\security\testapplet>jar tfv Testapplet.jar
0 Thu Jul 31 14:08:24 CST 2003 META-INF/
71 Thu Jul 31 14:08:24 CST 2003 META-INF/MANIFEST.MF
1175 Thu Jul 31 14:07:26 CST 2003 Testapplet.classE:\security\testapplet>jarsigner -storetype PKCS12 Testapplet.jar Eric
Enter Passphrase for keystore: 123456E:\security\testapplet>jarsigner -verify -verbose -certs Testapplet.jar 140 Thu Jul 31 14:09:26 CST 2003 META-INF/MANIFEST.MF
193 Thu Jul 31 14:09:28 CST 2003 META-INF/ERIC.SF
2402 Thu Jul 31 14:09:28 CST 2003 META-INF/ERIC.RSA
0 Thu Jul 31 14:08:24 CST 2003 META-INF/
sm 1175 Thu Jul 31 14:07:26 CST 2003 Testapplet.class X.509, [email protected], CN=Eric H. Echidna,L=Melbourne, O=The Legion of the Bouncy Castle, C=AU
X.509, [email protected], OU=Bouncy Intermediate Certificate, O=The Legion of the Bouncy Castle, C=AU
X.509, OU=Bouncy Primary Certificate, O=The Legion of the Bouncy Castle, C=AU
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scopejar verified.E:\security\testapplet>htmlconverter Testapplet.htm
备份副本已经存在...E:\security\testapplet\Testapplet.htm
Java Plug-in 1.4.2 Developer Guide
首先,确保keystore中存在一个私钥证书E:\security\testapplet>jar cfv Testapplet.jar Testapplet.class
标明清单(manifest)
增加:Testapplet.class(读入= 1175) (写出= 708)(压缩了 39%)E:\security\testapplet>jar tfv Testapplet.jar
0 Thu Jul 31 14:08:24 CST 2003 META-INF/
71 Thu Jul 31 14:08:24 CST 2003 META-INF/MANIFEST.MF
1175 Thu Jul 31 14:07:26 CST 2003 Testapplet.classE:\security\testapplet>jarsigner -storetype PKCS12 Testapplet.jar Eric
Enter Passphrase for keystore: 123456E:\security\testapplet>jarsigner -verify -verbose -certs Testapplet.jar 140 Thu Jul 31 14:09:26 CST 2003 META-INF/MANIFEST.MF
193 Thu Jul 31 14:09:28 CST 2003 META-INF/ERIC.SF
2402 Thu Jul 31 14:09:28 CST 2003 META-INF/ERIC.RSA
0 Thu Jul 31 14:08:24 CST 2003 META-INF/
sm 1175 Thu Jul 31 14:07:26 CST 2003 Testapplet.class X.509, [email protected], CN=Eric H. Echidna,L=Melbourne, O=The Legion of the Bouncy Castle, C=AU
X.509, [email protected], OU=Bouncy Intermediate Certificate, O=The Legion of the Bouncy Castle, C=AU
X.509, OU=Bouncy Primary Certificate, O=The Legion of the Bouncy Castle, C=AU
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scopejar verified.E:\security\testapplet>htmlconverter Testapplet.htm
备份副本已经存在...E:\security\testapplet\Testapplet.htm
Java Plug-in 1.4.2 Developer Guide
解决方案 »
- 请教使用双缓冲区播放GIF动画的问题
- 有关setSize的疑问
- 请问一个java调用vc编写的动态库的问题,除JNI外是不是还有其它的办法?
- 学JSP J2EE对数据结构 算法要求高吗
- 在不同的DBconnection中,使用preparedstatement会比statement有性能的提高吗?
- 学I/O该看哪本书?
- 图像处理 java 急 在线等!
- 请看这断代码运行后不能响应键盘事件,为什么?
- 请问ReferenceQueue是什么?如何使用?
- 请问 ucs2编码如何转化成gb格式的?
- **为什么我的Panel用showConfirmDialog显示后就不能selectAll()**
- 请问在Java中如何实现javascript中eval()函数的功能
import java.awt.*;
import java.applet.*;
import java.io.*;public class Testapplet extends Applet {
public void init() {
}
public String test()
{
String fileName=System.getProperty("user.home")+System.getProperty("file.separator")+"demo.txt";
String s=null;
try
{
FileWriter fw=new FileWriter(fileName);
fw.write("This is some test text.");
fw.close();
s="success!";
}catch(Exception exc)
{
System.out.println("error!");
s="faild!";
}
return s;
}
public void paint(Graphics g) {
g.drawString("Welcome to Java Applet!!", 50, 60 );
g.drawString(test(),100,100);
}
}网页文件:
<HTML><HEAD></HEAD>
<BODY><CENTER>
<APPLET code = "Testapplet.class" archive = "Testapplet.jar" width = "500" height = "300">
</APPLET>
</CENTER></BODY>
</HTML>
以上使用PLUG-IN模式IE下通过,可以参考SUN的《Java Plug-in 1.4.2 Developer Guide》