Package org.bouncycastle.asn1.x509

Examples of org.bouncycastle.asn1.x509.Time


     * Reason being as indicated by ReasonFlags, i.e. ReasonFlags.keyCompromise
     * or 0 if ReasonFlags are not to be used
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason)
    {
        tbsGen.addCRLEntry(new DERInteger(userCertificate), new Time(revocationDate), reason);
    }
View Full Code Here


     * Reason being as indicated by ReasonFlags, i.e. ReasonFlags.keyCompromise
     * or 0 if ReasonFlags are not to be used
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason, Date invalidityDate)
    {
        tbsGen.addCRLEntry(new DERInteger(userCertificate), new Time(revocationDate), reason, new DERGeneralizedTime(invalidityDate));
    }
View Full Code Here

    /**
     * Add a CRL entry with extensions.
     **/
    public void addCRLEntry(BigInteger userCertificate, Date revocationDate, X509Extensions extensions)
    {
        tbsGen.addCRLEntry(new DERInteger(userCertificate), new Time(revocationDate), extensions);
    }
View Full Code Here

    algorithms.put("ECDSAWITHSHA1", new DERObjectIdentifier("1.2.840.10045.4.1"));
    }

    public X509V3CertificateGenerator()
    {
        tbsGen = new V3TBSCertificateGenerator();
    }
View Full Code Here

    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V3TBSCertificateGenerator();
        extensions = null;
        extOrdering = null;
    }
View Full Code Here

        v.add(tbsCert);
        v.add(sigAlgId);
        v.add(new DERBitString(sig.sign()));

        return new X509CertificateObject(new X509CertificateStructure(new DERSequence(v)));
    }
View Full Code Here

        {
            extensions = new Hashtable();
            extOrdering = new Vector();
        }

        extensions.put(OID, new X509Extension(critical, new DEROctetString(value)));
        extOrdering.addElement(OID);
    }
View Full Code Here

      Enumeration     e = extensions.oids();

      while (e.hasMoreElements())
      {
        DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
        X509Extension       ext = extensions.getExtension(oid);

        if (critical == ext.isCritical())
        {
          set.add(oid.getId());
        }
      }
View Full Code Here

  {
    X509Extensions exts = c.getTBSCertList().getExtensions();

    if (exts != null)
    {
      X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));

      if (ext != null)
      {
                ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
                DEROutputStream dOut = new DEROutputStream(bOut);

                try
                {
                    dOut.writeObject(ext.getValue());

                    return bOut.toByteArray();
                }
                catch (Exception e)
                {
View Full Code Here

      Enumeration    e = extensions.oids();

      while (e.hasMoreElements())
      {
        DERObjectIdentifier  oid = (DERObjectIdentifier)e.nextElement();
        X509Extension    ext = extensions.getExtension(oid);

        if (critical == ext.isCritical())
        {
          set.add(oid.getId());
        }
      }
View Full Code Here

TOP

Related Classes of org.bouncycastle.asn1.x509.Time

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.