예제 #1
0
  public SignerInfo(ASN1Sequence seq) {
    Enumeration e = seq.getObjects();

    version = (ASN1Integer) e.nextElement();
    sid = SignerIdentifier.getInstance(e.nextElement());
    digAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());

    Object obj = e.nextElement();

    if (obj instanceof ASN1TaggedObject) {
      authenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject) obj, false);

      digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
    } else {
      authenticatedAttributes = null;
      digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(obj);
    }

    encryptedDigest = DEROctetString.getInstance(e.nextElement());

    if (e.hasMoreElements()) {
      unauthenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject) e.nextElement(), false);
    } else {
      unauthenticatedAttributes = null;
    }
  }
 public boolean ɨ(Object paramObject) {
   if (!(paramObject instanceof X509AttributeCertificate)) {
     return false;
   }
   paramObject = (X509AttributeCertificate) paramObject;
   if ((this.bkI != null) && (!this.bkI.equals(paramObject))) {
     return false;
   }
   if ((this.bkG != null) && (!paramObject.getSerialNumber().equals(this.bkG))) {
     return false;
   }
   if ((this.bkE != null) && (!paramObject.tv().equals(this.bkE))) {
     return false;
   }
   if ((this.bkF != null) && (!paramObject.ty().equals(this.bkF))) {
     return false;
   }
   if (this.bkH != null) {
     try {
       paramObject.checkValidity(this.bkH);
     } catch (CertificateExpiredException paramObject) {
       return false;
     } catch (CertificateNotYetValidException paramObject) {
       return false;
     }
   }
   if ((!this.bkJ.isEmpty()) || (!this.bkK.isEmpty())) {
     paramObject = paramObject.getExtensionValue(X509Extensions.aBN.getId());
     if (paramObject != null) {
       try {
         paramObject =
             TargetInformation.า(
                 new ASN1InputStream(((DEROctetString) DEROctetString.ՙ(paramObject)).eM()).eH());
       } catch (IOException paramObject) {
         return false;
       } catch (IllegalArgumentException paramObject) {
         return false;
       }
       paramObject = paramObject.jdMethod_if();
       int j;
       int i;
       Target[] arrayOfTarget;
       int m;
       int k;
       if (!this.bkJ.isEmpty()) {
         j = 0;
         i = 0;
         while (i < paramObject.length) {
           arrayOfTarget = paramObject[i].ig();
           m = 0;
           for (; ; ) {
             k = j;
             if (m >= arrayOfTarget.length) {
               break;
             }
             if (this.bkJ.contains(GeneralName.ﻳ(arrayOfTarget[m].ie()))) {
               k = 1;
               break;
             }
             m += 1;
           }
           i += 1;
           j = k;
         }
         if (j == 0) {
           return false;
         }
       }
       if (!this.bkK.isEmpty()) {
         j = 0;
         i = 0;
         while (i < paramObject.length) {
           arrayOfTarget = paramObject[i].ig();
           m = 0;
           for (; ; ) {
             k = j;
             if (m >= arrayOfTarget.length) {
               break;
             }
             if (this.bkK.contains(GeneralName.ﻳ(arrayOfTarget[m].ic()))) {
               k = 1;
               break;
             }
             m += 1;
           }
           i += 1;
           j = k;
         }
         if (j == 0) {
           return false;
         }
       }
     }
   }
   return true;
 }