linux 下出现peer not authenticated

移动开发 码拜 8年前 (2016-04-19) 964次浏览
在win环境中没有问题,可是吧项目移到linux就出现peer not authenticated 问题,问一下下本人在获取access_token的时候哪里出现了问题。代码如下linux 下出现peer not authenticated
linux 下出现peer not authenticated
解决方案

40

由于获取AccessToken的URL是HTTPS协议的  而你调用的时候没有对应的安全证书
帮你找到一个解决方法:

Protocol easyHttps = new Protocol("https", new EasySSLProtocolSocketFactory(), 443);
Protocol.registerProtocol("https", easyHttps);

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明linux 下出现peer not authenticated
喜欢 (0)
[1034331897@qq.com]
分享 (0)