首页 > 编程知识 正文

因为photoshop不能解析postscript,glide加载图片真实尺寸

时间:2023-05-05 16:26:24 阅读:25811 作者:2669

Glide加载https图像时出错:javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

解决方法:在APP oncreate中调用方法handleSSLHandshake (

/* *忽略https证书验证防止Glide加载https图像并报告错误: * javax.net.SSL.sslhandshakeexception : Java.security.cert.certpathvalidatorexception :可信转发功能验证ke((try ) trustmanager ) ) trustallcerts=newtrustmanager ) ) )。 gtacceptedissuers ((返回新x509证书[0]; } @ overridepublicvoidcheckclienttrusted (x509 certificate [ ] certs,String authType ) } @ overridepublicvoidcheckservertrusttype //trustAllCerts是所有证书sc.init(null,trustAllCerts,new SecureRandom ); httpsurlconnection.setdefaultsslsocketfactory (sc.getsocketfactory ) ); httpsurlconnection.setdefaulthostnameverifier (newhostnameverifier ) @ overridepublicbooleanverify (字符串主机名称,字符串); }catch(exceptionignored ) { }

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。