• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

java applet 签名和认证 ---大致过程和我的问题

发布: 2007-7-04 13:34 | 作者: admin | 来源:  网友评论 | 查看: 15次 | 进入软件测试论坛讨论

领测软件测试网 在java中的 applet 的认证和签名 确实麻烦。。
java.sun.com  的tutorial 上有用apple 在本地写一个文件的例子:
http://java.sun.com/docs/books/tutorial/security1.2/tour1/
但只能用AppletViewer 可以看:
appletviewer http://java.sun.com/docs/books/tutorial/security1.2/tour1/example-1dot2/WriteFile.html


  又在[阿费]的帮助下找到可以用ie or Nescape 查看你的applet 的例子:
  http://www.intelligentsearch.org/namesearch_from_java.htm#_Toc490550108

大致过程如下::

服务器端:

1。 Compile the java classes --写applet并编译。
    javac *.class
2.   Place the class files in a JAR file    --打包:
    jar cvf  yourjarname.jar  yourdir/*.class
    1). Create a Keystore and Keys for signing the JAR file
        keytool –genkey –keystore ist.keystore –alias IST
    2). Sign the JAR file                  --对jar 签名
        jarsigner –keystore ist.keystore ist.jar IST
    3). Create the Public Key Certificate  --创建公钥
        keytool –export –keystore ist.keystore –alias IST –file IstPubKey.cert


客户端:

   1。Import the Public Key Certificate --导入公钥
      keytool –import –alias IST –file IstPubKey.cert –keystore client.store


   2。Modifing a policy file  --修改 policy文件
   3。 Run the applet   --运行applet
   !!! 这还只能用Applet viewer 查看你的applet
   
用ie访问:
First, the <APPLET> tag will not be able to activate the Java Plug-in for use in IE. This tag should be substituted by the <OBJECT> tag
---由于IE 的java Plug-in 不能被<APPLET>标签激活。你还要将他换成<OBJECT>标签。

these changes to the HTML file can also be done with the help of HTMLConverter. You can go to download this software from http://java.sun.com/products/plugin/index.html.
---- 这样你还要去下一个HTMLConverter
---- 将经过转换的html 和 class 文件copy 到你的服务器上。
-- 好了。终于可以享受一下成果了。
     用ie 访问:http://yourserver: youreport/WriteFile.html
     还不行??
     --IE 还要下载Plug-in 才能执行,
     在1小时加26分46秒后:
     kao ,终于在本地写了一个文件。

////////////////////////////////////////////
感谢:
  【wmlf】 和 【阿费】提供的资料和帮助

////////////////////////////////////////////
我的问题:

1。如果我写的applet,放在网上,
他还必需下载或自己修改java.security and java.policy
然后放到 :
<java home>/lib/security 下(如果安装了jdk)
<use dir>/.java.policy (没有 jdk)

那不是太麻烦了????
谁还会用你的applet ????
2。是不是我对applet 认证理解不对,,本来applet的认证没这样繁??

   

   


  


延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网