lixplor / android-Q-A

🐞 android related questions and answers
0 stars 0 forks source link

javax.net.ssl.SSLException: hostname in certificate didn't match: <xxx.xxx.net> != <*.xxx.net> OR <*.xxx.net> OR <xxx.net> #49

Closed lixplor closed 7 years ago

lixplor commented 7 years ago

javax.net.ssl.SSLException: hostname in certificate didn't match: != <.xxx.net> OR <.xxx.net> OR

lixplor commented 7 years ago

原因: 源于android http client不支持SNI http://stackoverflow.com/questions/5879894/android-ssl-sni-support. 使用SNI后证书和实际指向域名不一致, 所以报错说不相同 解决: