关闭

Could not generate DH keypair(httpclient)

581人阅读 评论(0) 收藏 举报
分类:
Source from here
Add this library to classpath(following is maven project)

<dependency>

<groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk16</artifactId> <version>1.46</version> </dependency>

Add following line before access https resource:

Security.addProvider(new BouncyCastleProvider());

...

HttpClient client = ...

HttpGet get = new HttpGet("https://domain")

client.execute(get,repsonse);

...

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:13533次
    • 积分:196
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:31篇
    • 译文:1篇
    • 评论:0条