code: public DERObject toASN1Object()
      {
          ASN1EncodableVector     vec = new ASN1EncodableVector();
          Enumeration             e = ordering.elements();
  
          while (e.hasMoreElements())
          {
              DERObjectIdentifier     oid = (DERObjectIdentifier)e.nextElement();
              X509Extension           ext = (X509Extension)extensions.get(oid);
              ASN1EncodableVector     v = new ASN1EncodableVector();
  
              v.add(oid);
  
              if (ext.isCritical())
              {
                  v.add(new DERBoolean(true));
              }
  
              v.add(ext.getValue());
  
              vec.add(new DERSequence(v));
          }
  
          return new DERSequence(vec);
      }
docs: <pre>
  Extensions        ::=   SEQUENCE SIZE (1..MAX) OF Extension
  
  Extension         ::=   SEQUENCE {
  extnId            EXTENSION.&id ({ExtensionSet}),
  critical          BOOLEAN DEFAULT FALSE,
  extnValue         OCTET STRING }
  </pre>