i am trying to set up a https connection with apache camel in Spring DSL. following this tutorial: https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.2/html/apache_camel_component_reference/IDU-HTTP4
and also: http://camel.apache.org/http4.html
i constructed the following code:
<sslContextParameters id="sslContextParameters" xmlns="http://camel.apache.org/schema/blueprint">
<trustManagers>
<keyStore resource="keyStore/keyStore.jks" password="changeit"/>
</trustManagers>
</sslContextParameters>
and my route:
<route id="axis_camera">
<to uri = "https4://my_ip_adress?sslContextParametersRef=sslContextParameters"
</route>
and
<bean id="http-ssl" class="org.apache.camel.component.http4.HttpComponent">
<property name="sslContextParameters" ref="sslContextParameters"/>
</bean>
when running this on apache servicemix i get:
javax.net.ssl.SSLPeerUnverifiedException: Host name my_ip_adress does not
match the certificate subject provided by the peer (CN=axis-accc8ec51452,
O=Axis Communications AB)
Now i can see in the certificate that this host name is not defined in the subject. I have seen that certificates can not be edited so my question is how do i adjust this code in such a way that it reads the correct hostname?