Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
javax.net.ssl.SSLHandshakeException:java.security.cert.CertificateException:不存在主题替代名称_Ssl_Spring Boot_Ssl Certificate_Spring Integration - Fatal编程技术网

javax.net.ssl.SSLHandshakeException:java.security.cert.CertificateException:不存在主题替代名称

javax.net.ssl.SSLHandshakeException:java.security.cert.CertificateException:不存在主题替代名称,ssl,spring-boot,ssl-certificate,spring-integration,Ssl,Spring Boot,Ssl Certificate,Spring Integration,我使用我的应用程序使用Https调用WS。 我使用spring集成、spring boot和maven 因此,我添加了属性: System.setProperty("javax.net.ssl.trustStore", "/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/lib/security/jssecacerts"); System.setProperty("javax.net.ssl.trustStoreType", "JKS"); Syste

我使用我的应用程序使用Https调用WS。 我使用spring集成、spring boot和maven

因此,我添加了属性:

System.setProperty("javax.net.ssl.trustStore", "/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/lib/security/jssecacerts");
    System.setProperty("javax.net.ssl.trustStoreType", "JKS"); 
    System.setProperty("javax.net.ssl.trustStorePassword","changeit");
我一直有这样的例外:

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present

你能帮我解决我的问题吗?

首先下载Installcert.java文件并编译它。 编译后,通过将参数作为url和端口(Ws-url和端口)传递来运行该java文件。
然后创建jssecacert文件,将该文件放入/jre/lib/security文件夹。希望它能工作

首先下载Installcert.java文件并编译它。 编译后,通过将参数作为url和端口(Ws-url和端口)传递来运行该java文件。 然后创建jssecacert文件,将该文件放入/jre/lib/security文件夹。希望它能起作用