Giter VIP home page Giter VIP logo

Comments (10)

Jack253-png avatar Jack253-png commented on August 25, 2024

image
正常访问时

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

即使信任所有证书还是这样

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

image
包括自己写api也是正常的

from githubreleases4j.

CarmJos avatar CarmJos commented on August 25, 2024

经测,功能正常,请检查自己的代码和网络。

from githubreleases4j.

CarmJos avatar CarmJos commented on August 25, 2024

image

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

果然,是证书的问题

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

希望你以后的版本里多加一个信任所证书

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

private static void trustAllHosts() {
final String TAG = "trustAllHosts";
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[] {};
}
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// Log.i(TAG, "checkClientTrusted");
}
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// Log.i(TAG, "checkServerTrusted");
}
} };
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
e.printStackTrace();
}

from githubreleases4j.

Jack253-png avatar Jack253-png commented on August 25, 2024

这样就可以了

from githubreleases4j.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.