Beispiel #1
0
  public CMPCertificate[] getExtraCerts() {
    if (extraCerts == null) {
      return null;
    }

    CMPCertificate[] results = new CMPCertificate[extraCerts.size()];

    for (int i = 0; i < results.length; i++) {
      results[i] = CMPCertificate.getInstance(extraCerts.getObjectAt(i));
    }
    return results;
  }
Beispiel #2
0
  private PKIMessage(ASN1Sequence seq) {
    Enumeration en = seq.getObjects();

    header = PKIHeader.getInstance(en.nextElement());
    body = PKIBody.getInstance(en.nextElement());

    while (en.hasMoreElements()) {
      ASN1TaggedObject tObj = (ASN1TaggedObject) en.nextElement();

      if (tObj.getTagNo() == 0) {
        protection = DERBitString.getInstance(tObj, true);
      } else {
        extraCerts = ASN1Sequence.getInstance(tObj, true);
      }
    }
  }
Beispiel #3
0
  public static PKIMessage getInstance(Object o) {
    if (o instanceof PKIMessage) {
      return (PKIMessage) o;
    } else if (o != null) {
      return new PKIMessage(ASN1Sequence.getInstance(o));
    }

    return null;
  }
 public KeyTransRecipientInfo(ASN1Sequence seq) {
   this.version = (DERInteger) seq.getObjectAt(0);
   this.rid = RecipientIdentifier.getInstance(seq.getObjectAt(1));
   this.keyEncryptionAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(2));
   this.encryptedKey = (ASN1OctetString) seq.getObjectAt(3);
 }