Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java Security  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 用jsp取的符合x.509格式的证书!
robin

超级水鬼



发贴: 128
积分: 19
于 2003-07-01 14:34 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> get cert info </TITLE>
</HEAD>

<BODY>
<%@ page import="java.security.cert.*"%>
<%
  //获得certificate chain
  X509Certificate[] ca=(X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");
if(ca==null)
{
  out.println("No cert info!");
  return;
}
  String  serial=ca[0].getSerialNumber().toString();
  String DN=ca[0].getSubjectDN().toString();  
%>
<%--
  //other mothod:
  X509Certificate x509ca=(X509Certificate)request.getAttribute("javax.net.ssl.peer_certificates");
  String serial1=x509ca.getSerialNumber().toString();  
--%>
<H3>cert serial=<%=serial%></H3>
<h4>cert DN=<%=DN%></H4>
<H3>cert serial1=<%--iii=serial1--%></H3>
</BODY>
</HTML>

不足之处请更正!



作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
menzy



版主


发贴: 754
积分: 113
于 2003-07-02 07:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不错,鼓励一下
其实可以参考以前java 安全包中的例子,例子是.java的



作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
robin

超级水鬼



发贴: 128
积分: 19
于 2003-07-02 09:34 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
又没有用enturst的toolkit进行开发的可以交流一下!


作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
menzy



版主


发贴: 754
积分: 113
于 2003-07-03 07:31 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我们马上要用,不过还没有培训,Robin是银行部门的吧?该死的CFCA


作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
robin

超级水鬼



发贴: 128
积分: 19
于 2003-07-03 09:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
呵呵,cfca的确很烂!有时间多多沟通!

我想你们的培训也不会好到那里去,我手上只有一个开发包而已,并且javadoc还不全!



作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
menzy



版主


发贴: 754
积分: 113
于 2003-07-03 17:52 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
嗬嗬,没事聊聊天
MSN: mzy75@hotmail.com



作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
FinalFantasy

痛并快乐者



发贴: 83
积分: 10
于 2003-07-07 02:24 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
封装在一个bean中,不会更好吗?

谢谢分享。:)



作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
richardluopeng





发贴: 122
积分: 32
于 2003-08-04 13:17 user profilesend a private message to usersend email to richardluopengsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不错,鼓励!


作者 Re:用jsp取的符合x.509格式的证书! [Re:robin]
mole123456



发贴: 0
积分: 0
于 2003-08-15 15:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
支持



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2018 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923