急,在线等.... 建行支储接口:数字签名问题,
1.利用建行提供的支付接口实现在线支付
2.支付成功
3.在测试反馈时发现问题:
在调用
RSASig rsa=new RSASig();
rsa.verifySigature(strSign,verify);
此方法时,报错:
错误信息如下:
java.lang.ExceptionInInitializerError au.net.aba.crypto.provider.MD5withRSA. <init> (MD5withRSA.java:67)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
java.lang.Class.newInstance0(Class.java:308)
java.lang.Class.newInstance(Class.java:261)
java.security.Security.doGetImpl(Security.java:1137)
java.security.Security.doGetImpl(Security.java:1084)
java.security.Security.getImpl(Security.java:1045)
java.security.Signature.getInstance(Signature.java:218)
CCB.PUB.RSASig.verifySigature(RSASig.java:94)
org.apache.jsp.ipproot.commerce.order.book.verify_jsp._jspService(verify_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
环境说明:利用jdk1.2.2编译RSASig.java,编译成功后打成CCB.jar,放入工程中
注:整体工程环境jdk1.4.1
测试方法:
http://localhost:8088/strongjgs/ipproot/commerce/order/book/verify.jsp?POSID=001&BRANCHID=360000000&ORDERID=20070719000009&PAYMENT=0.01&CURCODE=01&REMARK1=&REMARK2=&SUCCESS=Y&SIGN=3322a87e0797a56552404b64e9603d1e9f7264e2b26f95e466071c54ca7726a609127e187deff41ce1aeca8033e7f9562e31c5a7c4eb8604c23a287cdfc4ea3f7f8c377e2dd50ce0bc10ff8a44be5f83d36591ad3e9ec8632994788d33e934aa1a43db47f418800a66723f496a3064636495bf3b65e27a60f514f2de6089dab
verify.jsp为模拟接收页面,后面参数都是正确的。
望遇到过同样问题的朋友,帮忙解答,解燃眉之急,谢谢!
------解决方案--------------------CCB.PUB.RSASig.verifySigature 的代码呢