package android.net.ssl;

import com.android.org.conscrypt.Conscrypt;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSocket;

/* JADX INFO: loaded from: classes.dex */
public class SSLSockets {
    private SSLSockets() {
    }

    private static void checkSupported(SSLSocket sSLSocket) {
        if (!isSupportedSocket(sSLSocket)) {
            throw new IllegalArgumentException("Socket is not a supported socket.");
        }
    }

    public static byte[] exportKeyingMaterial(SSLSocket sSLSocket, String str, byte[] bArr, int i3) throws SSLException {
        checkSupported(sSLSocket);
        return Conscrypt.exportKeyingMaterial(sSLSocket, str, bArr, i3);
    }

    public static boolean isSupportedSocket(SSLSocket sSLSocket) {
        return Conscrypt.isConscrypt(sSLSocket);
    }

    public static void setUseSessionTickets(SSLSocket sSLSocket, boolean z2) {
        checkSupported(sSLSocket);
        Conscrypt.setUseSessionTickets(sSLSocket, z2);
    }
}
