コード例 #1
0
  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());
    }
  }
コード例 #2
0
ファイル: GenMsgContent.java プロジェクト: playerdrafter/oobd
  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;
  }
コード例 #3
0
ファイル: OOBCertHash.java プロジェクト: playerdrafter/oobd
  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);
      }
    }
  }
コード例 #4
0
ファイル: SignerInfo.java プロジェクト: playerdrafter/oobd
  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;
    }
  }
コード例 #5
0
  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;
  }
コード例 #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;
  }
コード例 #7
0
 public static GOST28147Parameters ˢ(Object paramObject) {
   if ((paramObject instanceof GOST28147Parameters)) {
     return (GOST28147Parameters) paramObject;
   }
   if (paramObject != null) {
     return new GOST28147Parameters(ASN1Sequence.ﹾ(paramObject));
   }
   return null;
 }
コード例 #8
0
ファイル: CRLBag.java プロジェクト: playerdrafter/oobd
  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;
  }
コード例 #9
0
ファイル: OOBCertHash.java プロジェクト: playerdrafter/oobd
  public static OOBCertHash getInstance(Object o) {
    if (o instanceof OOBCertHash) {
      return (OOBCertHash) o;
    }

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

    return null;
  }
コード例 #10
0
ファイル: GenMsgContent.java プロジェクト: playerdrafter/oobd
  public static GenMsgContent getInstance(Object o) {
    if (o instanceof GenMsgContent) {
      return (GenMsgContent) o;
    }

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

    return null;
  }
コード例 #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);
    }
  }
コード例 #12
0
 public static TimeStampTokenEvidence getInstance(ASN1TaggedObject tagged, boolean explicit) {
   return getInstance(ASN1Sequence.getInstance(tagged, explicit));
 }
コード例 #13
0
 public static BasicOCSPResponse getInstance(ASN1TaggedObject obj, boolean explicit) {
   return getInstance(ASN1Sequence.getInstance(obj, explicit));
 }
コード例 #14
0
 public GOST28147Parameters(ASN1Sequence paramASN1Sequence) {
   paramASN1Sequence = paramASN1Sequence.eT();
   this.ahD = ((ASN1OctetString) paramASN1Sequence.nextElement());
   this.ahE = ((ASN1ObjectIdentifier) paramASN1Sequence.nextElement());
 }
コード例 #15
0
ファイル: CRLBag.java プロジェクト: playerdrafter/oobd
 private CRLBag(ASN1Sequence seq) {
   this.crlId = (ASN1ObjectIdentifier) seq.getObjectAt(0);
   this.crlValue = ((DERTaggedObject) seq.getObjectAt(1)).getObject();
 }