HttpClient
笑是神的伪装
我欲乘风破浪,踏遍黄沙海洋
与其误会一场,也要不负勇往
我愿你是个谎,从未出现南墙
展开
-
HttpClient 加载本地证书发送请求
最近在做微信退款,需要加载本地证书,先上代码 public static String postXmlWithKey(String url, String xml, String cerPath, String mchId) throws Exception { InputStream in = new FileInputStream(new File(cerPath)); ...原创 2018-11-13 14:21:48 · 4822 阅读 · 0 评论 -
JAVA中的RSA密钥生成及签名验签
RSA密钥生成生成一个别名为test的私钥和证书,需要按提示输入私钥密码和证书信息,keytool -genkey -keystore test.p12 -alias test -keyalg RSA -keysize 1024 -storetype pkcs12导出公钥证书keytool -export -alias test -keystore test.p12 -file t...原创 2018-11-13 14:33:57 · 5236 阅读 · 0 评论