Package codec.asn1

Examples of codec.asn1.ASN1GeneralizedTime


  Attribute attrUserKeyId = null;

  // Add friendlyName (if present)
  if ((user_fn != null) && !user_fn.equals("")) {
      ASN1ObjectIdentifier fnOID = new ASN1ObjectIdentifier(FN_OID_);
      attrUserFn = new Attribute(fnOID, new ASN1BMPString(user_fn));
  }

  // add localKeyId (if present)
  if ((lk_id != null) && (lk_id.length > 0)) {
      ASN1ObjectIdentifier lkOID = new ASN1ObjectIdentifier(LK_OID_);
View Full Code Here


  add(certificationRequestInfo_);

  signatureAlgorithmIdentifier_ = new AlgorithmIdentifier();
  add(signatureAlgorithmIdentifier_);

  signature_ = new ASN1BitString();
  add(signature_);
    }
View Full Code Here

  Certificate_.add(tbsCertificate_);

  signatureAlgorithm_ = new codec.x509.AlgorithmIdentifier();
  Certificate_.add(signatureAlgorithm_);

  signatureValue_ = new ASN1BitString();
  Certificate_.add(signatureValue_);

    }
View Full Code Here

    list.add(o);
      }
      values_.clear();
      values_.addAll(list);
  } catch (ClassCastException e) {
      throw new ASN1Exception("Unexpected type in SET OF!");
  } catch (NullPointerException e) {
      throw new ASN1Exception("NULL in SET OF!");
  }
    }
View Full Code Here

      ByteArrayInputStream bais = new ByteArrayInputStream(enc);

      decode(new DERDecoder(bais));
      bais.close();
  } catch (IOException e) {
      throw new ASN1Exception(e.getMessage());
  }
    }
View Full Code Here

      encode(new DEREncoder(baos));
      res = baos.toByteArray();
      baos.close();
  } catch (IOException e) {
      throw new ASN1Exception(e.getMessage());
  }
  return res;

    }
View Full Code Here

  if (cDate == null) {
      throw (new Exception("Date was null, set Date to a proper value!"));
  }

  this.setOID(new ASN1ObjectIdentifier(EXTENSION_OID));
  creationDate = new ASN1GeneralizedTime(cDate);
  this.criticality = crit;
  this.setCritical(this.criticality);
  this.setValue(creationDate);
    }
View Full Code Here

  crlEntry_.add(userCertificate_);

  revocationDate_ = new ASN1Choice();
  revocationDate_.addType(new ASN1UTCTime());
  revocationDate_.addType(new ASN1GeneralizedTime());

  crlEntry_.add(revocationDate_);

  crlEntryExtensions_ = new ASN1SequenceOf(X509Extension.class);
  crlEntryExtensions_.setOptional(true);
View Full Code Here

    private ASN1GeneralizedTime time_;

    public ArchiveCutoffExtension() throws ASN1Exception,
      CertificateEncodingException {
  this(new ASN1GeneralizedTime(System.currentTimeMillis()));
    }
View Full Code Here

  add(issuer_);

  ASN1Sequence validity = new ASN1Sequence();
  notBefore_ = new ASN1Choice();
  notBefore_.addType(new ASN1UTCTime());
  notBefore_.addType(new ASN1GeneralizedTime());
  validity.add(notBefore_);
  notAfter_ = new ASN1Choice();
  notAfter_.addType(new ASN1UTCTime());
  notAfter_.addType(new ASN1GeneralizedTime());
  validity.add(notAfter_);
  add(validity);

  subject_ = new codec.x501.Name();
  add(subject_);
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.