Java CertificateException “No subject alternative names matching IP address … found”

前端 未结 6 1683
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 10:39

I\'m trying to implement a selfsigned certificate into my webserver, and it\'s working already with firefox and chrome (both from the server itself and from a remote machine

6条回答
  •  -上瘾入骨i
    2020-12-31 10:44

    I have resolved the said

    javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address

    error by adding one alternative subject name (DNS) in the server certificate (having CN=example.com) which after prints the part of certificate as below:

    Subject Alternative Name:
    DNS: example.com
    

    I used KeyExplorer on windows for generating my server certificate. You can follow this link for adding alternative subject names (follow the only part for adding it).

提交回复
热议问题