Package codec.asn1

Examples of codec.asn1.ASN1GeneralizedTime


  if (registry == null) {
      registry = OIDRegistry.getGlobalOIDRegistry();
  }
  type_ = new ASN1ObjectIdentifier();
  values_ = new ASN1SetOf(new DefinedByResolver(registry, type_));

  add(type_);
  add(values_);
    }
View Full Code Here


    static public OIDRegistry getDefaultRegistry() {
  return default_;
    }

    public static void main(String[] argv) {
  OIDRegistry reg;
  int n;

  try {
      reg = PKCS12OIDRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

    static public OIDRegistry getDefaultRegistry() {
  return default_;
    }

    public static void main(String[] argv) {
  OIDRegistry reg;
  int n;

  try {
      reg = PKCSRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

    // constructors:

    public DVCSTime(Date time)
    {
        this(new ASN1GeneralizedTime(time));
    }
View Full Code Here

                RevokedStatus rs = (RevokedStatus)certStatus;
               
                if (rs.hasRevocationReason())
                {
                    this.certStatus = new CertStatus(
                                            new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
                }
                else
                {
                    this.certStatus = new CertStatus(
                                            new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
                }
            }

            this.thisUpdate = new DERGeneralizedTime(thisUpdate);
           
View Full Code Here

   
    public RevokedStatus(
        Date        revocationDate,
        int         reason)
    {
        this.info = new RevokedInfo(new ASN1GeneralizedTime(revocationDate), CRLReason.lookup(reason));
    }
View Full Code Here

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

    }

    public void setNotBefore(
        Date    date)
    {
        acInfoGen.setStartDate(new ASN1GeneralizedTime(date));
    }
View Full Code Here

    }

    public void setNotAfter(
        Date    date)
    {
        acInfoGen.setEndDate(new ASN1GeneralizedTime(date));
    }
View Full Code Here

            {
                return new DERIA5String(value);
            }
            else if (oid.equals(DATE_OF_BIRTH))  // accept time string as well as # (for compatibility)
            {
                return new ASN1GeneralizedTime(value);
            }
            else if (oid.equals(C) || oid.equals(SN) || oid.equals(DN_QUALIFIER)
                || oid.equals(TELEPHONE_NUMBER))
            {
                return new DERPrintableString(value);
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1GeneralizedTime

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.