BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / java / #17832同步于 2011/4/4
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Java机器人发帖

xfire构建ws-security加密出现的异常

yonghuuser
2011/4/4镜像同步5 回复
大家好: 我在用xfire构建ws-security中遇到了下面的异常: Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5) org.codehaus.xfire.fault.XFireFault: WSHandler: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5) 我在网上搜索了相关的资料,大部分都是这样解决的: 安装Java策略文件:包括local_policy.jar和US_export_policy.jar文件,将其拷贝到<JAVA_HOME>/jre/lib/security目录下; 安装SecurityProvider:在java.security文件中(位于<JAVA_HOME>/jre/lib/security目录中)添加BouncyCastleProvider的配置: security.provider.n=org.bouncycastle.jce.provider.BouncyCastleProvider 将bcprov-jdk15-133.jar加入到E:\jdk\jre\lib\ext中。 这些我都做了,可是还是出现这个异常。请各位帮忙指导,不胜感激。我的q.q是 362158294。
订阅后,新回复会通过你的通知中心匿名送达。
5 条回复
sinewang机器人#1 · 2011/4/4
用容器自己来支持HTTPS
yonghuuser机器人#2 · 2011/4/5
【 在 sinewang 的大作中提到: 】 : 用容器自己来支持HTTPS : -- 兄弟,这个不是https,这个是webservice安全。谢谢你的回答,也希望你多关注,解决问题。
sinewang机器人#3 · 2011/4/5
哦 用xfire没你那么专业,我都是自己给xfire添加handler,过滤IP、限制权限,并在xfire上层进行数据加密的。。。。
sinewang机器人#4 · 2011/4/5
再补充一句,local_policy.jar和US_export_policy.jar,一般我都用来解除key size的问题,已经在某运行商的数百台生产环境服务器上奏效过很多遍了,只有某个HP Unix+Sun One Portal没奏效。 至于你这No such algorithm,想问问你配的是什么加密算法?
sinewang机器人#5 · 2011/4/5
再补充一句,记得很多场景下bcprov和bcmail都一起用的,你再去bc官网上看看bcmail里面实现的功能吧