Package codec.asn1

Examples of codec.asn1.ASN1Time


  encodedKey_ = new ASN1OctetString();
  add(encodedKey_);

  attributes_ = new ASN1SetOf(Attribute.class);
  add(new ASN1TaggedType(0, attributes_, false, true));

  try {
      dec = new DERDecoder(new ByteArrayInputStream(key.getEncoded()));

      decode(dec);
View Full Code Here


     */
    public SecretBag() {
  super(2);
  ASN1ObjectIdentifier secretTypeId = new ASN1ObjectIdentifier();
  ASN1OpenType ot = new ASN1OpenType(reg_, secretTypeId);
  secretValue_ = new ASN1TaggedType(0, ot, true);
    }
View Full Code Here

  subjectPublicKeyInfo_ = new SubjectPublicKeyInfo();
  certificationRequestInfo_.add(subjectPublicKeyInfo_);

  attributes_ = new ASN1SetOf(Attribute.class);
  certificationRequestInfo_.add(new ASN1TaggedType(0, attributes_, false,
    false));

  add(certificationRequestInfo_);

  signatureAlgorithmIdentifier_ = new AlgorithmIdentifier();
View Full Code Here

    public CertBag() {
  super(2);
  certId_ = new ASN1ObjectIdentifier();
  add(certId_);
  ASN1OpenType ot = new ASN1OpenType(reg_, certId_);
  certValue_ = new ASN1TaggedType(0, ot, true);
  add(certValue_);
    }
View Full Code Here

      throws java.security.cert.CertificateEncodingException {
  super(2);
  certId_ = new ASN1ObjectIdentifier("1.2.840.113549.1.9.22.1");
  add(certId_);
  x509Cert_ = new ASN1OctetString(cert.getEncoded());
  certValue_ = new ASN1TaggedType(0, x509Cert_, true);
  add(certValue_);
    }
View Full Code Here

    /**
     * implemented abstract method from
     * {@link java.security.cert.X509CRLEntry java.security.cert.X509CRLEntry}
     */
    public Date getRevocationDate() {
  ASN1Time a1t = (ASN1Time) revocationDate_.getInnerType();
  return a1t.getDate();
    }
View Full Code Here

    /**
     * set the date of this revocation entry
     */
    public void setRevocationDate(Calendar cal) {

  ASN1Time inner = (ASN1Time) revocationDate_.getInnerType();

  if (inner == null) {
      inner = new ASN1UTCTime(cal);
      revocationDate_.setInnerType(inner);
  }

  inner.setDate(cal);
    }
View Full Code Here

     * @param nnaf
     *                "not after" date
     */
    public void setNotAfter(Calendar nnaf) {

  ASN1Time nai = (ASN1Time) notAfter_.getInnerType();

  if (nai == null) {
      nai = new ASN1UTCTime();
      notAfter_.setInnerType(nai);
  }

  nai.setDate(nnaf);
    }
View Full Code Here

     *
     * @param nnbf
     *                "not before" date
     */
    public void setNotBefore(Calendar nnbf) {
  ASN1Time nai = (ASN1Time) notBefore_.getInnerType();

  if (nai == null) {
      nai = new ASN1UTCTime();
      notBefore_.setInnerType(nai);
  }

  nai.setDate(nnbf);
    }
View Full Code Here

    public Date getNextUpdate() {

  if (nextUpdate.isOptional())
      return null;

  ASN1Time a1t = (ASN1Time) nextUpdate.getInnerType();

  return a1t.getDate();
    }
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1Time

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.