Context of my problem :
I'm working with apache camel in servicemix, and i'm developing a bundle. In this bundle, the following endpoint is defined in a route :
<to uri="https4://URL_I_WANT_TO_CONNECT_TO?proxyAuthHost=MY_PROXY_HOST_NAME&proxyAuthPort=MY_PROXY_PORT&sslContextParameters=mySslContextParameters" />
As you can see in the value of the "uri" attribute, i use a HTTP proxy.
My goal is to do a HTTP POST request to the "URL_I_WANT_TO_CONNECT_TO". I've been given 3 certificates (3 ".cer" files, and according to the names of these files i guess there is one for the server, one for the CA and one for CA intermediate). Let's name these 3 certificates "cert_server.cer", "cert_ca.cer", and "cert_ca_intermediate.cer".
I created a file named "keystore.jks" using the tool "keytool". This creation was done by executing the three following commands in this order :
keytool -import -keystore keystore.jks -file cert_server.cer -alias "server"
keytool -import -keystore keystore.jks -file cert_ca.cer -alias "ca"
keytool -import -keystore keystore.jks -file cert_ca_intermediate.cer -alias "ca_intermediate"
Note : i used the same password for all certificates
Then i added the file "keystore.jks" and the 3 certificates in the java project corresponding to my bundle, and defined the following sslContextParameters (which is referenced in the value of the "uri" attribute of the previously defined endpoint) in the blueprint file of my bundle :
<sslContextParameters id="mySslContextParameters"
xmlns="http://camel.apache.org/schema/blueprint">
<keyManagers keyPassword="abcde">
<keyStore resource="/key/keystore.jks" password="abcde" />
</keyManagers>
</sslContextParameters>
The problem is that it doesn't work (i don't manage to connect to "URL_I_WANT_TO_CONNECT_TO"), and the only information i have is the following log message : "Error : Remote host closed connection during handshake". I have no idea how to solve the problem.
Could the HTTP proxy be the source of the problem?
Thank you for any help.
Best regards