Package org.nasutekds.server.types

Examples of org.nasutekds.server.types.ByteString


  {
    LDAPResult delResponse = objFactory.createLDAPResult();
    delResponse.setRequestID(deleteRequest.getRequestID());

    // Create and send the LDAP delete request to the server.
    ByteString dnStr = ByteString.valueOf(deleteRequest.getDn());
    ProtocolOp op = new DeleteRequestProtocolOp(dnStr);
    LDAPMessage msg = new LDAPMessage(DSMLServlet.nextMessageID(), op);
    connection.getLDAPWriter().writeMessage(msg);

    // Read and decode the LDAP response from the server.
View Full Code Here


    ExtendedResponse extendedResponse = objFactory.createExtendedResponse();
    extendedResponse.setRequestID(extendedRequest.getRequestID());

    String requestName = extendedRequest.getRequestName();
    Object value = extendedRequest.getRequestValue();
    ByteString asnValue = ByteString.valueOf(value.toString());

    // Create and send the LDAP request to the server.
    ProtocolOp op = new ExtendedRequestProtocolOp(requestName, asnValue);
    LDAPMessage msg = new LDAPMessage(DSMLServlet.nextMessageID(), op);
    connection.getLDAPWriter().writeMessage(msg);
View Full Code Here

      if(j >= values.length)
      {
        break;
      }

      ByteString b1Bytes = set.getValue((index * orderingRules.length) + j);
      ByteString b2Bytes = null;

      if(values[j] != null)
      {
        b2Bytes = values[j].getNormalizedValue();
      }
View Full Code Here

    LDAPAuthenticationHandler handler = new LDAPAuthenticationHandler(
         ldapReader, ldapWriter, hostName, nextMessageID);
    try
    {
      ByteString bindDNBytes;
      if(bindDN == null)
      {
        bindDNBytes = ByteString.empty();
      }
      else
      {
        bindDNBytes = ByteString.valueOf(bindDN);
      }

      ByteString bindPW;
      if (bindPassword == null)
      {
        bindPW =  null;
      }
      else
View Full Code Here

  {
    // The value of the request must be a sequence containing an integer element
    // that holds the message ID of the operation to cancel.  If there is no
    // value or it cannot be decoded, then fail.
    int idToCancel;
    ByteString requestValue = operation.getRequestValue();
    if (requestValue == null)
    {
      operation.setResultCode(ResultCode.PROTOCOL_ERROR);

      operation.appendErrorMessage(ERR_EXTOP_CANCEL_NO_REQUEST_VALUE.get());
View Full Code Here

  public void processSASLBind(BindOperation bindOperation)
  {
    // See if the client provided SASL credentials including trace information.
    // If so, then write it to the access log as additional log information, and
    // as an informational message to the error log.
    ByteString saslCredentials = bindOperation.getSASLCredentials();
    if (saslCredentials != null)
    {
      String credString = saslCredentials.toString();
      if (credString.length() > 0)
      {
        MessageBuilder mb = new MessageBuilder();
        mb.append("trace='");
        mb.append(credString);
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public final void getKeys(AttributeValue value, Set<byte[]> keys)
    {
      ByteString key;
      try
      {
        key = matchingRule.normalizeValue(value.getValue());
        keys.add(key.toByteArray());
      }
      catch (DirectoryException de)
      {
        //don't do anything.
      }
View Full Code Here

        }

        AttributeBuilder builder = new AttributeBuilder(attribute, true);
        for (Object value : this.getAttributeValues(attrName))
        {
          ByteString bs;
          if (value instanceof byte[])
          {
            bs = ByteString.wrap((byte[])value);
          }
          else
View Full Code Here

    scheme.initializePasswordStorageScheme(configuration);

    String passwordString = scheme.encodeOffline(plaintext.toByteArray());
    String[] pwComps = UserPasswordSyntax.decodeUserPassword(passwordString);
    ByteString encodedPassword = ByteString.valueOf(pwComps[1]);

    assertTrue(scheme.passwordMatches(plaintext, encodedPassword));
  }
View Full Code Here

          + "MUST ( cn $ ds-cfg-java-class $ "
          + "ds-cfg-enabled $ ds-cfg-attribute-type ) "
          + "MAY ( ds-cfg-base-dn $ ds-cfg-group-dn $ "
          + "ds-cfg-filter $ ds-cfg-conflict-behavior ) "
          + "X-ORIGIN 'NasuTekDS Directory Server' )";
      ByteString b = ByteString.valueOf(ocd);

      TEST_PARENT_OCD = ObjectClassSyntax.decodeObjectClass(b, DirectoryServer
          .getSchema(), false);
    }

    if (TEST_CHILD_OCD == null) {
      String ocd = "( 1.3.6.1.4.1.26027.1.2.4455114402 "
          + "NAME 'ds-cfg-test-child-dummy' "
          + "SUP top STRUCTURAL "
          + "MUST ( cn $ ds-cfg-java-class $ "
          + "ds-cfg-enabled $ ds-cfg-attribute-type ) "
          + "MAY ( ds-cfg-base-dn $ ds-cfg-group-dn $ "
          + "ds-cfg-filter $ ds-cfg-conflict-behavior $"
          + "ds-cfg-rotation-policy) " + "X-ORIGIN 'NasuTekDS Directory Server' )";
      ByteString b = ByteString.valueOf(ocd);

      TEST_CHILD_OCD = ObjectClassSyntax.decodeObjectClass(b, DirectoryServer
          .getSchema(), false);
    }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.ByteString

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.