我想调用HTTPS api,但是出现问题: sun.security.validator.ValidatorException:PKIX路径构建失败: 我在$ JAVA_HOME / ... securit / cacerts中添加证书 但是,我有一个错误: 的证书与任何主题替代名称都不匹配:[]
您能帮我吗?
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camel:sslContextParameters
xmlns="http://camel.apache.org/schema/blueprint"
id="sslContextParameters">
<camel:keyManagers
keyPassword="osslab">
<camel:keyStore
resource="/home/ossl/clients/KeyStore.jks"
password="osslab"/>
</camel:keyManagers>
<camel:trustManagers>
<camel:keyStore
resource="/home/ossl/clients/truststore.jks"
password="osslab"/>
</camel:trustManagers>
</camel:sslContextParameters>
<camelContext trace="true" xmlns="http://camel.apache.org/schema
<route id="http4-route">
<from uri="timer://webinar?period=1000"/>
<setHeader headerName="CamelHttpMethod">
<constant>GET</constant>
</setHeader>
<to uri="https4://THe API Address:7080/sms/hi?sslContextParametersRef=sslContextParameters"/>
<log message="message sent!"/>
</route>
</camelContext>
</blueprint>