mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-27 16:23:22 +01:00
33 lines
1.1 KiB
Java
33 lines
1.1 KiB
Java
package org.apache.http.ssl;
|
|
|
|
import java.security.KeyManagementException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
import javax.net.ssl.SSLContext;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes11.dex */
|
|
public class SSLContexts {
|
|
public static SSLContext createDefault() throws SSLInitializationException {
|
|
try {
|
|
SSLContext sSLContext = SSLContext.getInstance("TLS");
|
|
sSLContext.init(null, null, null);
|
|
return sSLContext;
|
|
} catch (KeyManagementException e) {
|
|
throw new SSLInitializationException(e.getMessage(), e);
|
|
} catch (NoSuchAlgorithmException e2) {
|
|
throw new SSLInitializationException(e2.getMessage(), e2);
|
|
}
|
|
}
|
|
|
|
public static SSLContext createSystemDefault() throws SSLInitializationException {
|
|
try {
|
|
return SSLContext.getDefault();
|
|
} catch (NoSuchAlgorithmException unused) {
|
|
return createDefault();
|
|
}
|
|
}
|
|
|
|
public static SSLContextBuilder custom() {
|
|
return SSLContextBuilder.create();
|
|
}
|
|
}
|