当前位置: 技术问答>java相关
重奖:我的数字签名程序无法在IE中显示出来,而且控制台无报错信息和测试信息
来源: 互联网 发布时间:2015-08-16
本文导语: 我做了一个数字签名的APPLET 在本地保存和提取文件,所有过程OK ,但无法在IE 中显示出来,控制台即无错误信息也无system.out.println()信息。我只被了JDK 无JRE,IE5.5,JDK1.3,我也在IE OPTIONS 中修改了安全级。也不行。...
我做了一个数字签名的APPLET 在本地保存和提取文件,所有过程OK ,但无法在IE 中显示出来,控制台即无错误信息也无system.out.println()信息。我只被了JDK 无JRE,IE5.5,JDK1.3,我也在IE OPTIONS 中修改了安全级。也不行。请各位帮忙!在线等待!!急!
|
一:
c:zzzSignedAppletDemo>jar cvf myapplet.jar *.*
新增清单(mainfest)
新增:classes/(读入=0)(写出=0)(存入0%)
新增:classes/SignedAppletDemo.htm(读入=180)(写出=127)(压缩29%)
新增:classes/SignedAppletDemo.class(读入=1692)(写出=982)(压缩41%)
新增:SignedAppletDemo.class(读入=1692)(写出=982)(压缩41%)
新增:SignedAppletDemo.java(读入=1237)(写入=578)(压缩53%)
新增:SignedAppletDemo.jcp(读入=678)(写入=328)(压缩51%)
新增:SignedAppletDemo.jcw(读入=288)(写入=179)(压缩37%)
执行完此步后,在signedappletdemo文件夹下产生myapplet.jar文件,主要是.class文件
二:
c:zzzSignedAppletDemo>keytool -genkey -keystore mystore.store -alias my.store
Enter keystore password:791229
What is your first and last name?
[Unknown]:kaven
What is the name of your organizational unit?
[Unknown]:ibm
What is the nameof your organization?
[Unknown]:computer
What is the name of your City or Locality?
[Unknown]:shanghai
What is the name of your State or Province?
[Unknown]:shanghai
What is the two-letter country code for this unit?
[Unknown]:cn
Is correct?
[no]:y
Enter key password for
(RETURN if same as keystore password):
执行完此步后,目录下出现mystore.store文件,为密钥库,此密钥库别名为my.store。
三:
c:zzzSignedAppletDemo>keytool -export -keystore mystore.store -alias my.store -file mycert.cer
Enter keystore password:791229
Certificate stored in file
执行完此步后,目录下出现mycert.cer文件,就是一张证书
四:
c:zzzSignedAppletDemo>jarsigner -keystore mystore.store myapplet.jar my.store
Enter Passphrase for keystore:791229
此步骤是对密钥库签名
然后把myapplet.jar,mystore.store,mycert.cer复制到用户目录下。
以上是服务器所做步骤
以下是客户机所做步骤
五:
c:zzzSignedAppletDemo>keytool -import -keystore client.store -alias my.store -file mycert.cer
Enter keystore password:791229
Serial number:Mon May 27 09:34:39 CST 2002 until:Sun Aug 25 09:34:39 CST 2002
Certificate fingerprints:
MD5: 0C:4C:FB:2E:2A:21:60:F5:45:35:A1:40:B6:8D:4E:93
SHA1: 33:9E:67:C7:8F:BE:8B:DE:31:A4:46:80:7F:1E:27:50:90:7A:FD:6B
Trust this certificate? [no]:y
Certificate was added to keystore
用户同意接收该证书,信任该证书颁发者的所有作品,也就是把收到的证书导入本地密钥库。
六:
修改用户的policy文件,文件名为.java.policy放在用户主目录下。
七:
对接收的文件进行验证
C:zzzSignedAppletDemo>jarsigner -verify -verbose -keystore mystore.store myapplet.jar
530 Mon May 27 09:41:50 CST 2002 META-INF/MANIFEST.MF
583 Mon May 27 09:41:56 CST 2002 META-INF/MY_STORE.SF
1016 Mon May 27 09:41:56 CST 2002 META-INF/MY_STORE.DSA
0 Mon May 27 09:30:46 CST 2002 META-INF/
0 Sun May 26 23:07:04 CST 2002 classes/
smk 180 Sun May 26 23:07:04 CST 2002 classes/SignedAppletDemo.htm
smk 1692 Sun May 26 23:07:30 CST 2002 classes/SignedAppletDemo.class
smk 1692 Sun May 26 23:07:30 CST 2002 SignedAppletDemo.class
smk 1237 Sun May 26 23:07:20 CST 2002 SignedAppletDemo.java
smk 678 Sun May 26 23:07:04 CST 2002 SignedAppletDemo.jcp
smk 288 Sun May 26 23:07:04 CST 2002 SignedAppletDemo.jcw
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 scope
jar verified.
八:
打开接收文件
C:zzzSignedAppletDemo>jar -vxf myapplet.jar
展开:META-INF/MANIFEST.MF
展开:META-INF/MY_STORE.SF
展开:META-INF/MY_STORE.DSA
创建:META-INF/
创建:classes/
展开:classes/SignedAppletDemo.htm
展开:classes/SignedAppletDemo.class
展开:SignedAppletDemo.class
展开:SignedAppletDemo.java
展开:SignedAppletDemo.jcp
展开:SignedAppletDemo.jcw
那么用户就得到所有被签名的文件。
九:
在用户端把生成的证书导入,即安装证书。
c:zzzSignedAppletDemo>jar cvf myapplet.jar *.*
新增清单(mainfest)
新增:classes/(读入=0)(写出=0)(存入0%)
新增:classes/SignedAppletDemo.htm(读入=180)(写出=127)(压缩29%)
新增:classes/SignedAppletDemo.class(读入=1692)(写出=982)(压缩41%)
新增:SignedAppletDemo.class(读入=1692)(写出=982)(压缩41%)
新增:SignedAppletDemo.java(读入=1237)(写入=578)(压缩53%)
新增:SignedAppletDemo.jcp(读入=678)(写入=328)(压缩51%)
新增:SignedAppletDemo.jcw(读入=288)(写入=179)(压缩37%)
执行完此步后,在signedappletdemo文件夹下产生myapplet.jar文件,主要是.class文件
二:
c:zzzSignedAppletDemo>keytool -genkey -keystore mystore.store -alias my.store
Enter keystore password:791229
What is your first and last name?
[Unknown]:kaven
What is the name of your organizational unit?
[Unknown]:ibm
What is the nameof your organization?
[Unknown]:computer
What is the name of your City or Locality?
[Unknown]:shanghai
What is the name of your State or Province?
[Unknown]:shanghai
What is the two-letter country code for this unit?
[Unknown]:cn
Is correct?
[no]:y
Enter key password for
(RETURN if same as keystore password):
执行完此步后,目录下出现mystore.store文件,为密钥库,此密钥库别名为my.store。
三:
c:zzzSignedAppletDemo>keytool -export -keystore mystore.store -alias my.store -file mycert.cer
Enter keystore password:791229
Certificate stored in file
执行完此步后,目录下出现mycert.cer文件,就是一张证书
四:
c:zzzSignedAppletDemo>jarsigner -keystore mystore.store myapplet.jar my.store
Enter Passphrase for keystore:791229
此步骤是对密钥库签名
然后把myapplet.jar,mystore.store,mycert.cer复制到用户目录下。
以上是服务器所做步骤
以下是客户机所做步骤
五:
c:zzzSignedAppletDemo>keytool -import -keystore client.store -alias my.store -file mycert.cer
Enter keystore password:791229
Serial number:Mon May 27 09:34:39 CST 2002 until:Sun Aug 25 09:34:39 CST 2002
Certificate fingerprints:
MD5: 0C:4C:FB:2E:2A:21:60:F5:45:35:A1:40:B6:8D:4E:93
SHA1: 33:9E:67:C7:8F:BE:8B:DE:31:A4:46:80:7F:1E:27:50:90:7A:FD:6B
Trust this certificate? [no]:y
Certificate was added to keystore
用户同意接收该证书,信任该证书颁发者的所有作品,也就是把收到的证书导入本地密钥库。
六:
修改用户的policy文件,文件名为.java.policy放在用户主目录下。
七:
对接收的文件进行验证
C:zzzSignedAppletDemo>jarsigner -verify -verbose -keystore mystore.store myapplet.jar
530 Mon May 27 09:41:50 CST 2002 META-INF/MANIFEST.MF
583 Mon May 27 09:41:56 CST 2002 META-INF/MY_STORE.SF
1016 Mon May 27 09:41:56 CST 2002 META-INF/MY_STORE.DSA
0 Mon May 27 09:30:46 CST 2002 META-INF/
0 Sun May 26 23:07:04 CST 2002 classes/
smk 180 Sun May 26 23:07:04 CST 2002 classes/SignedAppletDemo.htm
smk 1692 Sun May 26 23:07:30 CST 2002 classes/SignedAppletDemo.class
smk 1692 Sun May 26 23:07:30 CST 2002 SignedAppletDemo.class
smk 1237 Sun May 26 23:07:20 CST 2002 SignedAppletDemo.java
smk 678 Sun May 26 23:07:04 CST 2002 SignedAppletDemo.jcp
smk 288 Sun May 26 23:07:04 CST 2002 SignedAppletDemo.jcw
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 scope
jar verified.
八:
打开接收文件
C:zzzSignedAppletDemo>jar -vxf myapplet.jar
展开:META-INF/MANIFEST.MF
展开:META-INF/MY_STORE.SF
展开:META-INF/MY_STORE.DSA
创建:META-INF/
创建:classes/
展开:classes/SignedAppletDemo.htm
展开:classes/SignedAppletDemo.class
展开:SignedAppletDemo.class
展开:SignedAppletDemo.java
展开:SignedAppletDemo.jcp
展开:SignedAppletDemo.jcw
那么用户就得到所有被签名的文件。
九:
在用户端把生成的证书导入,即安装证书。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。