Package org.apache.harmony.jndi.provider.ldap.asn1

Examples of org.apache.harmony.jndi.provider.ldap.asn1.ASN1Null


  if (oid == null) {
      throw new NullPointerException("Need an OID!");
  }
  if (value == null) {
      value = new ASN1Null();
  }
  type_ = oid;
  values_ = new ASN1Set(1);

  values_.add(value);
View Full Code Here


   * resolves the ANY DEFINED BY type. If the statement info is never
   * actually required then an ASN1Opaque may be used to save the overhead
   * of actually decoding the info. --volker roth
   */
  oid_ = new ASN1ObjectIdentifier();
  info_ = new ASN1Null();
  info_.setOptional(true);
  add(oid_);
  add(info_);
    }
View Full Code Here

        oid_ = new ASN1ObjectIdentifier(oid);

        if (oid.equals("2.1.0.2.0"))
        {
            parameter_ = new ASN1Null();
        }
        else if (oid.equals("2.1.0.2.2"))
        {
            parameter_ = new ASN1Integer((BigInteger)obj);
        }
View Full Code Here

        oid_ = new ASN1ObjectIdentifier(oid);

        if (oid.equals("2.1.0.2.0"))
        {
            parameter_ = new ASN1Null();
        }
        else if (oid.equals("2.1.0.2.2"))
        {
            parameter_ = new ASN1Integer((BigInteger)obj);
        }
View Full Code Here

     */
    public ASN1Type resolve(ASN1Type caller) throws ResolverException
    {
        if (oid_.toString().equals("2.1.0.2.0"))
        {
            return new ASN1Null();
        }
        else if (oid_.toString().equals("2.1.0.2.2"))
        {
            return new ASN1Integer();
        }
View Full Code Here

      throw new NoSuchAlgorithmException(
        "Cannot resolve signature algorithm!");
  }
  try {
      dAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(d),
        new ASN1Null());
      cAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(c),
        new ASN1Null());
  } catch (ASN1Exception e) {
      throw new InconsistentStateException(e);
  }
  /* Digest Algorithm Identifier */
  add(dAlg_);
 
View Full Code Here

      throw new NoSuchAlgorithmException(
        "Cannot resolve signature algorithm!");
  }
  try {
      dAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(d),
        new ASN1Null());
      cAlg_ = new AlgorithmIdentifier(new ASN1ObjectIdentifier(c),
        new ASN1Null());
  } catch (ASN1Exception e) {
      throw new InconsistentStateException(e);
  }
  /* Digest Algorithm Identifier */
  add(dAlg_);
 
View Full Code Here

  public void setAddress(String address) {
    this.address = address;
  }

    public void decodeSearchResponse(Object[] values) {
        ChosenValue chosen = (ChosenValue) values[0];
        switch (chosen.getIndex()) {
        case LdapASN1Constant.OP_SEARCH_RESULT_ENTRY:
            decodeEntry(chosen.getValue());
            break;
        case LdapASN1Constant.OP_SEARCH_RESULT_REF:
            decodeRef(chosen.getValue());
            break;
        case LdapASN1Constant.OP_SEARCH_RESULT_DONE:
            decodeDone(chosen.getValue());
            break;
        }
    }
View Full Code Here

        messageId = ASN1Integer.toIntValue(values[0]);
        if (values[1] == null) {
            return;
        }

        ChosenValue chosen = (ChosenValue) values[1];
        opIndex = chosen.getIndex();
        // failed to retrieve responseOp
        responseOp = getResponseOp();
        if (responseOp == null) {
            return;
        }

        if (opIndex == LdapASN1Constant.OP_SEARCH_RESULT_DONE
                || opIndex == LdapASN1Constant.OP_SEARCH_RESULT_ENTRY
                || opIndex == LdapASN1Constant.OP_SEARCH_RESULT_REF) {
            /*
             * we use LdapSearchResult to decode all types of search responses,
             * so we need index to determine which type of response to decode
             */
            responseOp.decodeValues(new Object[] { chosen });
        } else {
            responseOp.decodeValues((Object[]) chosen.getValue());
        }

        if (values[2] != null) {
            Collection<Object[]> list = (Collection<Object[]>) values[2];
            controls = new Control[list.size()];
View Full Code Here

        if (opIndex == LdapASN1Constant.OP_ABANDON_REQUEST
                || opIndex == LdapASN1Constant.OP_DEL_REQUEST
                || opIndex == LdapASN1Constant.OP_UNBIND_REQUEST) {
            Object[] objs = new Object[1];
            requestOp.encodeValues(objs);
            values[1] = new ChosenValue(opIndex, objs[0]);
        } else {
            values[1] = new ChosenValue(opIndex, requestOp);
        }

        // encode controls, wrap to LdapControl, so it could be encoded
        if (controls != null) {
            List<LdapControl> list = new ArrayList<LdapControl>(controls.length);
View Full Code Here

TOP

Related Classes of org.apache.harmony.jndi.provider.ldap.asn1.ASN1Null

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.