Exemplo n.º 1
0
  @Override
  public void parse(ASN1Primitive derObject) {
    ASN1Sequence derSequence = ASN1Object.getDERSequence(derObject);

    this.endCertRevReq = new RevReq();
    this.endCertRevReq.parse(derSequence.getObjectAt(0).toASN1Primitive());

    this.caCerts = new RevReq();
    this.caCerts.parse(derSequence.getObjectAt(1).toASN1Primitive());
  }
 @Override
 public void parse(ASN1Primitive derObject) {
   ASN1Sequence derSequence = ASN1Object.getDERSequence(derObject);
   int total = derSequence.size();
   if (total > 0) {
     for (int i = 0; i < total; i++) {
       ASN1Primitive object = derSequence.getObjectAt(i).toASN1Primitive();
       if (object instanceof DERTaggedObject) {
         DERTaggedObject derTaggedObject = (DERTaggedObject) object;
         TAG tag = TAG.getTag(derTaggedObject.getTagNo());
         switch (tag) {
           case signerAlgorithmConstraints:
             this.signerAlgorithmConstraints = new AlgorithmConstraints();
             this.signerAlgorithmConstraints.parse(object);
             break;
           case eeCertAlgorithmConstraints:
             this.eeCertAlgorithmConstraints = new AlgorithmConstraints();
             this.eeCertAlgorithmConstraints.parse(object);
             break;
           case caCertAlgorithmConstraints:
             this.caCertAlgorithmConstraints = new AlgorithmConstraints();
             this.caCertAlgorithmConstraints.parse(object);
             break;
           case aaCertAlgorithmConstraints:
             this.aaCertAlgorithmConstraints = new AlgorithmConstraints();
             this.aaCertAlgorithmConstraints.parse(object);
             break;
           case tsaCertAlgorithmConstraints:
             this.tsaCertAlgorithmConstraints = new AlgorithmConstraints();
             this.tsaCertAlgorithmConstraints.parse(object);
             break;
           default:
             break;
         }
       }
     }
   }
 }