Package codec.asn1

Examples of codec.asn1.ASN1Type


    public CertBag() {
  super(2);
  certId_ = new ASN1ObjectIdentifier();
  add(certId_);
  ASN1OpenType ot = new ASN1OpenType(reg_, certId_);
  certValue_ = new ASN1TaggedType(0, ot, true);
  add(certValue_);
    }
View Full Code Here


      throws java.security.cert.CertificateEncodingException {
  super(2);
  certId_ = new ASN1ObjectIdentifier("1.2.840.113549.1.9.22.1");
  add(certId_);
  x509Cert_ = new ASN1OctetString(cert.getEncoded());
  certValue_ = new ASN1TaggedType(0, x509Cert_, true);
  add(certValue_);
    }
View Full Code Here

  if (!(values_ instanceof ASN1SetOf)) {
      return;
  }
  ArrayList list;
  ASN1Type o;
  Iterator i;

  try {
      list = new ArrayList(values_.size());
View Full Code Here

     *
     * @return The raw key decoded according to DER.
     */
    public ASN1Type getDecodedRawKey() throws CorruptedCodeException {
  DERDecoder dec;
  ASN1Type raw;

  try {
      dec = new DERDecoder(new ByteArrayInputStream(encodedKey_
        .getByteArray()));

View Full Code Here

     *                The {@link Decoder Decoder} to use.
     */
    public void decode(Decoder decoder) throws ASN1Exception, IOException {
  super.decode(decoder);

  ASN1Type t;
  ASN1OpenType o;

  t = certValue_.getInnerType();
  if (t instanceof ASN1OpenType) {
      o = (ASN1OpenType) t;
View Full Code Here

     *                The {@link Decoder Decoder} to use.
     */
    public void decode(Decoder decoder) throws ASN1Exception, IOException {
  super.decode(decoder);

  ASN1Type t;
  ASN1OpenType o;

  t = bagValue_.getInnerType();
  if (t instanceof ASN1OpenType) {
      o = (ASN1OpenType) t;
View Full Code Here

     *                The {@link Decoder Decoder} to use.
     */
    public void decode(Decoder decoder) throws ASN1Exception, IOException {
  super.decode(decoder);

  ASN1Type t;
  ASN1OpenType o;

  t = crlValue_.getInnerType();
  if (t instanceof ASN1OpenType) {
      o = (ASN1OpenType) t;
View Full Code Here

     * containing the original value is returned.
     */
    public Object getValue() {
  ByteArrayInputStream bis;
  DERDecoder dec;
  ASN1Type res = null;

  try {
      bis = new ByteArrayInputStream(extnValue.getByteArray());
      dec = new DERDecoder(bis);
      res = dec.readType();
View Full Code Here

    }

    public void decode(Decoder dec) throws ASN1Exception, IOException {
  super.decode(dec);

  ASN1Type inner = (ASN1Type) super.getValue();

  if (!(inner instanceof ASN1OctetString)) {
      throw new ASN1Exception("Inner value of wrong type: "
        + inner.getClass().getName());
  }
  keyIdentifier = (ASN1OctetString) inner;
    }
View Full Code Here

      seq.add(oid.clone());

      if (entry.isEncodedValue()) {
    ByteArrayInputStream in;
    BERDecoder dec;
    ASN1Type obj;
    byte[] buf;

    try {
        buf = entry.getEncodedValue();
        in = new ByteArrayInputStream(buf);
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1Type

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.