You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Bela Roboz (JIRA)" <ji...@apache.org> on 2016/10/20 17:57:58 UTC
[jira] [Updated] (HTTPCLIENT-1785) If you use custom trust manager/
protocol the "connection.timeout" param will throw SSLHandshakeException
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bela Roboz updated HTTPCLIENT-1785:
-----------------------------------
Description:
Example:
X509TrustManager manager=UtilsSSL.getX509TrustManager("d:/tmpkulcstarolo.jks","???");
URL cel2=new URL("https://www.your_domain.com:443/tmp/alma/teszt.php");
Protocol myhttps = new Protocol("https", new EgyediSSLProtocolSocketFactory(manager), 443);
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setHost("www.conforg.hu", 443, myhttps);
// The next row cause exception, without this everything ok
httpclient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
GetMethod httpget = new GetMethod("/tmp/alma/teszt.php?sajt=hihike");
try {
httpclient.executeMethod(httpget);
System.out.println(httpget.getResponseBodyAsString());
} finally {
httpget.releaseConnection();
}
was:
Example:
X509TrustManager manager=UtilsSSL.getX509TrustManager("d:/tmpkulcstarolo.jks","???");
URL cel2=new URL("https://www.your_domain.com:443/tmp/alma/teszt.php");
Protocol myhttps = new Protocol("https", new EgyediSSLProtocolSocketFactory(manager), 443);
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setHost("www.conforg.hu", 443, myhttps);
// The next row cause exception, without this everything ok httpclient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
GetMethod httpget = new GetMethod("/tmp/alma/teszt.php?sajt=hihike");
try {
httpclient.executeMethod(httpget);
System.out.println(httpget.getResponseBodyAsString());
} finally {
httpget.releaseConnection();
}
> If you use custom trust manager/ protocol the "connection.timeout" param will throw SSLHandshakeException
> ---------------------------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1785
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1785
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (classic)
> Affects Versions: 3.1 (end of life)
> Reporter: Bela Roboz
>
> Example:
> X509TrustManager manager=UtilsSSL.getX509TrustManager("d:/tmpkulcstarolo.jks","???");
> URL cel2=new URL("https://www.your_domain.com:443/tmp/alma/teszt.php");
>
>
> Protocol myhttps = new Protocol("https", new EgyediSSLProtocolSocketFactory(manager), 443);
>
> HttpClient httpclient = new HttpClient();
> httpclient.getHostConfiguration().setHost("www.conforg.hu", 443, myhttps);
> // The next row cause exception, without this everything ok
> httpclient.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
> GetMethod httpget = new GetMethod("/tmp/alma/teszt.php?sajt=hihike");
> try {
> httpclient.executeMethod(httpget);
> System.out.println(httpget.getResponseBodyAsString());
> } finally {
> httpget.releaseConnection();
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org