CertificateException: No name matching ssl.someUrl.de found

后端 未结 7 1797
生来不讨喜
生来不讨喜 2020-11-29 21:22

I\'m trying to connect to one of my servers through ssl, with Java. I tried a lot of options here is my best try:

I generate a jssecacerts with the recommendet scrip

7条回答
  •  离开以前
    2020-11-29 22:16

    In Java 8 you can skip server name checking with the following code:

    HttpsURLConnection.setDefaultHostnameVerifier ((hostname, session) -> true);
    

    However this should be used only in development!

提交回复
热议问题