Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-14 Thread salemi
Thank you for your respond.

Below is how it can be done.

public MyHttpClientConfigurer implements HttpClientConfigurer{

void configureHttpClient(org.apache.http.impl.client.HttpClientBuilder
clientBuilder){
  SSLContext sslContext = SSLUtilityFactory.createSSLContext(); 
  clientBuilder.setSSLContext(sslContext);
}




 




-
Alireza Salemi
--
View this message in context: 
http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761706.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-09 Thread Willem Jiang
You can setup the sslContext by implementing a HttpClientConfigurer[1].

[1]https://camel.apache.org/http4#HTTP4-ConfiguringApacheHTTPClientDirectly

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 10, 2015 at 2:53:00 PM, salemi (sal...@avaya.com) wrote:
> Hi,
> Thanks for your respond. My problem is that I am running in a container and
> there is api that return the sslcontext to me and I have to use the provided
> sslcontext. See the code below.
>  
> SSLContext sslContext = SSLUtilityFactory.createSSLContext();
>  
> How can I tell https4 to use the sslcontext provided?
>  
> Thanks,
> Ali
>  
>  
>  
>  
> -
> Alireza Salemi
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761538.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-09 Thread salemi
Hi, 
Thanks for your respond. My problem is that I am running in a container and
there is api that return the sslcontext to me and I have to use the provided
sslcontext. See the code below.

SSLContext sslContext = SSLUtilityFactory.createSSLContext();

How can I tell https4 to use the sslcontext provided?

Thanks,
Ali




-
Alireza Salemi
--
View this message in context: 
http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761538.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-09 Thread Willem Jiang
Hi,

You may need to enable the SSL Socket debug[1] to see why the handshake failed.

[1]http://www.herongyang.com/JDK/SSL-Socket-Communication-Debug-javax-net-debug.html
--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 9, 2015 at 1:42:43 AM, salemi (sal...@avaya.com) wrote:
> Hi All,
>  
> I am getting the following exception when I use https4 as followed below:
>  
> > uri="{{https.url}}?authUsername=admin&authPassword=Admin01$&authMethod=Basic&x509HostnameVerifier=allowAllHostnameVerifier"/>
> >   
>  
>  
> javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure  
> at com.ibm.jsse2.j.a(j.java:24)
> at com.ibm.jsse2.j.a(j.java:19)
> at com.ibm.jsse2.qc.b(qc.java:660)
> at com.ibm.jsse2.qc.a(qc.java:613)
> at com.ibm.jsse2.qc.h(qc.java:266)
> at com.ibm.jsse2.qc.a(qc.java:214)
> at com.ibm.jsse2.h.write(h.java:10)
>  
> What am I doing wrong here?
>  
> Thanks,
> Ali
>  
>  
>  
>  
> -
> Alireza Salemi
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

2015-01-08 Thread salemi
Hi All,

I am getting the following exception when I use https4 as followed below:




javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.j.a(j.java:24)
at com.ibm.jsse2.j.a(j.java:19)
at com.ibm.jsse2.qc.b(qc.java:660)
at com.ibm.jsse2.qc.a(qc.java:613)
at com.ibm.jsse2.qc.h(qc.java:266)
at com.ibm.jsse2.qc.a(qc.java:214)
at com.ibm.jsse2.h.write(h.java:10)

What am I doing wrong here?

Thanks,
Ali




-
Alireza Salemi
--
View this message in context: 
http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469.html
Sent from the Camel - Users mailing list archive at Nabble.com.