Package codec.asn1

Examples of codec.asn1.ASN1ObjectIdentifier


     * @throws Exception
     */
    public BasicConstraintsExtension(boolean _cA, int _pathLenConstraints)
      throws Exception {
  // set parameters
  setOID(new ASN1ObjectIdentifier(ID_CE_BASIC_CONSTRAINTS));
  setCritical(true); // this is alway the case

  // set payload
  cA = new ASN1Boolean(_cA);
  cA.setOptional(false); // I'm in doubt if that's neccessary
View Full Code Here


    /**
     * Creates an instance ready for decoding.
     */
    public CertHashExtension() throws ASN1Exception,
      CertificateEncodingException {
  setOID(new ASN1ObjectIdentifier(EXTENSION_OID));
  setCritical(false);

  syntax_ = new ASN1Sequence(2);
  hashAlgorithm_ = new AlgorithmIdentifier();
  certificateHash_ = new ASN1OctetString();
View Full Code Here

  certificateHash_ = new ASN1OctetString(buf);

  syntax_.add(hashAlgorithm_);
  syntax_.add(certificateHash_);

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

  ASN1OpenType ot;

  if (registry == null) {
      registry = PKCSRegistry.getDefaultRegistry();
  }
  contentType_ = new ASN1ObjectIdentifier();
  ot = new ASN1OpenType(registry, contentType_);
  content_ = new ASN1TaggedType(0, ot, true, true);

  add(contentType_);
  add(content_);
View Full Code Here

     * Initializes an instance for decoding.
     */
    public PolicyInformation() {
  super(2);

  policyIdentifier_ = new ASN1ObjectIdentifier();

  /*
   * According to the profile, no PolicyQualifierInfo is ever used. Hence,
   * we do not bother about any contents. The opaque object just reads
   * whatever is there (if there is something) without actually decoding
View Full Code Here

            }
        }

        for (int i = 0; i != this.ordering.size(); i++)
        {
            ASN1ObjectIdentifier     oid = (ASN1ObjectIdentifier)this.ordering.elementAt(i);

            if (attributes.get(oid) == null)
            {
                throw new IllegalArgumentException("No attribute for object id - " + oid.getId() + " - passed to distinguished name");
            }

            this.values.addElement(attributes.get(oid)); // copy the hash table
        }
    }
View Full Code Here

        Hashtable   lookUp)
    {
        name = name.trim();
        if (Strings.toUpperCase(name).startsWith("OID."))
        {
            return new ASN1ObjectIdentifier(name.substring(4));
        }
        else if (name.charAt(0) >= '0' && name.charAt(0) <= '9')
        {
            return new ASN1ObjectIdentifier(name);
        }

        ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)lookUp.get(Strings.toLowerCase(name));
        if (oid == null)
        {
            throw new IllegalArgumentException("Unknown object id - " + name + " - passed to distinguished name");
        }
View Full Code Here

    private void addEntry(Hashtable lookUp, String token, Boolean isAdded)
    {
        X509NameTokenizer vTok;
        String name;
        String value;ASN1ObjectIdentifier oid;
        vTok = new X509NameTokenizer(token, '=');

        name = vTok.nextToken();

        if (!vTok.hasMoreTokens())
View Full Code Here

    {
        if (seq == null)
        {
            ASN1EncodableVector  vec = new ASN1EncodableVector();
            ASN1EncodableVector  sVec = new ASN1EncodableVector();
            ASN1ObjectIdentifier  lstOid = null;
           
            for (int i = 0; i != ordering.size(); i++)
            {
                ASN1EncodableVector     v = new ASN1EncodableVector();
                ASN1ObjectIdentifier     oid = (ASN1ObjectIdentifier)ordering.elementAt(i);

                v.add(oid);

                String  str = (String)values.elementAt(i);
View Full Code Here

            return false;
        }

        for (int i = 0; i < orderingSize; i++)
        {
            ASN1ObjectIdentifier  oid = (ASN1ObjectIdentifier)ordering.elementAt(i);
            ASN1ObjectIdentifier  oOid = (ASN1ObjectIdentifier)other.ordering.elementAt(i);

            if (oid.equals(oOid))
            {
                String value = (String)values.elementAt(i);
                String oValue = (String)other.values.elementAt(i);
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.