导航菜单

页面标题

页面副标题

Kaspi.kz v5.85.1 - AbstractC6369ciK.java 源代码

正在查看: Kaspi.kz v5.85.1 应用的 AbstractC6369ciK.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o;

import java.io.BufferedOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Principal;
import java.security.Provider;
import java.security.PublicKey;
import java.security.Signature;
import java.security.SignatureException;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.CertificateParsingException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import javax.security.auth.x500.X500Principal;

abstract class AbstractC6369ciK extends X509Certificate implements InterfaceC6211cfM {
    protected byte[] RemoteActionCompatParcelizer;
    protected InterfaceC6523clF setBackground;
    protected bRE setError;
    protected String setFieldValue;
    protected boolean[] setLabel;
    protected C3782bRv setOptions;

    AbstractC6369ciK(InterfaceC6523clF interfaceC6523clF, bRE bre, C3782bRv c3782bRv, boolean[] zArr, String str, byte[] bArr) {
        this.setBackground = interfaceC6523clF;
        this.setError = bre;
        this.setOptions = c3782bRv;
        this.setLabel = zArr;
        this.setFieldValue = str;
        this.RemoteActionCompatParcelizer = bArr;
    }

    private static Collection setBackground(bRE bre, String str) throws CertificateParsingException {
        String error;
        byte[] options = setOptions(bre, str);
        if (options == null) {
            return null;
        }
        try {
            ArrayList arrayList = new ArrayList();
            Enumeration background = AbstractC3660bNh.setLabel(options).setBackground();
            while (background.hasMoreElements()) {
                bRT options2 = bRT.setOptions(background.nextElement());
                ArrayList arrayList2 = new ArrayList();
                arrayList2.add(cEU.read(options2.setBackground()));
                switch (options2.setBackground()) {
                    case 0:
                    case 3:
                    case 5:
                        arrayList2.add(options2.AudioAttributesCompatParcelizer());
                        arrayList.add(Collections.unmodifiableList(arrayList2));
                    case 1:
                    case 2:
                    case 6:
                        error = ((InterfaceC3662bNj) options2.setFieldValue()).setError();
                        arrayList2.add(error);
                        arrayList.add(Collections.unmodifiableList(arrayList2));
                    case 4:
                        error = C3762bRb.setFieldValue(C3772bRl.setBackground, options2.setFieldValue()).toString();
                        arrayList2.add(error);
                        arrayList.add(Collections.unmodifiableList(arrayList2));
                    case 7:
                        try {
                            error = InetAddress.getByAddress(bMZ.setError(options2.setFieldValue()).setError()).getHostAddress();
                            arrayList2.add(error);
                            arrayList.add(Collections.unmodifiableList(arrayList2));
                        } catch (UnknownHostException unused) {
                        }
                    case 8:
                        error = C3655bNc.setBackground(options2.setFieldValue()).setLabel();
                        arrayList2.add(error);
                        arrayList.add(Collections.unmodifiableList(arrayList2));
                    default:
                        throw new IOException("Bad tag number: " + options2.setBackground());
                }
            }
            if (arrayList.size() == 0) {
                return null;
            }
            return Collections.unmodifiableCollection(arrayList);
        } catch (Exception e) {
            throw new CertificateParsingException(e.getMessage());
        }
    }

    protected static bMZ setFieldValue(bRE bre, String str) {
        bRO label;
        bRS label2 = bre.RemoteActionCompatParcelizer().setLabel();
        if (label2 == null || (label = label2.setLabel(new C3655bNc(str))) == null) {
            return null;
        }
        return label.setFieldValue();
    }

    private void setFieldValue(PublicKey publicKey, Signature signature, bMM bmm, byte[] bArr) throws CertificateException, InvalidKeyException, NoSuchAlgorithmException, SignatureException {
        if (!C6370ciL.setFieldValue(this.setError.setOptions(), this.setError.RemoteActionCompatParcelizer().write())) {
            throw new CertificateException("signature algorithm in TBS cert not same as outer cert");
        }
        C6370ciL.setLabel(signature, bmm);
        signature.initVerify(publicKey);
        try {
            BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(C6224cfZ.setBackground(signature), 512);
            this.setError.RemoteActionCompatParcelizer().setFieldValue(bufferedOutputStream, bML.setFieldValue);
            bufferedOutputStream.close();
            if (!signature.verify(bArr)) {
                throw new SignatureException("certificate does not verify with supplied key");
            }
        } catch (IOException e) {
            throw new CertificateEncodingException(e.toString());
        }
    }

    private void setLabel(PublicKey publicKey, InterfaceC6361ciC interfaceC6361ciC) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException {
        boolean z = publicKey instanceof C6243cfs;
        int i = 0;
        if (z && C6370ciL.setBackground(this.setError.setOptions())) {
            List<PublicKey> background = ((C6243cfs) publicKey).setBackground();
            AbstractC3660bNh label = AbstractC3660bNh.setLabel((Object) this.setError.setOptions().setBackground());
            AbstractC3660bNh label2 = AbstractC3660bNh.setLabel(this.setError.setError().RemoteActionCompatParcelizer());
            boolean z2 = false;
            while (i != background.size()) {
                if (background.get(i) != null) {
                    C3774bRn options = C3774bRn.setOptions(label.setLabel(i));
                    try {
                        setFieldValue(background.get(i), interfaceC6361ciC.setOptions(C6370ciL.setError(options)), options.setBackground(), bMG.setBackground(label2.setLabel(i)).RemoteActionCompatParcelizer());
                        e = null;
                        z2 = true;
                    } catch (SignatureException e) {
                        e = e;
                    }
                    if (e != null) {
                        throw e;
                    }
                }
                i++;
            }
            if (!z2) {
                throw new InvalidKeyException("no matching key found");
            }
            return;
        }
        if (!C6370ciL.setBackground(this.setError.setOptions())) {
            Signature options2 = interfaceC6361ciC.setOptions(getSigAlgName());
            if (z) {
                C6243cfs c6243cfs = (C6243cfs) publicKey;
                if (InterfaceC6229cfe.getLifecycle.setLabel((AbstractC3657bNe) c6243cfs.setLabel())) {
                    List<PublicKey> background2 = c6243cfs.setBackground();
                    while (i != background2.size()) {
                        try {
                            setFieldValue(background2.get(i), options2, this.setError.setOptions().setBackground(), getSignature());
                            return;
                        } catch (InvalidKeyException unused) {
                            i++;
                        }
                    }
                    throw new InvalidKeyException("no matching signature found");
                }
            }
            setFieldValue(publicKey, options2, this.setError.setOptions().setBackground(), getSignature());
            return;
        }
        AbstractC3660bNh label3 = AbstractC3660bNh.setLabel((Object) this.setError.setOptions().setBackground());
        AbstractC3660bNh label4 = AbstractC3660bNh.setLabel(this.setError.setError().RemoteActionCompatParcelizer());
        boolean z3 = false;
        while (i != label4.IconCompatParcelizer()) {
            C3774bRn options3 = C3774bRn.setOptions(label3.setLabel(i));
            try {
                setFieldValue(publicKey, interfaceC6361ciC.setOptions(C6370ciL.setError(options3)), options3.setBackground(), bMG.setBackground(label4.setLabel(i)).RemoteActionCompatParcelizer());
                e = null;
                z3 = true;
            } catch (InvalidKeyException | NoSuchAlgorithmException unused2) {
                e = null;
            } catch (SignatureException e2) {
                e = e2;
            }
            if (e != null) {
                throw e;
            }
            i++;
        }
        if (!z3) {
            throw new InvalidKeyException("no matching key found");
        }
    }

    protected static byte[] setOptions(bRE bre, String str) {
        bMZ fieldValue = setFieldValue(bre, str);
        if (fieldValue != null) {
            return fieldValue.setError();
        }
        return null;
    }

    @Override
    public C3762bRb bT_() {
        return this.setError.write();
    }

    @Override
    public void checkValidity() throws CertificateExpiredException, CertificateNotYetValidException {
        checkValidity(new Date());
    }

    @Override
    public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException {
        if (date.getTime() > getNotAfter().getTime()) {
            throw new CertificateExpiredException("certificate expired on " + this.setError.setLabel().setError());
        }
        if (date.getTime() >= getNotBefore().getTime()) {
            return;
        }
        throw new CertificateNotYetValidException("certificate not valid till " + this.setError.read().setError());
    }

    @Override
    public int getBasicConstraints() {
        C3782bRv c3782bRv = this.setOptions;
        if (c3782bRv == null || !c3782bRv.setLabel()) {
            return -1;
        }
        bMX error = this.setOptions.setError();
        if (error == null) {
            return Integer.MAX_VALUE;
        }
        return error.setFieldValue();
    }

    @Override
    public java.util.Set getCriticalExtensionOIDs() {
        if (getVersion() != 3) {
            return null;
        }
        HashSet hashSet = new HashSet();
        bRS label = this.setError.RemoteActionCompatParcelizer().setLabel();
        if (label == null) {
            return null;
        }
        Enumeration error = label.setError();
        while (error.hasMoreElements()) {
            C3655bNc c3655bNc = (C3655bNc) error.nextElement();
            if (label.setLabel(c3655bNc).setLabel()) {
                hashSet.add(c3655bNc.setLabel());
            }
        }
        return hashSet;
    }

    @Override
    public List getExtendedKeyUsage() throws CertificateParsingException {
        byte[] options = setOptions(this.setError, "2.5.29.37");
        if (options == null) {
            return null;
        }
        try {
            AbstractC3660bNh label = AbstractC3660bNh.setLabel((Object) AbstractC3657bNe.setElement(options));
            ArrayList arrayList = new ArrayList();
            for (int i = 0; i != label.IconCompatParcelizer(); i++) {
                arrayList.add(((C3655bNc) label.setLabel(i)).setLabel());
            }
            return Collections.unmodifiableList(arrayList);
        } catch (Exception unused) {
            throw new CertificateParsingException("error processing extended key usage extension");
        }
    }

    @Override
    public byte[] getExtensionValue(String str) {
        bMZ fieldValue = setFieldValue(this.setError, str);
        if (fieldValue == null) {
            return null;
        }
        try {
            return fieldValue.AudioAttributesCompatParcelizer();
        } catch (Exception e) {
            throw cEL.setOptions("error parsing " + e.getMessage(), e);
        }
    }

    @Override
    public Collection getIssuerAlternativeNames() throws CertificateParsingException {
        return setBackground(this.setError, bRO.MediaMetadataCompat.setLabel());
    }

    @Override
    public Principal getIssuerDN() {
        return new C6536clS(this.setError.setFieldValue());
    }

    @Override
    public boolean[] getIssuerUniqueID() {
        bMG options = this.setError.RemoteActionCompatParcelizer().setOptions();
        if (options == null) {
            return null;
        }
        byte[] fieldValue = options.setFieldValue();
        int length = (fieldValue.length * 8) - options.setElement();
        boolean[] zArr = new boolean[length];
        for (int i = 0; i != length; i++) {
            zArr[i] = (fieldValue[i / 8] & (128 >>> (i % 8))) != 0;
        }
        return zArr;
    }

    @Override
    public X500Principal getIssuerX500Principal() {
        try {
            return new X500Principal(this.setError.setFieldValue().setOptions(bML.setFieldValue));
        } catch (IOException unused) {
            throw new IllegalStateException("can't encode issuer DN");
        }
    }

    @Override
    public boolean[] getKeyUsage() {
        return cEJ.setLabel(this.setLabel);
    }

    @Override
    public java.util.Set getNonCriticalExtensionOIDs() {
        if (getVersion() != 3) {
            return null;
        }
        HashSet hashSet = new HashSet();
        bRS label = this.setError.RemoteActionCompatParcelizer().setLabel();
        if (label == null) {
            return null;
        }
        Enumeration error = label.setError();
        while (error.hasMoreElements()) {
            C3655bNc c3655bNc = (C3655bNc) error.nextElement();
            if (!label.setLabel(c3655bNc).setLabel()) {
                hashSet.add(c3655bNc.setLabel());
            }
        }
        return hashSet;
    }

    @Override
    public Date getNotAfter() {
        return this.setError.setLabel().setLabel();
    }

    @Override
    public Date getNotBefore() {
        return this.setError.read().setLabel();
    }

    @Override
    public PublicKey getPublicKey() {
        try {
            return C6614cmm.setError(this.setError.setElement());
        } catch (IOException e) {
            throw cEL.setOptions("failed to recover public key: " + e.getMessage(), e);
        }
    }

    @Override
    public BigInteger getSerialNumber() {
        return this.setError.setBackground().setBackground();
    }

    @Override
    public String getSigAlgName() {
        return this.setFieldValue;
    }

    @Override
    public String getSigAlgOID() {
        return this.setError.setOptions().setOptions().setLabel();
    }

    @Override
    public byte[] getSigAlgParams() {
        return cEJ.setBackground(this.RemoteActionCompatParcelizer);
    }

    @Override
    public byte[] getSignature() {
        return this.setError.setError().RemoteActionCompatParcelizer();
    }

    @Override
    public Collection getSubjectAlternativeNames() throws CertificateParsingException {
        return setBackground(this.setError, bRO.getLifecycleRegistry.setLabel());
    }

    @Override
    public Principal getSubjectDN() {
        return new C6536clS(this.setError.write());
    }

    @Override
    public boolean[] getSubjectUniqueID() {
        bMG read = this.setError.RemoteActionCompatParcelizer().read();
        if (read == null) {
            return null;
        }
        byte[] fieldValue = read.setFieldValue();
        int length = (fieldValue.length * 8) - read.setElement();
        boolean[] zArr = new boolean[length];
        for (int i = 0; i != length; i++) {
            zArr[i] = (fieldValue[i / 8] & (128 >>> (i % 8))) != 0;
        }
        return zArr;
    }

    @Override
    public X500Principal getSubjectX500Principal() {
        try {
            return new X500Principal(this.setError.write().setOptions(bML.setFieldValue));
        } catch (IOException unused) {
            throw new IllegalStateException("can't encode subject DN");
        }
    }

    @Override
    public byte[] getTBSCertificate() throws CertificateEncodingException {
        try {
            return this.setError.RemoteActionCompatParcelizer().setOptions(bML.setFieldValue);
        } catch (IOException e) {
            throw new CertificateEncodingException(e.toString());
        }
    }

    @Override
    public int getVersion() {
        return this.setError.AudioAttributesImplBaseParcelizer();
    }

    @Override
    public boolean hasUnsupportedCriticalExtension() {
        bRS label;
        if (getVersion() != 3 || (label = this.setError.RemoteActionCompatParcelizer().setLabel()) == null) {
            return false;
        }
        Enumeration error = label.setError();
        while (error.hasMoreElements()) {
            C3655bNc c3655bNc = (C3655bNc) error.nextElement();
            if (!c3655bNc.setLabel((AbstractC3657bNe) bRO.MediaSessionCompatToken) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.AudioAttributesImplBaseParcelizer) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.PlaybackStateCompat) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.MediaBrowserCompatItemReceiver) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.RemoteActionCompatParcelizer) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.MediaSessionCompatQueueItem) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.AudioAttributesImplApi26Parcelizer) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.ParcelableVolumeInfo) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.IconCompatParcelizer) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.getLifecycleRegistry) && !c3655bNc.setLabel((AbstractC3657bNe) bRO.RatingCompat) && label.setLabel(c3655bNc).setLabel()) {
                return true;
            }
        }
        return false;
    }

    @Override
    public C3762bRb setFieldValue() {
        return this.setError.setFieldValue();
    }

    @Override
    public C3809bSv setLabel() {
        return this.setError.RemoteActionCompatParcelizer();
    }

    @Override
    public String toString() {
        Object c6232cfh;
        StringBuffer stringBuffer = new StringBuffer();
        String label = C5521cFa.setLabel();
        stringBuffer.append("  [0]         Version: ");
        stringBuffer.append(getVersion());
        stringBuffer.append(label);
        stringBuffer.append("         SerialNumber: ");
        stringBuffer.append(getSerialNumber());
        stringBuffer.append(label);
        stringBuffer.append("             IssuerDN: ");
        stringBuffer.append(getIssuerDN());
        stringBuffer.append(label);
        stringBuffer.append("           Start Date: ");
        stringBuffer.append(getNotBefore());
        stringBuffer.append(label);
        stringBuffer.append("           Final Date: ");
        stringBuffer.append(getNotAfter());
        stringBuffer.append(label);
        stringBuffer.append("            SubjectDN: ");
        stringBuffer.append(getSubjectDN());
        stringBuffer.append(label);
        stringBuffer.append("           Public Key: ");
        stringBuffer.append(getPublicKey());
        stringBuffer.append(label);
        stringBuffer.append("  Signature Algorithm: ");
        stringBuffer.append(getSigAlgName());
        stringBuffer.append(label);
        C6370ciL.setLabel(getSignature(), stringBuffer, label);
        bRS label2 = this.setError.RemoteActionCompatParcelizer().setLabel();
        if (label2 != null) {
            Enumeration error = label2.setError();
            if (error.hasMoreElements()) {
                stringBuffer.append("       Extensions: \n");
            }
            while (error.hasMoreElements()) {
                C3655bNc c3655bNc = (C3655bNc) error.nextElement();
                bRO label3 = label2.setLabel(c3655bNc);
                if (label3.setFieldValue() != null) {
                    bMV bmv = new bMV(label3.setFieldValue().setError());
                    stringBuffer.append("                       critical(");
                    stringBuffer.append(label3.setLabel());
                    stringBuffer.append(") ");
                    try {
                    } catch (Exception unused) {
                        stringBuffer.append(c3655bNc.setLabel());
                        stringBuffer.append(" value = ");
                        stringBuffer.append("*****");
                    }
                    if (c3655bNc.setLabel((AbstractC3657bNe) bRO.IconCompatParcelizer)) {
                        c6232cfh = C3782bRv.setLabel(bmv.setError());
                    } else if (c3655bNc.setLabel((AbstractC3657bNe) bRO.MediaSessionCompatToken)) {
                        c6232cfh = C3790bSc.setError(bmv.setError());
                    } else if (c3655bNc.setLabel((AbstractC3657bNe) InterfaceC6229cfe.OnBackPressedDispatcherLifecycleOnBackPressedCancellable)) {
                        c6232cfh = new C6231cfg(bMG.setBackground(bmv.setError()));
                    } else if (c3655bNc.setLabel((AbstractC3657bNe) InterfaceC6229cfe.Nullable)) {
                        c6232cfh = new C6230cff(bMW.setFieldValue(bmv.setError()));
                    } else if (c3655bNc.setLabel((AbstractC3657bNe) InterfaceC6229cfe.create)) {
                        c6232cfh = new C6232cfh(bMW.setFieldValue(bmv.setError()));
                    } else {
                        stringBuffer.append(c3655bNc.setLabel());
                        stringBuffer.append(" value = ");
                        stringBuffer.append(bQX.setBackground(bmv.setError()));
                        stringBuffer.append(label);
                    }
                    stringBuffer.append(c6232cfh);
                    stringBuffer.append(label);
                }
                stringBuffer.append(label);
            }
        }
        return stringBuffer.toString();
    }

    @Override
    public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
        setLabel(publicKey, new InterfaceC6361ciC() {
            @Override
            public Signature setOptions(String str) throws NoSuchAlgorithmException {
                try {
                    return AbstractC6369ciK.this.setBackground.MediaBrowserCompatSearchResultReceiver(str);
                } catch (Exception unused) {
                    return Signature.getInstance(str);
                }
            }
        });
    }

    @Override
    public final void verify(PublicKey publicKey, final String str) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
        setLabel(publicKey, new InterfaceC6361ciC() {
            @Override
            public Signature setOptions(String str2) throws NoSuchAlgorithmException, NoSuchProviderException {
                String str3 = str;
                return str3 != null ? Signature.getInstance(str2, str3) : Signature.getInstance(str2);
            }
        });
    }

    @Override
    public final void verify(PublicKey publicKey, final Provider provider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
        try {
            setLabel(publicKey, new InterfaceC6361ciC() {
                @Override
                public Signature setOptions(String str) throws NoSuchAlgorithmException {
                    Provider provider2 = provider;
                    return provider2 != null ? Signature.getInstance(str, provider2) : Signature.getInstance(str);
                }
            });
        } catch (NoSuchProviderException e) {
            throw new NoSuchAlgorithmException("provider issue: " + e.getMessage());
        }
    }
}