HTTPS hostname wrong: should be . What causes this?

后端 未结 7 681
故里飘歌
故里飘歌 2020-12-03 10:38

I am getting this \'HTTPS hostname wrong:\' error when trying to connect to a server using https. My url looks something like this

https://sub.domain.com/tam         


        
7条回答
  •  借酒劲吻你
    2020-12-03 11:11

    Java by default verifies that the certificate CN (Common Name) is the same as hostname in the URL. If the CN in the certificate is not the same as the host name, your web service client fails with the following exception: java.io.IOException: HTTPS hostname wrong: should be hostname as in the certificates.

提交回复
热议问题