Package codec.asn1

Examples of codec.asn1.ASN1Sequence


  add(version_);

  algorithm_ = new AlgorithmIdentifier();
  add(algorithm_);

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

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


  try {
      bos = new ByteArrayOutputStream();
      enc = new DEREncoder(bos);
      key.encode(enc);
      encodedKey_ = new ASN1OctetString(bos.toByteArray());
      enc.close();
      set(2, encodedKey_);
  } catch (ASN1Exception e) {
      throw new InconsistentStateException("Internal, encoding error!");
  } catch (IOException e) {
View Full Code Here

  super(3);

  mac_ = new DigestInfo();
  add(mac_);

  macSalt_ = new ASN1OctetString();
  add(macSalt_);

  iter_ = new ASN1Integer();
  iter_.setOptional(true);
  add(iter_);
View Full Code Here

  super(3);

  mac_ = digest;
  add(mac_);

  macSalt_ = new ASN1OctetString(salt);
  add(macSalt_);

  iter_ = new ASN1Integer(it);
  if (it == 1) // default value?
      iter_.setOptional(true);
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

     */
    public CertificationRequest() {

  super(3);

  certificationRequestInfo_ = new ASN1Sequence();

  version_ = new ASN1Integer(0);
  certificationRequestInfo_.add(version_);

  subject_ = new Name();
View Full Code Here

    /**
     * Constructor that builds the data structure
     */
    public X509Certificate() {

  Certificate_ = new ASN1Sequence(3);

  tbsCertificate_ = new X509TBSCertificate();
  Certificate_.add(tbsCertificate_);

  signatureAlgorithm_ = new codec.x509.AlgorithmIdentifier();
View Full Code Here

    private ASN1Boolean indirectCrl_;

    private ASN1Sequence idp;

    public IssuingDistPoint() throws Exception {
  idp = new ASN1Sequence(5);

  setOID(new ASN1ObjectIdentifier(ID_CE_ISSUING_DISTRIBUTION_POINT));
  setCritical(true);
  /*
   * We do not support both choices of DistributionPointName, hence we
View Full Code Here

    /**
     * returns an array of Strings containing all CRL-DP URL's
     * RelativeDistinguishedName not implemented yet!
     */
    public String[] getDPURLs() {
  ASN1Sequence names;
  GeneralName gn;
  Iterator i;
  String[] res;
  int n;

  names = getDistributionPointNames();

  if (names == null) {
      return null;
  }
  res = new String[names.size()];

  for (n = 0, i = names.iterator(); i.hasNext(); n++) {
      try {
    gn = (GeneralName) i.next();
    res[n] = gn.getGeneralName().getValue().toString();
      } catch (codec.x509.X509Exception ex) {
    res[n] = "<could not decode this URL!>";
View Full Code Here

    /**
     * standard constructor; initializes the ASN.1 structure
     */
    public CRLEntry() {

  crlEntry_ = new ASN1Sequence();
  userCertificate_ = new ASN1Integer();

  crlEntry_.add(userCertificate_);

  revocationDate_ = new ASN1Choice();
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1Sequence

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.