public X509CertificateStructure(ASN1Sequence seq) {
    this.seq = seq;

    //
    // correct x509 certficate
    //
    if (seq.size() == 3) {
      tbsCert = TBSCertificateStructure.getInstance(seq.getObjectAt(0));
      sigAlgId = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));

      sig = (DERBitString) seq.getObjectAt(2);
    }
  }
 public X509Name getSubject() {
   return tbsCert.getSubject();
 }
 public Time getEndDate() {
   return tbsCert.getEndDate();
 }
 public Time getStartDate() {
   return tbsCert.getStartDate();
 }
 public X509Name getIssuer() {
   return tbsCert.getIssuer();
 }
 public DERInteger getSerialNumber() {
   return tbsCert.getSerialNumber();
 }
 public int getVersion() {
   return tbsCert.getVersion();
 }
 public SubjectPublicKeyInfo getSubjectPublicKeyInfo() {
   return tbsCert.getSubjectPublicKeyInfo();
 }