Package codec.asn1

Examples of codec.asn1.ASN1Choice


  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

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

  crlEntry_.add(userCertificate_);

  revocationDate_ = new ASN1Choice();
  revocationDate_.addType(new ASN1UTCTime());
  revocationDate_.addType(new ASN1GeneralizedTime());

  crlEntry_.add(revocationDate_);
View Full Code Here

  issuer_ = new codec.x501.Name();
  add(issuer_);

  ASN1Sequence validity = new ASN1Sequence();
  notBefore_ = new ASN1Choice();
  notBefore_.addType(new ASN1UTCTime());
  notBefore_.addType(new ASN1GeneralizedTime());
  validity.add(notBefore_);
  notAfter_ = new ASN1Choice();
  notAfter_.addType(new ASN1UTCTime());
  notAfter_.addType(new ASN1GeneralizedTime());
  validity.add(notAfter_);
  add(validity);
View Full Code Here

  TBSCertList.add(signatureAlgorithm);

  issuer = new codec.x501.Name();
  TBSCertList.add(issuer);

  thisUpdate = new ASN1Choice();
  thisUpdate.addType(new ASN1UTCTime());
  thisUpdate.addType(new ASN1GeneralizedTime());
  TBSCertList.add(thisUpdate);

  nextUpdate = new ASN1Choice();
  nextUpdate.setOptional(true);
  nextUpdate.addType(new ASN1UTCTime());
  nextUpdate.addType(new ASN1GeneralizedTime());

  TBSCertList.add(nextUpdate);
View Full Code Here

  TBSCertList.add(signatureAlgorithm);

  issuer = new codec.x501.Name();
  TBSCertList.add(issuer);

  thisUpdate = new ASN1Choice();
  thisUpdate.addType(new ASN1UTCTime());
  thisUpdate.addType(new ASN1GeneralizedTime());
  TBSCertList.add(thisUpdate);

  /*
 
View Full Code Here

    list.add(o);
      }
      values_.clear();
      values_.addAll(list);
  } catch (ClassCastException e) {
      throw new ASN1Exception("Unexpected type in SET OF!");
  } catch (NullPointerException e) {
      throw new ASN1Exception("NULL in SET OF!");
  }
    }
View Full Code Here

      ByteArrayInputStream bais = new ByteArrayInputStream(enc);

      decode(new DERDecoder(bais));
      bais.close();
  } catch (IOException e) {
      throw new ASN1Exception(e.getMessage());
  }
    }
View Full Code Here

      encode(new DEREncoder(baos));
      res = baos.toByteArray();
      baos.close();
  } catch (IOException e) {
      throw new ASN1Exception(e.getMessage());
  }
  return res;

    }
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1Choice

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.