RFC3281CertPathUtilities.smali
.class Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;
.super Ljava/lang/Object;
.source "RFC3281CertPathUtilities.java"
# static fields
.field private static final AUTHORITY_INFO_ACCESS:Ljava/lang/String;
.field private static final CRL_DISTRIBUTION_POINTS:Ljava/lang/String;
.field private static final NO_REV_AVAIL:Ljava/lang/String;
.field private static final TARGET_INFORMATION:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 57
sget-object v0, Lorg/spongycastle/asn1/x509/X509Extensions;->TargetInformation:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
.line 58
invoke-virtual {v0}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v0
sput-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->TARGET_INFORMATION:Ljava/lang/String;
.line 60
sget-object v0, Lorg/spongycastle/asn1/x509/X509Extensions;->NoRevAvail:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
.line 61
invoke-virtual {v0}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v0
sput-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->NO_REV_AVAIL:Ljava/lang/String;
.line 63
sget-object v0, Lorg/spongycastle/asn1/x509/X509Extensions;->CRLDistributionPoints:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
.line 64
invoke-virtual {v0}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v0
sput-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->CRL_DISTRIBUTION_POINTS:Ljava/lang/String;
.line 66
sget-object v0, Lorg/spongycastle/asn1/x509/X509Extensions;->AuthorityInfoAccess:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
.line 67
invoke-virtual {v0}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v0
sput-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->AUTHORITY_INFO_ACCESS:Ljava/lang/String;
.line 66
return-void
.end method
.method constructor <init>()V
.registers 1
.prologue
.line 54
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method protected static additionalChecks(Lorg/spongycastle/x509/X509AttributeCertificate;Ljava/util/Set;Ljava/util/Set;)V
.registers 7
.prologue
.line 304
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
.line 305
:cond_4
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_31
.line 307
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 308
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getAttributes(Ljava/lang/String;)[Lorg/spongycastle/x509/X509Attribute;
move-result-object v2
if-eqz v2, :cond_4
.line 310
new-instance v1, Ljava/security/cert/CertPathValidatorException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Attribute certificate contains prohibited attribute: "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v2, "."
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v1
.line 315
:cond_31
invoke-interface {p2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
.line 316
:cond_35
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_62
.line 318
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 319
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getAttributes(Ljava/lang/String;)[Lorg/spongycastle/x509/X509Attribute;
move-result-object v2
if-nez v2, :cond_35
.line 321
new-instance v1, Ljava/security/cert/CertPathValidatorException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Attribute certificate does not contain necessary attribute: "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v2, "."
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v1
.line 326
:cond_62
return-void
.end method
.method private static checkCRL(Lorg/spongycastle/asn1/x509/DistributionPoint;Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/util/Date;Ljava/security/cert/X509Certificate;Lorg/spongycastle/jce/provider/CertStatus;Lorg/spongycastle/jce/provider/ReasonsMask;Ljava/util/List;Lorg/spongycastle/jcajce/util/JcaJceHelper;)V
.registers 25
.prologue
.line 592
sget-object v4, Lorg/spongycastle/asn1/x509/X509Extensions;->NoRevAvail:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
invoke-virtual {v4}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v4
move-object/from16 v0, p1
invoke-interface {v0, v4}, Lorg/spongycastle/x509/X509AttributeCertificate;->getExtensionValue(Ljava/lang/String;)[B
move-result-object v4
if-eqz v4, :cond_f
.line 719
:cond_e
return-void
.line 596
:cond_f
new-instance v13, Ljava/util/Date;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
invoke-direct {v13, v4, v5}, Ljava/util/Date;-><init>(J)V
.line 597
invoke-virtual/range {p3 .. p3}, Ljava/util/Date;->getTime()J
move-result-wide v4
invoke-virtual {v13}, Ljava/util/Date;->getTime()J
move-result-wide v6
cmp-long v4, v4, v6
if-lez v4, :cond_2c
.line 599
new-instance v4, Lorg/spongycastle/jce/provider/AnnotatedException;
const-string v5, "Validation time is in future."
invoke-direct {v4, v5}, Lorg/spongycastle/jce/provider/AnnotatedException;-><init>(Ljava/lang/String;)V
throw v4
.line 610
:cond_2c
move-object/from16 v0, p0
move-object/from16 v1, p1
move-object/from16 v2, p2
invoke-static {v0, v1, v13, v2}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getCompleteCRLs(Lorg/spongycastle/asn1/x509/DistributionPoint;Ljava/lang/Object;Ljava/util/Date;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)Ljava/util/Set;
move-result-object v6
.line 612
const/4 v5, 0x0
.line 613
const/4 v4, 0x0
.line 614
invoke-interface {v6}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v14
move-object v11, v4
move v12, v5
.line 616
:cond_3e
:goto_3e
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_f4
.line 617
invoke-virtual/range {p5 .. p5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v4
const/16 v5, 0xb
if-ne v4, v5, :cond_f4
.line 618
invoke-virtual/range {p6 .. p6}, Lorg/spongycastle/jce/provider/ReasonsMask;->isAllReasons()Z
move-result v4
if-nez v4, :cond_f4
.line 622
:try_start_52
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/security/cert/X509CRL;
.line 626
move-object/from16 v0, p0
invoke-static {v4, v0}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLD(Ljava/security/cert/X509CRL;Lorg/spongycastle/asn1/x509/DistributionPoint;)Lorg/spongycastle/jce/provider/ReasonsMask;
move-result-object v15
.line 634
move-object/from16 v0, p6
invoke-virtual {v15, v0}, Lorg/spongycastle/jce/provider/ReasonsMask;->hasNewReasons(Lorg/spongycastle/jce/provider/ReasonsMask;)Z
move-result v5
if-eqz v5, :cond_3e
.line 640
const/4 v6, 0x0
const/4 v7, 0x0
move-object/from16 v5, p1
move-object/from16 v8, p2
move-object/from16 v9, p7
move-object/from16 v10, p8
invoke-static/range {v4 .. v10}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLF(Ljava/security/cert/X509CRL;Ljava/lang/Object;Ljava/security/cert/X509Certificate;Ljava/security/PublicKey;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/util/List;Lorg/spongycastle/jcajce/util/JcaJceHelper;)Ljava/util/Set;
move-result-object v5
.line 642
invoke-static {v4, v5}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLG(Ljava/security/cert/X509CRL;Ljava/util/Set;)Ljava/security/PublicKey;
move-result-object v6
.line 644
const/4 v5, 0x0
.line 646
invoke-virtual/range {p2 .. p2}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->isUseDeltasEnabled()Z
move-result v7
if-eqz v7, :cond_8f
.line 649
invoke-virtual/range {p2 .. p2}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getCertStores()Ljava/util/List;
move-result-object v5
invoke-virtual/range {p2 .. p2}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getCRLStores()Ljava/util/List;
move-result-object v7
invoke-static {v13, v4, v5, v7}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getDeltaCRLs(Ljava/util/Date;Ljava/security/cert/X509CRL;Ljava/util/List;Ljava/util/List;)Ljava/util/Set;
move-result-object v5
.line 652
invoke-static {v5, v6}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLH(Ljava/util/Set;Ljava/security/PublicKey;)Ljava/security/cert/X509CRL;
move-result-object v5
.line 669
:cond_8f
invoke-virtual/range {p2 .. p2}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getValidityModel()I
move-result v6
const/4 v7, 0x1
if-eq v6, v7, :cond_b5
.line 676
invoke-interface/range {p1 .. p1}, Lorg/spongycastle/x509/X509AttributeCertificate;->getNotAfter()Ljava/util/Date;
move-result-object v6
invoke-virtual {v6}, Ljava/util/Date;->getTime()J
move-result-wide v6
invoke-virtual {v4}, Ljava/security/cert/X509CRL;->getThisUpdate()Ljava/util/Date;
move-result-object v8
.line 677
invoke-virtual {v8}, Ljava/util/Date;->getTime()J
move-result-wide v8
cmp-long v6, v6, v8
if-gez v6, :cond_b5
.line 679
new-instance v4, Lorg/spongycastle/jce/provider/AnnotatedException;
const-string v5, "No valid CRL for current time found."
invoke-direct {v4, v5}, Lorg/spongycastle/jce/provider/AnnotatedException;-><init>(Ljava/lang/String;)V
throw v4
.line 712
:catch_b2
move-exception v4
move-object v11, v4
.line 713
goto :goto_3e
.line 684
:cond_b5
move-object/from16 v0, p0
move-object/from16 v1, p1
invoke-static {v0, v1, v4}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLB1(Lorg/spongycastle/asn1/x509/DistributionPoint;Ljava/lang/Object;Ljava/security/cert/X509CRL;)V
.line 687
move-object/from16 v0, p0
move-object/from16 v1, p1
invoke-static {v0, v1, v4}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLB2(Lorg/spongycastle/asn1/x509/DistributionPoint;Ljava/lang/Object;Ljava/security/cert/X509CRL;)V
.line 690
move-object/from16 v0, p2
invoke-static {v5, v4, v0}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLC(Ljava/security/cert/X509CRL;Ljava/security/cert/X509CRL;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.line 693
move-object/from16 v0, p3
move-object/from16 v1, p1
move-object/from16 v2, p5
move-object/from16 v3, p2
invoke-static {v0, v5, v1, v2, v3}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLI(Ljava/util/Date;Ljava/security/cert/X509CRL;Ljava/lang/Object;Lorg/spongycastle/jce/provider/CertStatus;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.line 697
move-object/from16 v0, p3
move-object/from16 v1, p1
move-object/from16 v2, p5
invoke-static {v0, v4, v1, v2}, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->processCRLJ(Ljava/util/Date;Ljava/security/cert/X509CRL;Ljava/lang/Object;Lorg/spongycastle/jce/provider/CertStatus;)V
.line 701
invoke-virtual/range {p5 .. p5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v4
const/16 v5, 0x8
if-ne v4, v5, :cond_eb
.line 703
const/16 v4, 0xb
move-object/from16 v0, p5
invoke-virtual {v0, v4}, Lorg/spongycastle/jce/provider/CertStatus;->setCertStatus(I)V
.line 707
:cond_eb
move-object/from16 v0, p6
invoke-virtual {v0, v15}, Lorg/spongycastle/jce/provider/ReasonsMask;->addReasons(Lorg/spongycastle/jce/provider/ReasonsMask;)V
:try_end_f0
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_52 .. :try_end_f0} :catch_b2
.line 708
const/4 v4, 0x1
move v12, v4
.line 713
goto/16 :goto_3e
.line 715
:cond_f4
if-nez v12, :cond_e
.line 717
throw v11
.end method
.method protected static checkCRLs(Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/security/cert/X509Certificate;Ljava/util/Date;Ljava/util/List;Lorg/spongycastle/jcajce/util/JcaJceHelper;)V
.registers 20
.prologue
.line 134
invoke-virtual {p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->isRevocationEnabled()Z
move-result v0
if-eqz v0, :cond_190
.line 137
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->NO_REV_AVAIL:Ljava/lang/String;
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getExtensionValue(Ljava/lang/String;)[B
move-result-object v0
if-nez v0, :cond_178
.line 142
:try_start_e
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->CRL_DISTRIBUTION_POINTS:Ljava/lang/String;
.line 143
invoke-static {p0, v0}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getExtensionValue(Ljava/security/cert/X509Extension;Ljava/lang/String;)Lorg/spongycastle/asn1/ASN1Primitive;
move-result-object v0
.line 142
invoke-static {v0}, Lorg/spongycastle/asn1/x509/CRLDistPoint;->getInstance(Ljava/lang/Object;)Lorg/spongycastle/asn1/x509/CRLDistPoint;
:try_end_17
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_e .. :try_end_17} :catch_3e
move-result-object v2
.line 152
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 156
:try_start_1d
invoke-virtual {p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getNamedCRLStoreMap()Ljava/util/Map;
move-result-object v0
invoke-static {v2, v0}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getAdditionalStoresFromCRLDistributionPoint(Lorg/spongycastle/asn1/x509/CRLDistPoint;Ljava/util/Map;)Ljava/util/List;
move-result-object v0
invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
:try_end_28
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_1d .. :try_end_28} :catch_47
.line 165
new-instance v3, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;
invoke-direct {v3, p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;-><init>(Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.line 167
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v4
:goto_31
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_50
move-object v0, v1
.line 169
check-cast v0, Lorg/spongycastle/jcajce/PKIXCRLStore;
invoke-virtual {v3, v0}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;->addCRLStore(Lorg/spongycastle/jcajce/PKIXCRLStore;)Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;
goto :goto_31
.line 145
:catch_3e
move-exception v0
.line 147
new-instance v1, Ljava/security/cert/CertPathValidatorException;
const-string v2, "CRL distribution point extension could not be read."
invoke-direct {v1, v2, v0}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 158
:catch_47
move-exception v0
.line 160
new-instance v1, Ljava/security/cert/CertPathValidatorException;
const-string v2, "No additional CRL locations could be decoded from CRL distribution point extension."
invoke-direct {v1, v2, v0}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 172
:cond_50
invoke-virtual {v3}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;->build()Lorg/spongycastle/jcajce/PKIXExtendedParameters;
move-result-object v12
.line 174
new-instance v5, Lorg/spongycastle/jce/provider/CertStatus;
invoke-direct {v5}, Lorg/spongycastle/jce/provider/CertStatus;-><init>()V
.line 175
new-instance v6, Lorg/spongycastle/jce/provider/ReasonsMask;
invoke-direct {v6}, Lorg/spongycastle/jce/provider/ReasonsMask;-><init>()V
.line 177
const/4 v10, 0x0
.line 178
const/4 v0, 0x0
.line 180
if-eqz v2, :cond_191
.line 185
:try_start_62
invoke-virtual {v2}, Lorg/spongycastle/asn1/x509/CRLDistPoint;->getDistributionPoints()[Lorg/spongycastle/asn1/x509/DistributionPoint;
:try_end_65
.catch Ljava/lang/Exception; {:try_start_62 .. :try_end_65} :catch_93
move-result-object v13
.line 194
const/4 v1, 0x0
move v11, v1
move v9, v0
.line 196
:goto_69
:try_start_69
array-length v0, v13
if-ge v11, v0, :cond_a6
.line 195
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v0
const/16 v1, 0xb
if-ne v0, v1, :cond_a6
.line 196
invoke-virtual {v6}, Lorg/spongycastle/jce/provider/ReasonsMask;->isAllReasons()Z
move-result v0
if-nez v0, :cond_a6
.line 199
invoke-virtual {v12}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->clone()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lorg/spongycastle/jcajce/PKIXExtendedParameters;
.line 201
aget-object v0, v13, v11
move-object v1, p0
move-object/from16 v3, p3
move-object/from16 v4, p2
move-object/from16 v7, p4
move-object/from16 v8, p5
invoke-static/range {v0 .. v8}, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->checkCRL(Lorg/spongycastle/asn1/x509/DistributionPoint;Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/util/Date;Ljava/security/cert/X509Certificate;Lorg/spongycastle/jce/provider/CertStatus;Lorg/spongycastle/jce/provider/ReasonsMask;Ljava/util/List;Lorg/spongycastle/jcajce/util/JcaJceHelper;)V
:try_end_8e
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_69 .. :try_end_8e} :catch_9c
.line 204
const/4 v9, 0x1
.line 196
add-int/lit8 v0, v11, 0x1
move v11, v0
goto :goto_69
.line 187
:catch_93
move-exception v0
.line 189
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Distribution points could not be read."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 207
:catch_9c
move-exception v0
move-object v1, v0
.line 209
new-instance v0, Lorg/spongycastle/jce/provider/AnnotatedException;
const-string v2, "No valid CRL for distribution point found."
invoke-direct {v0, v2, v1}, Lorg/spongycastle/jce/provider/AnnotatedException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
move-object v10, v0
.line 220
:cond_a6
:goto_a6
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v0
const/16 v1, 0xb
if-ne v0, v1, :cond_f9
.line 221
invoke-virtual {v6}, Lorg/spongycastle/jce/provider/ReasonsMask;->isAllReasons()Z
move-result v0
if-nez v0, :cond_f9
.line 234
:try_start_b4
new-instance v1, Lorg/spongycastle/asn1/ASN1InputStream;
.line 235
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getIssuer()Lorg/spongycastle/x509/AttributeCertificateIssuer;
move-result-object v0
.line 236
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateIssuer;->getPrincipals()[Ljava/security/Principal;
move-result-object v0
const/4 v2, 0x0
aget-object v0, v0, v2
check-cast v0, Ljavax/security/auth/x500/X500Principal;
invoke-virtual {v0}, Ljavax/security/auth/x500/X500Principal;->getEncoded()[B
move-result-object v0
invoke-direct {v1, v0}, Lorg/spongycastle/asn1/ASN1InputStream;-><init>([B)V
.line 237
invoke-virtual {v1}, Lorg/spongycastle/asn1/ASN1InputStream;->readObject()Lorg/spongycastle/asn1/ASN1Primitive;
:try_end_cd
.catch Ljava/lang/Exception; {:try_start_b4 .. :try_end_cd} :catch_103
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_b4 .. :try_end_cd} :catch_10c
move-result-object v1
.line 245
:try_start_ce
new-instance v0, Lorg/spongycastle/asn1/x509/DistributionPoint;
new-instance v2, Lorg/spongycastle/asn1/x509/DistributionPointName;
const/4 v3, 0x0
new-instance v4, Lorg/spongycastle/asn1/x509/GeneralNames;
new-instance v7, Lorg/spongycastle/asn1/x509/GeneralName;
const/4 v8, 0x4
invoke-direct {v7, v8, v1}, Lorg/spongycastle/asn1/x509/GeneralName;-><init>(ILorg/spongycastle/asn1/ASN1Encodable;)V
invoke-direct {v4, v7}, Lorg/spongycastle/asn1/x509/GeneralNames;-><init>(Lorg/spongycastle/asn1/x509/GeneralName;)V
invoke-direct {v2, v3, v4}, Lorg/spongycastle/asn1/x509/DistributionPointName;-><init>(ILorg/spongycastle/asn1/ASN1Encodable;)V
const/4 v1, 0x0
const/4 v3, 0x0
invoke-direct {v0, v2, v1, v3}, Lorg/spongycastle/asn1/x509/DistributionPoint;-><init>(Lorg/spongycastle/asn1/x509/DistributionPointName;Lorg/spongycastle/asn1/x509/ReasonFlags;Lorg/spongycastle/asn1/x509/GeneralNames;)V
.line 250
invoke-virtual {v12}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->clone()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lorg/spongycastle/jcajce/PKIXExtendedParameters;
move-object v1, p0
move-object/from16 v3, p3
move-object/from16 v4, p2
move-object/from16 v7, p4
move-object/from16 v8, p5
.line 251
invoke-static/range {v0 .. v8}, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->checkCRL(Lorg/spongycastle/asn1/x509/DistributionPoint;Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/util/Date;Ljava/security/cert/X509Certificate;Lorg/spongycastle/jce/provider/CertStatus;Lorg/spongycastle/jce/provider/ReasonsMask;Ljava/util/List;Lorg/spongycastle/jcajce/util/JcaJceHelper;)V
:try_end_f8
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_ce .. :try_end_f8} :catch_10c
.line 253
const/4 v9, 0x1
.line 262
:cond_f9
:goto_f9
if-nez v9, :cond_115
.line 264
new-instance v0, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v1, "No valid CRL found."
invoke-direct {v0, v1, v10}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
.line 239
:catch_103
move-exception v0
.line 241
:try_start_104
new-instance v1, Lorg/spongycastle/jce/provider/AnnotatedException;
const-string v2, "Issuer from certificate for CRL could not be reencoded."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/provider/AnnotatedException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:try_end_10c
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_104 .. :try_end_10c} :catch_10c
.line 255
:catch_10c
move-exception v0
.line 257
new-instance v10, Lorg/spongycastle/jce/provider/AnnotatedException;
const-string v1, "No valid CRL for distribution point found."
invoke-direct {v10, v1, v0}, Lorg/spongycastle/jce/provider/AnnotatedException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_f9
.line 267
:cond_115
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v0
const/16 v1, 0xb
if-eq v0, v1, :cond_155
.line 269
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Attribute certificate revocation after "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 270
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getRevocationDate()Ljava/util/Date;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 271
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ", reason: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v1, Lorg/spongycastle/jce/provider/RFC3280CertPathUtilities;->crlReasons:[Ljava/lang/String;
.line 273
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v2
aget-object v1, v1, v2
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 274
new-instance v1, Ljava/security/cert/CertPathValidatorException;
invoke-direct {v1, v0}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v1
.line 276
:cond_155
invoke-virtual {v6}, Lorg/spongycastle/jce/provider/ReasonsMask;->isAllReasons()Z
move-result v0
if-nez v0, :cond_168
.line 277
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v0
const/16 v1, 0xb
if-ne v0, v1, :cond_168
.line 279
const/16 v0, 0xc
invoke-virtual {v5, v0}, Lorg/spongycastle/jce/provider/CertStatus;->setCertStatus(I)V
.line 281
:cond_168
invoke-virtual {v5}, Lorg/spongycastle/jce/provider/CertStatus;->getCertStatus()I
move-result v0
const/16 v1, 0xc
if-ne v0, v1, :cond_190
.line 283
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Attribute certificate status could not be determined."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 290
:cond_178
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->CRL_DISTRIBUTION_POINTS:Ljava/lang/String;
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getExtensionValue(Ljava/lang/String;)[B
move-result-object v0
if-nez v0, :cond_188
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->AUTHORITY_INFO_ACCESS:Ljava/lang/String;
.line 291
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getExtensionValue(Ljava/lang/String;)[B
move-result-object v0
if-eqz v0, :cond_190
.line 293
:cond_188
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "No rev avail extension is set, but also an AC revocation pointer."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 298
:cond_190
return-void
:cond_191
move v9, v0
goto/16 :goto_a6
.end method
.method protected static processAttrCert1(Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)Ljava/security/cert/CertPath;
.registers 10
.prologue
const/4 v3, 0x0
const/4 v2, 0x0
.line 443
.line 445
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 446
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getHolder()Lorg/spongycastle/x509/AttributeCertificateHolder;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateHolder;->getIssuer()[Ljava/security/Principal;
move-result-object v0
if-eqz v0, :cond_76
.line 448
new-instance v5, Ljava/security/cert/X509CertSelector;
invoke-direct {v5}, Ljava/security/cert/X509CertSelector;-><init>()V
.line 449
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getHolder()Lorg/spongycastle/x509/AttributeCertificateHolder;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateHolder;->getSerialNumber()Ljava/math/BigInteger;
move-result-object v0
invoke-virtual {v5, v0}, Ljava/security/cert/X509CertSelector;->setSerialNumber(Ljava/math/BigInteger;)V
.line 450
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getHolder()Lorg/spongycastle/x509/AttributeCertificateHolder;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateHolder;->getIssuer()[Ljava/security/Principal;
move-result-object v6
move v1, v2
.line 451
:goto_2a
array-length v0, v6
if-ge v1, v0, :cond_68
.line 455
:try_start_2d
aget-object v0, v6, v1
instance-of v0, v0, Ljavax/security/auth/x500/X500Principal;
if-eqz v0, :cond_3e
.line 457
aget-object v0, v6, v1
check-cast v0, Ljavax/security/auth/x500/X500Principal;
.line 458
invoke-virtual {v0}, Ljavax/security/auth/x500/X500Principal;->getEncoded()[B
move-result-object v0
.line 457
invoke-virtual {v5, v0}, Ljava/security/cert/X509CertSelector;->setIssuer([B)V
.line 460
:cond_3e
new-instance v0, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;
invoke-direct {v0, v5}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;-><init>(Ljava/security/cert/CertSelector;)V
.line 461
invoke-virtual {v0}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;->build()Lorg/spongycastle/jcajce/PKIXCertStoreSelector;
move-result-object v0
invoke-virtual {p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getCertStores()Ljava/util/List;
move-result-object v7
invoke-static {v0, v7}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->findCertificates(Lorg/spongycastle/jcajce/PKIXCertStoreSelector;Ljava/util/List;)Ljava/util/Collection;
move-result-object v0
.line 460
invoke-interface {v4, v0}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z
:try_end_52
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_2d .. :try_end_52} :catch_56
.catch Ljava/io/IOException; {:try_start_2d .. :try_end_52} :catch_5f
.line 451
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_2a
.line 463
:catch_56
move-exception v0
.line 465
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Public key certificate for attribute certificate cannot be searched."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 469
:catch_5f
move-exception v0
.line 471
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Unable to encode X500 principal."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 475
:cond_68
invoke-interface {v4}, Ljava/util/Set;->isEmpty()Z
move-result v0
if-eqz v0, :cond_76
.line 477
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Public key certificate specified in base certificate ID for attribute certificate cannot be found."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 481
:cond_76
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getHolder()Lorg/spongycastle/x509/AttributeCertificateHolder;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateHolder;->getEntityNames()[Ljava/security/Principal;
move-result-object v0
if-eqz v0, :cond_d8
.line 483
new-instance v1, Lorg/spongycastle/x509/X509CertStoreSelector;
invoke-direct {v1}, Lorg/spongycastle/x509/X509CertStoreSelector;-><init>()V
.line 484
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getHolder()Lorg/spongycastle/x509/AttributeCertificateHolder;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/x509/AttributeCertificateHolder;->getEntityNames()[Ljava/security/Principal;
move-result-object v5
.line 485
:goto_8d
array-length v0, v5
if-ge v2, v0, :cond_ca
.line 489
:try_start_90
aget-object v0, v5, v2
instance-of v0, v0, Ljavax/security/auth/x500/X500Principal;
if-eqz v0, :cond_a1
.line 491
aget-object v0, v5, v2
check-cast v0, Ljavax/security/auth/x500/X500Principal;
.line 492
invoke-virtual {v0}, Ljavax/security/auth/x500/X500Principal;->getEncoded()[B
move-result-object v0
.line 491
invoke-virtual {v1, v0}, Lorg/spongycastle/x509/X509CertStoreSelector;->setIssuer([B)V
.line 494
:cond_a1
new-instance v0, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;
invoke-direct {v0, v1}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;-><init>(Ljava/security/cert/CertSelector;)V
.line 495
invoke-virtual {v0}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;->build()Lorg/spongycastle/jcajce/PKIXCertStoreSelector;
move-result-object v0
invoke-virtual {p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters;->getCertStores()Ljava/util/List;
move-result-object v6
invoke-static {v0, v6}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->findCertificates(Lorg/spongycastle/jcajce/PKIXCertStoreSelector;Ljava/util/List;)Ljava/util/Collection;
move-result-object v0
.line 494
invoke-interface {v4, v0}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z
:try_end_b5
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_90 .. :try_end_b5} :catch_b8
.catch Ljava/io/IOException; {:try_start_90 .. :try_end_b5} :catch_c1
.line 485
add-int/lit8 v2, v2, 0x1
goto :goto_8d
.line 497
:catch_b8
move-exception v0
.line 499
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Public key certificate for attribute certificate cannot be searched."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 503
:catch_c1
move-exception v0
.line 505
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Unable to encode X500 principal."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 509
:cond_ca
invoke-interface {v4}, Ljava/util/Set;->isEmpty()Z
move-result v0
if-eqz v0, :cond_d8
.line 511
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Public key certificate specified in entity name for attribute certificate cannot be found."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 516
:cond_d8
new-instance v2, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;
invoke-direct {v2, p1}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;-><init>(Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.line 519
invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v4
move-object v1, v3
:goto_e2
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_144
.line 521
new-instance v5, Lorg/spongycastle/x509/X509CertStoreSelector;
invoke-direct {v5}, Lorg/spongycastle/x509/X509CertStoreSelector;-><init>()V
.line 522
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/security/cert/X509Certificate;
invoke-virtual {v5, v0}, Lorg/spongycastle/x509/X509CertStoreSelector;->setCertificate(Ljava/security/cert/X509Certificate;)V
.line 523
new-instance v0, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;
invoke-direct {v0, v5}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;-><init>(Ljava/security/cert/CertSelector;)V
invoke-virtual {v0}, Lorg/spongycastle/jcajce/PKIXCertStoreSelector$Builder;->build()Lorg/spongycastle/jcajce/PKIXCertStoreSelector;
move-result-object v0
invoke-virtual {v2, v0}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;->setTargetConstraints(Lorg/spongycastle/jcajce/PKIXCertStoreSelector;)Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;
.line 527
:try_start_102
const-string v0, "PKIX"
const-string v5, "SC"
invoke-static {v0, v5}, Ljava/security/cert/CertPathBuilder;->getInstance(Ljava/lang/String;Ljava/lang/String;)Ljava/security/cert/CertPathBuilder;
:try_end_109
.catch Ljava/security/NoSuchProviderException; {:try_start_102 .. :try_end_109} :catch_11c
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_102 .. :try_end_109} :catch_125
move-result-object v0
.line 541
:try_start_10a
new-instance v5, Lorg/spongycastle/jcajce/PKIXExtendedBuilderParameters$Builder;
invoke-virtual {v2}, Lorg/spongycastle/jcajce/PKIXExtendedParameters$Builder;->build()Lorg/spongycastle/jcajce/PKIXExtendedParameters;
move-result-object v6
invoke-direct {v5, v6}, Lorg/spongycastle/jcajce/PKIXExtendedBuilderParameters$Builder;-><init>(Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
invoke-virtual {v5}, Lorg/spongycastle/jcajce/PKIXExtendedBuilderParameters$Builder;->build()Lorg/spongycastle/jcajce/PKIXExtendedBuilderParameters;
move-result-object v5
invoke-virtual {v0, v5}, Ljava/security/cert/CertPathBuilder;->build(Ljava/security/cert/CertPathParameters;)Ljava/security/cert/CertPathBuilderResult;
:try_end_11a
.catch Ljava/security/cert/CertPathBuilderException; {:try_start_10a .. :try_end_11a} :catch_12e
.catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_10a .. :try_end_11a} :catch_139
move-result-object v3
goto :goto_e2
.line 529
:catch_11c
move-exception v0
.line 531
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Support class could not be created."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 534
:catch_125
move-exception v0
.line 536
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Support class could not be created."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 543
:catch_12e
move-exception v0
move-object v1, v0
.line 545
new-instance v0, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v5, "Certification path for public key certificate of attribute certificate could not be build."
invoke-direct {v0, v5, v1}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
move-object v1, v0
.line 553
goto :goto_e2
.line 549
:catch_139
move-exception v0
.line 552
new-instance v1, Ljava/lang/RuntimeException;
invoke-virtual {v0}, Ljava/security/InvalidAlgorithmParameterException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v1
.line 555
:cond_144
if-eqz v1, :cond_147
.line 557
throw v1
.line 559
:cond_147
invoke-interface {v3}, Ljava/security/cert/CertPathBuilderResult;->getCertPath()Ljava/security/cert/CertPath;
move-result-object v0
return-object v0
.end method
.method protected static processAttrCert2(Ljava/security/cert/CertPath;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)Ljava/security/cert/CertPathValidatorResult;
.registers 5
.prologue
.line 393
:try_start_0
const-string v0, "PKIX"
const-string v1, "SC"
invoke-static {v0, v1}, Ljava/security/cert/CertPathValidator;->getInstance(Ljava/lang/String;Ljava/lang/String;)Ljava/security/cert/CertPathValidator;
:try_end_7
.catch Ljava/security/NoSuchProviderException; {:try_start_0 .. :try_end_7} :catch_d
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_7} :catch_16
move-result-object v0
.line 407
:try_start_8
invoke-virtual {v0, p0, p1}, Ljava/security/cert/CertPathValidator;->validate(Ljava/security/cert/CertPath;Ljava/security/cert/CertPathParameters;)Ljava/security/cert/CertPathValidatorResult;
:try_end_b
.catch Ljava/security/cert/CertPathValidatorException; {:try_start_8 .. :try_end_b} :catch_1f
.catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_8 .. :try_end_b} :catch_28
move-result-object v0
return-object v0
.line 395
:catch_d
move-exception v0
.line 397
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Support class could not be created."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 400
:catch_16
move-exception v0
.line 402
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Support class could not be created."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 409
:catch_1f
move-exception v0
.line 411
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Certification path for issuer certificate of attribute certificate could not be validated."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 415
:catch_28
move-exception v0
.line 418
new-instance v1, Ljava/lang/RuntimeException;
invoke-virtual {v0}, Ljava/security/InvalidAlgorithmParameterException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method protected static processAttrCert3(Ljava/security/cert/X509Certificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.registers 4
.prologue
.line 373
invoke-virtual {p0}, Ljava/security/cert/X509Certificate;->getKeyUsage()[Z
move-result-object v0
if-eqz v0, :cond_20
.line 374
invoke-virtual {p0}, Ljava/security/cert/X509Certificate;->getKeyUsage()[Z
move-result-object v0
const/4 v1, 0x0
aget-boolean v0, v0, v1
if-nez v0, :cond_20
invoke-virtual {p0}, Ljava/security/cert/X509Certificate;->getKeyUsage()[Z
move-result-object v0
const/4 v1, 0x1
aget-boolean v0, v0, v1
if-nez v0, :cond_20
.line 376
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Attribute certificate issuer public key cannot be used to validate digital signatures."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 379
:cond_20
invoke-virtual {p0}, Ljava/security/cert/X509Certificate;->getBasicConstraints()I
move-result v0
const/4 v1, -0x1
if-eq v0, v1, :cond_2f
.line 381
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Attribute certificate issuer is also a public key certificate issuer."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 384
:cond_2f
return-void
.end method
.method protected static processAttrCert4(Ljava/security/cert/X509Certificate;Ljava/util/Set;)V
.registers 7
.prologue
.line 352
const/4 v0, 0x0
.line 353
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
move v1, v0
:goto_6
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_33
.line 355
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/security/cert/TrustAnchor;
.line 356
invoke-virtual {p0}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
move-result-object v3
const-string v4, "RFC2253"
invoke-virtual {v3, v4}, Ljavax/security/auth/x500/X500Principal;->getName(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
.line 357
invoke-virtual {v0}, Ljava/security/cert/TrustAnchor;->getCAName()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_30
.line 358
invoke-virtual {v0}, Ljava/security/cert/TrustAnchor;->getTrustedCert()Ljava/security/cert/X509Certificate;
move-result-object v0
invoke-virtual {p0, v0}, Ljava/security/cert/X509Certificate;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3e
.line 360
:cond_30
const/4 v0, 0x1
:goto_31
move v1, v0
.line 362
goto :goto_6
.line 363
:cond_33
if-nez v1, :cond_3d
.line 365
new-instance v0, Ljava/security/cert/CertPathValidatorException;
const-string v1, "Attribute certificate issuer is not directly trusted."
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 368
:cond_3d
return-void
:cond_3e
move v0, v1
goto :goto_31
.end method
.method protected static processAttrCert5(Lorg/spongycastle/x509/X509AttributeCertificate;Lorg/spongycastle/jcajce/PKIXExtendedParameters;)V
.registers 5
.prologue
.line 333
.line 334
:try_start_0
invoke-static {p1}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getValidDate(Lorg/spongycastle/jcajce/PKIXExtendedParameters;)Ljava/util/Date;
move-result-object v0
.line 333
invoke-interface {p0, v0}, Lorg/spongycastle/x509/X509AttributeCertificate;->checkValidity(Ljava/util/Date;)V
:try_end_7
.catch Ljava/security/cert/CertificateExpiredException; {:try_start_0 .. :try_end_7} :catch_8
.catch Ljava/security/cert/CertificateNotYetValidException; {:try_start_0 .. :try_end_7} :catch_11
.line 345
return-void
.line 336
:catch_8
move-exception v0
.line 338
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Attribute certificate is not valid."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 341
:catch_11
move-exception v0
.line 343
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Attribute certificate is not valid."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.end method
.method protected static processAttrCert7(Lorg/spongycastle/x509/X509AttributeCertificate;Ljava/security/cert/CertPath;Ljava/security/cert/CertPath;Lorg/spongycastle/jcajce/PKIXExtendedParameters;Ljava/util/Set;)V
.registers 9
.prologue
.line 77
invoke-interface {p0}, Lorg/spongycastle/x509/X509AttributeCertificate;->getCriticalExtensionOIDs()Ljava/util/Set;
move-result-object v1
.line 82
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->TARGET_INFORMATION:Ljava/lang/String;
invoke-interface {v1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_15
.line 86
:try_start_c
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->TARGET_INFORMATION:Ljava/lang/String;
.line 87
invoke-static {p0, v0}, Lorg/spongycastle/jce/provider/CertPathValidatorUtilities;->getExtensionValue(Ljava/security/cert/X509Extension;Ljava/lang/String;)Lorg/spongycastle/asn1/ASN1Primitive;
move-result-object v0
.line 86
invoke-static {v0}, Lorg/spongycastle/asn1/x509/TargetInformation;->getInstance(Ljava/lang/Object;)Lorg/spongycastle/asn1/x509/TargetInformation;
:try_end_15
.catch Lorg/spongycastle/jce/provider/AnnotatedException; {:try_start_c .. :try_end_15} :catch_2e
.catch Ljava/lang/IllegalArgumentException; {:try_start_c .. :try_end_15} :catch_37
.line 100
:cond_15
sget-object v0, Lorg/spongycastle/jce/provider/RFC3281CertPathUtilities;->TARGET_INFORMATION:Ljava/lang/String;
invoke-interface {v1, v0}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
.line 101
invoke-interface {p4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
.line 102
:goto_1e
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_40
.line 104
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lorg/spongycastle/x509/PKIXAttrCertChecker;
invoke-virtual {v0, p0, p1, p2, v1}, Lorg/spongycastle/x509/PKIXAttrCertChecker;->check(Lorg/spongycastle/x509/X509AttributeCertificate;Ljava/security/cert/CertPath;Ljava/security/cert/CertPath;Ljava/util/Collection;)V
goto :goto_1e
.line 89
:catch_2e
move-exception v0
.line 91
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Target information extension could not be read."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 94
:catch_37
move-exception v0
.line 96
new-instance v1, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;
const-string v2, "Target information extension could not be read."
invoke-direct {v1, v2, v0}, Lorg/spongycastle/jce/exception/ExtCertPathValidatorException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.line 107
:cond_40
invoke-interface {v1}, Ljava/util/Set;->isEmpty()Z
move-result v0
if-nez v0, :cond_5b
.line 109
new-instance v0, Ljava/security/cert/CertPathValidatorException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Attribute certificate contains unsupported critical extensions: "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/security/cert/CertPathValidatorException;-><init>(Ljava/lang/String;)V
throw v0
.line 113
:cond_5b
return-void
.end method