Package codec.asn1

Examples of codec.asn1.ASN1Boolean


  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

  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

   * --volker roth
   */
  extnID = new ASN1ObjectIdentifier();
  add(extnID);

  critical = new ASN1Boolean(false);
  critical.setOptional(true);

  add(critical);

  extnValue = new ASN1OctetString();
View Full Code Here

     */
    public ErrorParameterType1(boolean critical, String info)
    {
        super(2);

        critical_     = new ASN1Boolean(critical);
        info_         = new ASN1IA5String(info);

        add(critical_);
        add(info_);
    }
View Full Code Here

     */
    public ErrorParameterType1()
    {
        super(2);

        critical_     = new ASN1Boolean();
        info_         = new ASN1IA5String();

        add(critical_);
        add(info_);
    }
View Full Code Here

     */
    public ErrorParameterType1(boolean critical, String info)
    {
        super(2);

        critical_     = new ASN1Boolean(critical);
        info_         = new ASN1IA5String(info);

        add(critical_);
        add(info_);
    }
View Full Code Here

     */
    public ErrorParameterType1()
    {
        super(2);

        critical_     = new ASN1Boolean();
        info_         = new ASN1IA5String();

        add(critical_);
        add(info_);
    }
View Full Code Here

  byte[] ext_value;
  DERDecoder dec;
  ByteArrayInputStream bais;
  ASN1Sequence seq;
  ASN1Integer pathLen;
  ASN1Boolean ca;

  String bc_oid = "2.5.29.19";

  // get the extension "basic constraints"
  ext_value = getExtensionValue(bc_oid);

  // is it present?
  if (ext_value != null) {

      // read the extension value through a byte array input stream
      bais = new ByteArrayInputStream(ext_value);

      try {

    // build outer sequence
    seq = new ASN1Sequence();

    ca = new ASN1Boolean();
    ca.setOptional(true);
    seq.add(ca);

    pathLen = new ASN1Integer();
    pathLen.setOptional(true);
    seq.add(pathLen);

    /*
     * Switched decoding to the correct way of doing it, which is to
     * take the ASN.1 object and to call its decode() method, rather
     * than calling readX() methods of the decoder. --volker roth
     */
    dec = new DERDecoder(bais);
    seq.decode(dec);
    bais.close();

    if (ca.isTrue()) {
        /*
         * Replaced long->string->int parsing with a simpler method
         * with the same type of loss of precision. --volker roth
         */
        res = pathLen.getBigInteger().intValue();
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1Boolean

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.