项目添加SSH证书时报Private key must be accompanied by certificate chain

现象描述:项目是使用springboot搭建,然后在阿里云上申请了一个免费的SSH证书,按照教程配置后,启动报如下的错误信息:

Caused by: java.lang.IllegalArgumentException: Private key must be accompanied by certificate chain
at java.security.KeyStore.setKeyEntry(KeyStore.java:1136) ~[na:1.8.0_181]
at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:357) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
... 25 common frames omitted

springboot配置如下

 

 

项目添加SSH证书时报Private key must be accompanied by certificate chain

 

 

后来查资料,是因为配置的关键子写错了 。截图中红框部分应该为:server.ssl.key-store-password

 

上一篇:SSL certificate problem: self signed certificat


下一篇:Nginx上配置使用自签名证书