首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

CSDN高手有木有?如何样使用HttpsURLConnection 进行远程请求

2012-01-20 
CSDN高手有木有?怎么样使用HttpsURLConnection 进行远程请求?我用 X509TrustManager 接口实现,但问题是怎

CSDN高手有木有?怎么样使用HttpsURLConnection 进行远程请求?
我用 X509TrustManager 接口实现,但问题是怎么样加载我的证书?

  KeyStore ks = KeyStore.getInstance("JKS"); 
  ks.load(new FileInputStream("trustedCerts"),"passphrase".toCharArray());  

  TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509", "SunJSSE"); 
  tmf.init(ks); 

找不到 trustedCerts 路径,这个应该是什么路径,还有 passphrase 这个是什么密码?



[解决办法]
看这个帖子。
http://topic.csdn.net/u/20110518/00/24fe6dfe-e793-499c-b4ed-ad820b51d887.html

热点排行