Package org.apache.harmony.security.asn1

Examples of org.apache.harmony.security.asn1.ASN1BitString


  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(containsCaCertsTag_);

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

  /*
 
View Full Code Here

  add(subject_);

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

  issuerUniqueID_ = new ASN1BitString();
  issuerUniqueIDTag_ = new ASN1TaggedType(1, issuerUniqueID_, false, true);
  add(issuerUniqueIDTag_);

  subjectUniqueID_ = new ASN1BitString();
  subjectUniqueIDTag_ = new ASN1TaggedType(2, subjectUniqueID_, false,
    true);
  add(subjectUniqueIDTag_);

  extensions_ = new ASN1SequenceOf(X509Extension.class);
View Full Code Here

    public boolean[] getKeyUsage() {
  boolean[] res = null;
  byte[] ext_value;
  DERDecoder dec;
  ByteArrayInputStream bais;
  ASN1BitString bits;

  String ku_oid = "2.5.29.15";

  // get the extension "key usage"
  ext_value = getExtensionValue(ku_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
    bits = new ASN1BitString();

    dec = new DERDecoder(bais);

    /*
     * Replaced the construct dec.readX(X) by the correct use of
     * X.decode(dec). The latter takes into consideration any
     * special decoding steps (such as optimizations) done by the
     * decoded class in its decode method. Not of importance with a
     * bitstring, but in other classes. --volker roth
     */
    bits.decode(dec);
    bais.close();

    res = bits.getBits();
      } catch (Exception e) {
    System.out.println("Internal Error.Shouldnt happen");
    e.printStackTrace();
      }
  }
View Full Code Here

  add(distributionPointTag_);

  /*
   * Next element with tag [1].
   */
  reasons_ = new ASN1BitString();
  reasonsTag_ = new ASN1TaggedType(TAG_REASONS, reasons_, false, true);
  add(reasonsTag_);

  /*
   * Final element with tag [2].
View Full Code Here

  CertificateList.add(TBSCertList);

  signatureAlgorithm2 = new AlgorithmIdentifier();
  CertificateList.add(signatureAlgorithm);

  signature = new ASN1BitString();
  CertificateList.add(signature);

    }
View Full Code Here

  CertificateList.add(TBSCertList);

  signatureAlgorithm2 = new AlgorithmIdentifier();
  CertificateList.add(signatureAlgorithm);

  signature = new ASN1BitString();
  CertificateList.add(signature);

    }
View Full Code Here

  super(2);

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

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

  if (aid == null || key == null)
      throw new NullPointerException("Some arg is null!");

  algorithm_ = aid;
  add(algorithm_);
  encodedKey_ = new ASN1BitString(key, 0);
  add(encodedKey_);
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.security.asn1.ASN1BitString

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.