Remove conscrypt beacuse gitea

pull/585/head
FongMi 1 year ago
parent 9238431d59
commit 10e9f00c79
  1. 1
      catvod/build.gradle
  2. 7
      catvod/src/main/java/com/github/catvod/net/OkHttp.java

@ -27,7 +27,6 @@ dependencies {
api 'com.squareup.okhttp3:okhttp:' + okhttpVersion
api 'com.squareup.okhttp3:okhttp-dnsoverhttps:' + okhttpVersion
api 'com.squareup.okhttp3:logging-interceptor:' + okhttpVersion
api 'org.conscrypt:conscrypt-android:2.5.3'
api('com.google.guava:guava:33.0.0-android') {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'

@ -10,11 +10,8 @@ import com.github.catvod.net.interceptor.RequestInterceptor;
import com.github.catvod.net.interceptor.ResponseInterceptor;
import com.github.catvod.utils.Path;
import org.conscrypt.Conscrypt;
import java.net.ProxySelector;
import java.security.SecureRandom;
import java.security.Security;
import java.security.cert.X509Certificate;
import java.util.Map;
import java.util.Objects;
@ -161,10 +158,6 @@ public class OkHttp {
}
private static SSLContext getSSLContext() {
try {
Security.insertProviderAt(Conscrypt.newProvider(), 1);
} catch (Throwable ignored) {
}
try {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, new TrustManager[]{trustAllCertificates()}, new SecureRandom());

Loading…
Cancel
Save