问题描述
我正在通过webscarab(webscarab-selfcontained-20070504-1631.jar)作为java6中的代理访问第三方网站,对于超过2万个网站都可以正常工作.
I am hitting the third party websites via webscarab (webscarab-selfcontained-20070504-1631.jar) as proxy in java6, which is working fine for more than 20K websites.
但是目前,我仅点击第三方网址时遇到错误
But currently i am getting below error while hitting only third party url,
java.lang.RuntimeException: Could not generate DH keypair
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1612)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1595)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1521)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:64)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at org.owasp.webscarab.model.Request.writeDirect(Request.java:234)
at org.owasp.webscarab.model.Request.writeDirect(Request.java:215)
at org.owasp.webscarab.httpclient.URLFetcher.fetchResponse(URLFetcher.java:247)
at org.owasp.webscarab.plugin.proxy.CookieTracker$Plugin.fetchResponse(CookieTracker.java:130)
at org.owasp.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(BrowserCache.java:101)
at org.owasp.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(RevealHidden.java:100)
at org.owasp.webscarab.plugin.proxy.BeanShell$Plugin.fetchResponse(BeanShell.java:229)
at org.owasp.webscarab.plugin.proxy.ManualEdit$Plugin.fetchResponse(ManualEdit.java:243)
at org.owasp.webscarab.plugin.proxy.ConnectionHandler.run(ConnectionHandler.java:233)
at java.lang.Thread.run(Thread.java:662)
Prime size must be multiple of 64, and can only range from 512 to 1024
我已经搜索并尝试通过更新无限强度的JCE远文件而仍然遇到相同的错误.
I have searched for and also tried by updating the unlimited strength JCE far files still getting the same error.
我还发现我要访问的URL使用TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256密码进行加密.
Also i found that the url which i am hitting uses the TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cipher for encryption.
当我尝试在java7中命中相同的URL时,我得到了正确的响应,并发现该URL使用java7默认启用密码中的TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA密码.
When i tried to hit the same url in java7, i am getting the proper response and found that it uses the TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cipher from default enabled cipher of java7 for this url.
现在我需要的是如何在java6中使用TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA密码,我提到了java6的javadoc,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA密码在java6中不受支持.还有什么其他方法可以在java6中支持它,因为我不想冒将Java版本升级到7的风险来解决此问题的可能性.
Now what i need is how to use the TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cipher in java6,, I referred the javadoc's for java6, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cipher encryption is not supported in java6. Is there any other way to support it in java6,since i don want to take a risk of upgrading the java version to 7 to resolve this issue.....
推荐答案
通过添加第三方API来解决此问题的唯一选项-弹力城堡.请参考下面的链接和愉快的编码.
The only option to resolve this issue by adding third-party API - Bouncy castle. Please refer to the below link and happy coding.
https://docs.oracle.com/cd/E19830-01/819-4712/ablsc/index.html
这篇关于如何在Java6中支持TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!