package android.net.ssl;

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

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

    private static void checkSupported(SSLEngine sSLEngine) {
        if (!isSupportedEngine(sSLEngine)) {
            throw new IllegalArgumentException("Engine is not a supported engine.");
        }
    }

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

    public static boolean isSupportedEngine(SSLEngine sSLEngine) {
        return Conscrypt.isConscrypt(sSLEngine);
    }

    public static void setUseSessionTickets(SSLEngine sSLEngine, boolean z2) {
        checkSupported(sSLEngine);
        Conscrypt.setUseSessionTickets(sSLEngine, z2);
    }
}
