导航菜单

页面标题

页面副标题

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

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

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


package o;

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.Security;
import java.security.Signature;
import java.security.SignatureException;
import java.security.cert.Certificate;
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 java.util.Set;
import javax.security.auth.x500.X500Principal;

public class C0924cni extends X509Certificate implements cmk {
    private boolean[] IconCompatParcelizer;
    private boolean setBackground;
    private cmk setError = new civ();
    private bRv setFieldValue;
    private bRE setLabel;
    private int setOptions;

    public C0924cni(bRE bre) throws CertificateParsingException {
        this.setLabel = bre;
        try {
            byte[] options = setOptions("2.5.29.19");
            if (options != null) {
                this.setFieldValue = bRv.setLabel(bNe.setElement(options));
            }
            try {
                byte[] options2 = setOptions("2.5.29.15");
                if (options2 == null) {
                    this.IconCompatParcelizer = null;
                    return;
                }
                bMG background = bMG.setBackground(bNe.setElement(options2));
                byte[] fieldValue = background.setFieldValue();
                int length = (fieldValue.length * 8) - background.setElement();
                int i = 9;
                if (length >= 9) {
                    i = length;
                }
                this.IconCompatParcelizer = new boolean[i];
                for (int i2 = 0; i2 != length; i2++) {
                    this.IconCompatParcelizer[i2] = (fieldValue[i2 / 8] & (128 >>> (i2 % 8))) != 0;
                }
            } catch (Exception e) {
                throw new CertificateParsingException("cannot construct KeyUsage: " + e);
            }
        } catch (Exception e2) {
            throw new CertificateParsingException("cannot construct BasicConstraints: " + e2);
        }
    }

    private int setBackground() {
        try {
            byte[] encoded = getEncoded();
            int i = 0;
            for (int i2 = 1; i2 < encoded.length; i2++) {
                i += encoded[i2] * i2;
            }
            return i;
        } catch (CertificateEncodingException unused) {
            return 0;
        }
    }

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

    private void setLabel(PublicKey publicKey, Signature signature) throws CertificateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException {
        if (!setLabel(this.setLabel.setOptions(), this.setLabel.RemoteActionCompatParcelizer().write())) {
            throw new CertificateException("signature algorithm in TBS cert not same as outer cert");
        }
        C0925cnn.setBackground(signature, this.setLabel.setOptions().setBackground());
        signature.initVerify(publicKey);
        signature.update(getTBSCertificate());
        if (!signature.verify(getSignature())) {
            throw new SignatureException("certificate does not verify with supplied key");
        }
    }

    private boolean setLabel(bRn brn, bRn brn2) {
        if (brn.setOptions().setLabel(brn2.setOptions())) {
            return brn.setBackground() == null ? brn2.setBackground() == null || brn2.setBackground().equals(bOc.setBackground) : brn2.setBackground() == null ? brn.setBackground() == null || brn.setBackground().equals(bOc.setBackground) : brn.setBackground().equals(brn2.setBackground());
        }
        return false;
    }

    private byte[] setOptions(String str) {
        bRO label;
        bRS label2 = this.setLabel.RemoteActionCompatParcelizer().setLabel();
        if (label2 == null || (label = label2.setLabel(new bNc(str))) == null) {
            return null;
        }
        return label.setFieldValue().setError();
    }

    @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.setLabel.setLabel().setError());
        }
        if (date.getTime() >= getNotBefore().getTime()) {
            return;
        }
        throw new CertificateNotYetValidException("certificate not valid till " + this.setLabel.read().setError());
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Certificate)) {
            return false;
        }
        try {
            return cEJ.setFieldValue(getEncoded(), ((Certificate) obj).getEncoded());
        } catch (CertificateEncodingException unused) {
            return false;
        }
    }

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

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

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

    @Override
    public List getExtendedKeyUsage() throws CertificateParsingException {
        byte[] options = setOptions("2.5.29.37");
        if (options == null) {
            return null;
        }
        try {
            bNh error = new bMV(options).setError();
            ArrayList arrayList = new ArrayList();
            for (int i = 0; i != error.IconCompatParcelizer(); i++) {
                arrayList.add(error.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) {
        bRO label;
        bRS label2 = this.setLabel.RemoteActionCompatParcelizer().setLabel();
        if (label2 == null || (label = label2.setLabel(new bNc(str))) == null) {
            return null;
        }
        try {
            return label.setFieldValue().AudioAttributesCompatParcelizer();
        } catch (Exception e) {
            throw new IllegalStateException("error parsing " + e.toString());
        }
    }

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

    @Override
    public Principal getIssuerDN() {
        return new clS(this.setLabel.setFieldValue());
    }

    @Override
    public boolean[] getIssuerUniqueID() {
        bMG options = this.setLabel.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.setLabel.setFieldValue().AudioAttributesCompatParcelizer());
        } catch (IOException unused) {
            throw new IllegalStateException("can't encode issuer DN");
        }
    }

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

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

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

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

    @Override
    public PublicKey getPublicKey() {
        try {
            return cmm.setError(this.setLabel.setElement());
        } catch (IOException unused) {
            return null;
        }
    }

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

    @Override
    public String getSigAlgName() {
        Provider provider = Security.getProvider("BC");
        if (provider != null) {
            String property = provider.getProperty("Alg.Alias.Signature." + getSigAlgOID());
            if (property != null) {
                return property;
            }
        }
        Provider[] providers = Security.getProviders();
        for (int i = 0; i != providers.length; i++) {
            String property2 = providers[i].getProperty("Alg.Alias.Signature." + getSigAlgOID());
            if (property2 != null) {
                return property2;
            }
        }
        return getSigAlgOID();
    }

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

    @Override
    public byte[] getSigAlgParams() {
        if (this.setLabel.setOptions().setBackground() == null) {
            return null;
        }
        try {
            return this.setLabel.setOptions().setBackground().AudioAttributesImplApi21Parcelizer().setOptions(bML.setFieldValue);
        } catch (IOException unused) {
            return null;
        }
    }

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

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

    @Override
    public Principal getSubjectDN() {
        return new clS(this.setLabel.write());
    }

    @Override
    public boolean[] getSubjectUniqueID() {
        bMG read = this.setLabel.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.setLabel.write().AudioAttributesCompatParcelizer());
        } catch (IOException unused) {
            throw new IllegalStateException("can't encode issuer DN");
        }
    }

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

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

    @Override
    public boolean hasUnsupportedCriticalExtension() {
        bRS label;
        if (getVersion() != 3 || (label = this.setLabel.RemoteActionCompatParcelizer().setLabel()) == null) {
            return false;
        }
        Enumeration error = label.setError();
        while (error.hasMoreElements()) {
            bNc bnc = (bNc) error.nextElement();
            String label2 = bnc.setLabel();
            if (!label2.equals(cnc.AudioAttributesImplApi26Parcelizer) && !label2.equals(cnc.setOptions) && !label2.equals(cnc.MediaMetadataCompat) && !label2.equals(cnc.write) && !label2.equals(cnc.setError) && !label2.equals(cnc.AudioAttributesImplApi21Parcelizer) && !label2.equals(cnc.setElement) && !label2.equals(cnc.MediaBrowserCompatCustomActionResultReceiver) && !label2.equals(cnc.setFieldValue) && !label2.equals(cnc.MediaBrowserCompatSearchResultReceiver) && !label2.equals(cnc.AudioAttributesCompatParcelizer) && label.setLabel(bnc).setLabel()) {
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        int i;
        synchronized (this) {
            if (!this.setBackground) {
                this.setOptions = setBackground();
                this.setBackground = true;
            }
            i = this.setOptions;
        }
        return i;
    }

    public void setBackground(bNc bnc, bMM bmm) {
        this.setError.setBackground(bnc, bmm);
    }

    public bMM setError(bNc bnc) {
        return this.setError.setError(bnc);
    }

    public Enumeration setOptions() {
        return this.setError.setOptions();
    }

    @Override
    public String toString() {
        bRv cfhVar;
        StringBuffer stringBuffer = new StringBuffer();
        String label = cFa.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);
        byte[] signature = getSignature();
        stringBuffer.append("            Signature: ");
        stringBuffer.append(new String(cFk.setOptions(signature, 0, 20)));
        stringBuffer.append(label);
        int i = 20;
        while (i < signature.length) {
            int length = signature.length;
            stringBuffer.append("                       ");
            stringBuffer.append(i < length - 20 ? new String(cFk.setOptions(signature, i, 20)) : new String(cFk.setOptions(signature, i, signature.length - i)));
            stringBuffer.append(label);
            i += 20;
        }
        bRS label2 = this.setLabel.RemoteActionCompatParcelizer().setLabel();
        if (label2 != null) {
            Enumeration error = label2.setError();
            if (error.hasMoreElements()) {
                stringBuffer.append("       Extensions: \n");
            }
            while (error.hasMoreElements()) {
                bNc bnc = (bNc) error.nextElement();
                bRO label3 = label2.setLabel(bnc);
                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(bnc.setLabel());
                        stringBuffer.append(" value = ");
                        stringBuffer.append("*****");
                    }
                    if (bnc.setLabel(bRO.IconCompatParcelizer)) {
                        cfhVar = bRv.setLabel(bmv.setError());
                    } else if (bnc.setLabel(bRO.MediaSessionCompatToken)) {
                        cfhVar = bSc.setError(bmv.setError());
                    } else if (bnc.setLabel(cfe.OnBackPressedDispatcherLifecycleOnBackPressedCancellable)) {
                        cfhVar = new cfg(bmv.setError());
                    } else if (bnc.setLabel(cfe.Nullable)) {
                        cfhVar = new cff(bmv.setError());
                    } else if (bnc.setLabel(cfe.create)) {
                        cfhVar = new cfh(bmv.setError());
                    } else {
                        stringBuffer.append(bnc.setLabel());
                        stringBuffer.append(" value = ");
                        stringBuffer.append(bQX.setBackground(bmv.setError()));
                        stringBuffer.append(label);
                    }
                    stringBuffer.append(cfhVar);
                    stringBuffer.append(label);
                }
                stringBuffer.append(label);
            }
        }
        return stringBuffer.toString();
    }

    @Override
    public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
        Signature signature;
        String fieldValue = C0925cnn.setFieldValue(this.setLabel.setOptions());
        try {
            signature = Signature.getInstance(fieldValue, "BC");
        } catch (Exception unused) {
            signature = Signature.getInstance(fieldValue);
        }
        setLabel(publicKey, signature);
    }

    @Override
    public final void verify(PublicKey publicKey, String str) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
        String fieldValue = C0925cnn.setFieldValue(this.setLabel.setOptions());
        setLabel(publicKey, str != null ? Signature.getInstance(fieldValue, str) : Signature.getInstance(fieldValue));
    }

    @Override
    public final void verify(PublicKey publicKey, Provider provider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
        String fieldValue = C0925cnn.setFieldValue(this.setLabel.setOptions());
        setLabel(publicKey, provider != null ? Signature.getInstance(fieldValue, provider) : Signature.getInstance(fieldValue));
    }
}