【发布时间】:2019-07-22 08:55:02
【问题描述】:
我正在尝试在 Spring DSL 中与 apache camel 建立 https 连接。跟随本教程:https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.2/html/apache_camel_component_reference/IDU-HTTP4
还有:http://camel.apache.org/http4.html
我构造了以下代码:
<sslContextParameters id="sslContextParameters" xmlns="http://camel.apache.org/schema/blueprint">
<trustManagers>
<keyStore resource="keyStore/keyStore.jks" password="changeit"/>
</trustManagers>
</sslContextParameters>
还有我的路线:
<route id="axis_camera">
<to uri = "https4://my_ip_adress?sslContextParametersRef=sslContextParameters"
</route>
和
<bean id="http-ssl" class="org.apache.camel.component.http4.HttpComponent">
<property name="sslContextParameters" ref="sslContextParameters"/>
</bean>
在 apache servicemix 上运行时,我得到:
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)
现在我可以在证书中看到此主机名未在主题中定义。我已经看到无法编辑证书,所以我的问题是如何调整此代码以使其读取正确的主机名?
【问题讨论】:
标签: apache-camel apache-servicemix spring-dsl