[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to