public AttributeCertificate(ASN1Sequence seq) {
    if (seq.size() != 3) {
      throw new IllegalArgumentException("Bad sequence size: " + seq.size());
    }

    this.acinfo = AttributeCertificateInfo.getInstance(seq.getObjectAt(0));
    this.signatureAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
    this.signatureValue = DERBitString.getInstance(seq.getObjectAt(2));
  }
  /**
   * @param obj
   * @return an AttributeCertificate object
   */
  public static AttributeCertificate getInstance(Object obj) {
    if (obj instanceof AttributeCertificate) {
      return (AttributeCertificate) obj;
    } else if (obj != null) {
      return new AttributeCertificate(ASN1Sequence.getInstance(obj));
    }

    return null;
  }
Exemple #3
0
  public static CrlIdentifier getInstance(Object obj) {
    if (obj instanceof CrlIdentifier) {
      return (CrlIdentifier) obj;
    } else if (obj != null) {
      return new CrlIdentifier(ASN1Sequence.getInstance(obj));
    }

    return null;
  }
  public ECGOST3410ParamSetParameters(ASN1Sequence seq) {
    Enumeration e = seq.getObjects();

    a = (ASN1Integer) e.nextElement();
    b = (ASN1Integer) e.nextElement();
    p = (ASN1Integer) e.nextElement();
    q = (ASN1Integer) e.nextElement();
    x = (ASN1Integer) e.nextElement();
    y = (ASN1Integer) e.nextElement();
  }
Exemple #5
0
 private CrlIdentifier(ASN1Sequence seq) {
   if (seq.size() < 2 || seq.size() > 3) {
     throw new IllegalArgumentException();
   }
   this.crlIssuer = X500Name.getInstance(seq.getObjectAt(0));
   this.crlIssuedTime = ASN1UTCTime.getInstance(seq.getObjectAt(1));
   if (seq.size() > 2) {
     this.crlNumber = ASN1Integer.getInstance(seq.getObjectAt(2));
   }
 }
 public static ECGOST3410ParamSetParameters getInstance(ASN1TaggedObject obj, boolean explicit) {
   return getInstance(ASN1Sequence.getInstance(obj, explicit));
 }