Examples of ASN1TaggedType


Examples of codec.asn1.ASN1TaggedType

    public CRLBag() {
  super(2);
  crlId_ = new ASN1ObjectIdentifier();
  add(crlId_);
  ASN1OpenType ot = new ASN1OpenType(reg_, crlId_);
  crlValue_ = new ASN1TaggedType(0, ot, true);
  add(crlValue_);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

    public CRLBag(X509Crl crl) throws java.security.cert.CRLException {
  super(2);
  crlId_ = new ASN1ObjectIdentifier("1.2.840.113549.1.9.23");
  add(crlId_);
  ASN1OctetString x509 = new ASN1OctetString(crl.getEncoded());
  crlValue_ = new ASN1TaggedType(0, x509, true);
  add(crlValue_);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  fullName_ = new ASN1SequenceOf(GeneralName.class);

  /*
   * We wrap the only CHOICE we support into the appropriate tagged type.
   */
  distributionPoint_ = new ASN1TaggedType(TAG_FULL_NAME, fullName_,
    false, false);

  /*
   * We wrap again. Flags are EXPLICIT and OPTIONAL.
   */
  distributionPointTag_ = new ASN1TaggedType(TAG_DISTRIBUTION_POINT,
    distributionPoint_, true, true);
  /*
   * Finally, we add the tagged type.
   */
  idp.add(distributionPointTag_);

  /*
   * Next element with tag [1].
   */
  containsUserCerts_ = new ASN1Boolean(false);
  containsUserCertsTag_ = new ASN1TaggedType(TAG_CONTAINS_USER_CERTS,
    containsUserCerts_, false, true);
  idp.add(containsUserCertsTag_);

  /*
   * next element with tag [2].
   */
  containsCaCerts_ = new ASN1Boolean(false);
  containsCaCertsTag_ = new ASN1TaggedType(TAG_CONTAINS_CA_CERTS,
    containsCaCerts_, false, true);
  idp.add(containsCaCertsTag_);

  /*
   * next element with tag [3].
   */
  someReasons_ = new ASN1BitString();
  someReasonsTag_ = new ASN1TaggedType(TAG_SOME_REASONS, someReasons_,
    false, true);
  idp.add(someReasonsTag_);

  /*
   * Final element with tag [4].
   */
  indirectCrl_ = new ASN1Boolean(false);
  indirectCrlTag_ = new ASN1TaggedType(TAG_INDIRECT_CRL, indirectCrl_,
    false, true);
  idp.add(indirectCrlTag_);
  setValue(idp);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  super();
  setOID(new ASN1ObjectIdentifier(ID_CE_AUTHORITY_KEY_IDENTIFIER));
  setCritical(false);

  keyIdentifier = new ASN1OctetString();
  keyIdentifierTag = new ASN1TaggedType(KEY_IDENTIFIER_TYPE,
    keyIdentifier, false, true);
  authorityKeyIdentifier.add(keyIdentifierTag);

  certIssuer = new ASN1SequenceOf(GeneralName.class);

  certIssuerTag = new ASN1TaggedType(CERT_ISSUER_TYPE, certIssuer, false,
    true);
  authorityKeyIdentifier.add(certIssuerTag);

  certSerialNumber = new ASN1Integer();
  certSerialNumberTag = new ASN1TaggedType(CERT_SERIAL_NUMBER_TYPE,
    certSerialNumber, false, true);
  authorityKeyIdentifier.add(certSerialNumberTag);

  setValue(authorityKeyIdentifier);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  professionOids = new ASN1SequenceOf(ASN1ObjectIdentifier.class);
    }

    public void addNamingAuthority(NamingAuthority na) {
  namingAuth = na;
  namingAuthTag = new ASN1TaggedType(TAG_NAMING_AUTH, namingAuth, true,
    false);
  add(namingAuthTag);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  content_ = new ContentInfo();
  add(content_);

  certs_ = new Certificates();
  add(new ASN1TaggedType(0, certs_, false, true));

  crls_ = new ASN1SetOf(ASN1Opaque.class);
  add(new ASN1TaggedType(1, crls_, false, true));

  infos_ = new ASN1SetOf(SignerInfo.class);
  add(infos_);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

    public EncryptedContentInfo() {
  super(3);

  contentType_ = new ASN1ObjectIdentifier();
  cAlg_ = new AlgorithmIdentifier();
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(), false, true);

  add(contentType_);
  add(cAlg_);
  add(econtent_);
    }
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  if (bea == null || bek == null) {
      throw new NullPointerException("BEK or BEA is null!");
  }
  contentType_ = new ASN1ObjectIdentifier(DATA_OID);
  cAlg_ = new AlgorithmIdentifier(bea, params);
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(), false, true);

  add(contentType_);
  add(cAlg_);
  add(econtent_);
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  b = out.toByteArray();
  out.close();

  contentType_ = new ASN1ObjectIdentifier(DATA_OID);
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(b), false, false);

  clear();
  add(contentType_);
  add(cAlg_);
  add(econtent_);
View Full Code Here

Examples of codec.asn1.ASN1TaggedType

  contentType_ = oid;

  /*
   * Embed the content into this structure.
   */
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(b), false, false);

  /*
   * Re-build the structure.
   */
  clear();
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.