api - 证书不匹配任何主题替代名称:[]
问题描述
我想调用 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>
解决方案
推荐阅读
- awk - awk 第一列的数字范围匹配
- mysql - 编写查询以显示从学生那里获得的最高平均值
- javascript - 为什么我需要将对象传递给 Array.from?
- django - 配置不当:字段名称“titleweb_poster”对于模型“ContestDetail”无效
- python - 如何减慢 Pillow 中的图像显示速度
- google-cloud-firestore - Firestore rest api 在 arduino ide 中发出经过身份验证的请求
- python - 我如何通过 selenium 点击“javascript:void(0)”
- reactjs - 为什么我的日期输入让我回到反应前一天
- mysql - 我不明白为什么这两个带有 WHERE IN 的 SQL 查询会给出不同的结果
- c# - CefSettings 在 WPF c# 中给出错误或不工作