Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set badCertificateCallback #42

Closed
wuwenbo5 opened this issue Aug 15, 2019 · 10 comments
Closed

how to set badCertificateCallback #42

wuwenbo5 opened this issue Aug 15, 2019 · 10 comments
Labels
enhancement New feature or request

Comments

@wuwenbo5
Copy link

加载不出来https的图片,证书不被信任,这改怎么解决?
有没有入口给client设置badCertificateCallback 参数

@zmtzawqlp zmtzawqlp added the enhancement New feature or request label Aug 16, 2019
@zmtzawqlp
Copy link
Member

请引用最新的http_client_helper : 0.2.1
你可以这样设置badCertificateCallback
image

图片缓存使用的这个库,请求,所以你这样写就好了

@zmtzawqlp
Copy link
Member

还有什么问题。可以加群问

@zmtzawqlp zmtzawqlp pinned this issue Dec 13, 2019
@zmtzawqlp
Copy link
Member

HttpClient http = HttpClient();
    http.badCertificateCallback =
        (X509Certificate cert, String host, int port) {
      return true;
    };
    HttpClientHelper().set(IOClient(http));

@zmtzawqlp zmtzawqlp changed the title https图片无法显示,如何处理证书问题? how to set badCertificateCallback Dec 26, 2019
@zmtzawqlp zmtzawqlp unpinned this issue Mar 12, 2020
@zmtzawqlp zmtzawqlp pinned this issue Apr 22, 2020
@zmtzawqlp
Copy link
Member

in new version, you should do as following:

 HttpClient client = ExtendedNetworkImageProvider.httpClient as HttpClient;
    client.badCertificateCallback =
        (X509Certificate cert, String host, int port) {
      return true;
    };

@zmtzawqlp
Copy link
Member

reopen, peopele can find it quickly

@zbyJade
Copy link

zbyJade commented Sep 2, 2020

请问您是如何解决的ExtendedImage.network加载https图片的问题
我配置了证书不起作用呢
image

@zmtzawqlp
Copy link
Member

你是什么版本。。后续版本才是这样写的,前面版本是按照前面的写法

@AlexTeamX
Copy link

小菜鸟前来挖坟,请问现在是怎么设置的,我这样设置无效
image

@zmtzawqlp
Copy link
Member

小菜鸟前来挖坟,请问现在是怎么设置的,我这样设置无效
image

这是之前版本的设置方式,你看完整个issue哦

HttpClient client = ExtendedNetworkImageProvider.httpClient as HttpClient;
client.badCertificateCallback =
(X509Certificate cert, String host, int port) {
return true;
};

@AlexTeamX
Copy link

小菜鸟前来挖坟,请问现在是怎么设置的,我这样设置无效
image

这是之前版本的设置方式,你看完整个issue哦

HttpClient client = ExtendedNetworkImageProvider.httpClient as HttpClient;
client.badCertificateCallback =
(X509Certificate cert, String host, int port) {
return true;
};

我是沙雕,已经看到上面有此设置方式了,谢谢法佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants