王者视野

我不是码农,我只是想建造一大厦

Could not generate DH keypair(httpclient)
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);

...

阅读更多
个人分类: Java技术
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Could not generate DH keypair(httpclient)

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭