SSL handshake alert: unrecognized_name error since upgrade to Java 1.7.0

前端 未结 17 3069
栀梦
栀梦 2020-11-22 06:35

I upgraded from Java 1.6 to Java 1.7 today. Since then an error occur when I try to establish a connection to my webserver over SSL:

javax.net.ssl.SSLProtoco         


        
17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 07:14

    There is an easier way where you can just use your own HostnameVerifier to implicitly trust certain connections. The issue comes with Java 1.7 where SNI extensions have been added and your error is due to a server misconfiguration.

    You can either use "-Djsse.enableSNIExtension=false" to disable SNI across the whole JVM or read my blog where I explain how to implement a custom verifier on top of a URL connection.

提交回复
热议问题