https 出现host name not match 问题
来源:互联网 发布:erp软件开发 编辑:程序博客网 时间:2024/06/06 10:04
'www.xxx.com' does not match the certificate subject provided by the peer
出现这个问题的原因是你访问的域名和你访问服务器的证书的机构(域名)不一致导致的,比如,你的证书是为域名 sss.com注册的,而你访问的时候的域名是xxx.com,这个时候就会报这种错误,解决办法是重写httpclient的HostnameVerifier,如下:
SSLConnectionSocketFactory sf = new SSLConnectionSocketFactory(context, new String[] { "TLSv1.2"},null, new HostnameVerifier(){@Overridepublic boolean verify(String hostname, SSLSession session) {hostname = "*.sss.com";return SSLConnectionSocketFactory.getDefaultHostnameVerifier().verify(hostname, session);}});
0 0
- https 出现host name not match 问题
- wget https://www.baidu.com 报错ERROR: certificate common name `baidu.com' doesn't match requested host
- host name may not be null
- wget 命令使用报错 certificate common name “*.zeroc.com” doesn’t match requested host name “
- 【React-Router】关于browserHistory出现did not match any routes的问题
- python中出现IndentationError:unindent does not match any outer indentation level是什么问题?
- Apache启动报错Name or service not known,`127.0.0.1' does NOT match server name!
- Target host must not be null /// host name may not be null 处理
- git之fatal: unable to access 'https://git.oschina.net/pcmpcs/library.git/': Could not resolve host问题
- WARNING: local host name (XXXX) is not qualified如何解决
- java.lang.IllegalArgumentException: Host name may not be null
- java.lang.IllegalArgumentException: AppIndex: The URI host must match the package name and follow th
- The URI host must match the package name and follow the format
- could not translate host name “localhost”, service “5432″ to address: Name or service not known
- Does not match the target endianness问题
- psi and index do not match问题
- Java compiler level does not match 问题
- sendmail 出现 My unqualified host name的解决办法
- C# 压缩和解压文件
- 代码混淆 proguard相关配置过程记录
- 面试
- BP神经网络
- MyEclipse2015 Stable2.0 安装与破解
- https 出现host name not match 问题
- app后端架构
- 342. Power of Four [easy] (Python)
- 从浅到深了解Thrift(一)
- Webkit
- 由java.lang.NoClassDefFoundError: List错误引发的jdk配置
- PowerPoint如何插入公式
- virtualbox中ubuntu和windows共享文件夹设置
- HttpURLConnection请求与Pull解析