private TimeStampTokenEvidence(ASN1Sequence seq) {
    this.timeStampAndCRLs = new TimeStampAndCRL[seq.size()];

    int count = 0;

    for (Enumeration en = seq.getObjects(); en.hasMoreElements(); ) {
      timeStampAndCRLs[count++] = TimeStampAndCRL.getInstance(en.nextElement());
    }
  }
Esempio n. 2
0
  public InfoTypeAndValue[] toInfoTypeAndValueArray() {
    InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()];

    for (int i = 0; i != result.length; i++) {
      result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i));
    }

    return result;
  }
Esempio n. 3
0
  private OOBCertHash(ASN1Sequence seq) {
    int index = seq.size() - 1;

    hashVal = DERBitString.getInstance(seq.getObjectAt(index--));

    for (int i = index; i >= 0; i--) {
      ASN1TaggedObject tObj = (ASN1TaggedObject) seq.getObjectAt(i);

      if (tObj.getTagNo() == 0) {
        hashAlg = AlgorithmIdentifier.getInstance(tObj, true);
      } else {
        certId = CertId.getInstance(tObj, true);
      }
    }
  }
Esempio n. 4
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 static TimeStampTokenEvidence getInstance(Object obj) {
    if (obj instanceof TimeStampTokenEvidence) {
      return (TimeStampTokenEvidence) obj;
    } else if (obj != null) {
      return new TimeStampTokenEvidence(ASN1Sequence.getInstance(obj));
    }

    return null;
  }
Esempio n. 6
0
  public static BasicOCSPResponse getInstance(Object obj) {
    if (obj instanceof BasicOCSPResponse) {
      return (BasicOCSPResponse) obj;
    } else if (obj != null) {
      return new BasicOCSPResponse(ASN1Sequence.getInstance(obj));
    }

    return null;
  }
 public static GOST28147Parameters ˢ(Object paramObject) {
   if ((paramObject instanceof GOST28147Parameters)) {
     return (GOST28147Parameters) paramObject;
   }
   if (paramObject != null) {
     return new GOST28147Parameters(ASN1Sequence.ﹾ(paramObject));
   }
   return null;
 }
Esempio n. 8
0
  public static CRLBag getInstance(Object o) {
    if (o instanceof CRLBag) {
      return (CRLBag) o;
    } else if (o != null) {
      return new CRLBag(ASN1Sequence.getInstance(o));
    }

    return null;
  }
Esempio n. 9
0
  public static OOBCertHash getInstance(Object o) {
    if (o instanceof OOBCertHash) {
      return (OOBCertHash) o;
    }

    if (o != null) {
      return new OOBCertHash(ASN1Sequence.getInstance(o));
    }

    return null;
  }
Esempio n. 10
0
  public static GenMsgContent getInstance(Object o) {
    if (o instanceof GenMsgContent) {
      return (GenMsgContent) o;
    }

    if (o != null) {
      return new GenMsgContent(ASN1Sequence.getInstance(o));
    }

    return null;
  }
Esempio n. 11
0
  private BasicOCSPResponse(ASN1Sequence seq) {
    this.tbsResponseData = ResponseData.getInstance(seq.getObjectAt(0));
    this.signatureAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
    this.signature = (DERBitString) seq.getObjectAt(2);

    if (seq.size() > 3) {
      this.certs = ASN1Sequence.getInstance((ASN1TaggedObject) seq.getObjectAt(3), true);
    }
  }
 public static TimeStampTokenEvidence getInstance(ASN1TaggedObject tagged, boolean explicit) {
   return getInstance(ASN1Sequence.getInstance(tagged, explicit));
 }
Esempio n. 13
0
 public static BasicOCSPResponse getInstance(ASN1TaggedObject obj, boolean explicit) {
   return getInstance(ASN1Sequence.getInstance(obj, explicit));
 }
 public GOST28147Parameters(ASN1Sequence paramASN1Sequence) {
   paramASN1Sequence = paramASN1Sequence.eT();
   this.ahD = ((ASN1OctetString) paramASN1Sequence.nextElement());
   this.ahE = ((ASN1ObjectIdentifier) paramASN1Sequence.nextElement());
 }
Esempio n. 15
0
 private CRLBag(ASN1Sequence seq) {
   this.crlId = (ASN1ObjectIdentifier) seq.getObjectAt(0);
   this.crlValue = ((DERTaggedObject) seq.getObjectAt(1)).getObject();
 }