Package codec.asn1

Examples of codec.asn1.ASN1ObjectIdentifier


     * Returns the ObjectIdentifier for this bagtype.
     *
     * @return the ObjectIdentifier
     */
    public ASN1ObjectIdentifier getOID() {
  return new ASN1ObjectIdentifier(OID_);
    }
View Full Code Here


    private ASN1Sequence idp;

    public IssuingDistPoint() throws Exception {
  idp = new ASN1Sequence(5);

  setOID(new ASN1ObjectIdentifier(ID_CE_ISSUING_DISTRIBUTION_POINT));
  setCritical(true);
  /*
   * We do not support both choices of DistributionPointName, hence we
   * directly initialize the one we support rather than going through an
   * ASN1Choice (which just adds another layer of complication).
View Full Code Here

    /**
     * @return the OID for this bag type.
     */
    public ASN1ObjectIdentifier getOID() {
  return new ASN1ObjectIdentifier(OID_);
    }
View Full Code Here

     * @throws Exception
     */
    public AuthorityInfoAccessExtension() throws Exception {
  super();

  setOID(new ASN1ObjectIdentifier(EXTENSION_OID));
  setCritical(false);
  setValue(accessDescriptionSyntax);
    }
View Full Code Here

     * Constructor
     *
     * @throws Exception
     */
    public CRLDistributionPointsExtension() throws Exception {
  setOID(new ASN1ObjectIdentifier(ID_CE_CRL_DISTRIBUTION_POINTS));
  setCritical(false);
  setValue(cRLDistributionPointSyntax);
    }
View Full Code Here

     *
     * @throws Exception
     */
    public AuthorityKeyIdentifierExtension() throws Exception {
  super();
  setOID(new ASN1ObjectIdentifier(ID_CE_AUTHORITY_KEY_IDENTIFIER));
  setCritical(false);

  keyIdentifier = new ASN1OctetString();
  keyIdentifierTag = new ASN1TaggedType(KEY_IDENTIFIER_TYPE,
    keyIdentifier, false, true);
View Full Code Here

     */
    public QCStatementExtension() throws ASN1Exception,
      CertificateEncodingException {
  value_ = new ASN1SequenceOf(QCStatement.class);

  setOID(new ASN1ObjectIdentifier(EXTENSION_OID));
  setCritical(false);
  setValue(value_);
    }
View Full Code Here

   * If used for decoding, ASN.1 objects do not need special
   * initialization values. On the contrary, ASN.1 objects generally
   * initialize for decoding when the default constructor is invoked.
   * --volker roth
   */
  extnID = new ASN1ObjectIdentifier();
  add(extnID);

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

View Full Code Here

     * @throws BadNameException
     */
    public Name(String rfc2253String, int encType) throws BadNameException {
  super(8);

  ASN1ObjectIdentifier oid;
  RFC2253Parser p;
  ASN1Sequence seq;
  Iterator i;
  ASN1Set set;
  String key;
  String val;
  AVA entry;

  initMaps();

  if (encType == -1) {
      if (!allowDefaultEncoding_) {
    throw new BadNameException(
      "Use the other constructor with the explicit "
        + "encoding parameter!");
      }
      currentEncoding_ = defaultEncoding_;
  } else {
      if (encType != UTF8_ENCODING && encType != T61_ENCODING
        && encType != PRINTABLE_ENCODING && encType != IA5_ENCODING) {
    throw new BadNameException("Unknown EncodingType: " + encType);
      }
      currentEncoding_ = encType;
  }

  p = new RFC2253Parser();
  set = new ASN1Set(1);

  for (i = p.parse(rfc2253String).iterator(); i.hasNext();) {
      entry = (AVA) i.next();
      key = entry.getKey();
      key = key.toUpperCase();
      oid = (ASN1ObjectIdentifier) a2oid_.get(key);
      seq = new ASN1Sequence(2);

      if (oid == null) {
    try {
        oid = new ASN1ObjectIdentifier(key);
    } catch (Exception e) {
        throw new BadNameException("Unsupported attribute key: \""
          + key + "\"");
    }
      }
      seq.add(oid.clone());

      if (entry.isEncodedValue()) {
    ByteArrayInputStream in;
    BERDecoder dec;
    ASN1Type obj;
View Full Code Here

     * @return <code>true</code> if neither the OID nor the key has already
     *         been registered, or is part of the default mapping. Otherwise,
     *         <code>false</code> is returned.
     */
    public boolean registerOID(int[] oid, String key) {
  ASN1ObjectIdentifier objectID;
  String keyUC;

  objectID = new ASN1ObjectIdentifier(oid);
  keyUC = key.toUpperCase();

  if (a2oid_.get(keyUC) != null || oid2a_.get(objectID) != null) {
      return false;
  }
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1ObjectIdentifier

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.