/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008 Sun Microsystems, Inc.
*/
/**
* Perform an Ldap search using SASL as authentication mechanism.
* Supports sasl encryption.
* The function returns the ldap error code
*/
public class saslSearchClient {
/**
* Main.
*
* @param args arguments
*/
// Ldapsearch parameters
int scope;
// SASL options
// Get ldapsearch parameters
}
}
} else {
// default scope: "sub"
}
searchControls = new SearchControls();
}
}
}
// Get SASL options
}
}
}
}
}
}
}
maxbufsize = val1;
}
k++;
}
"com.sun.jndi.ldap.LdapCtxFactory");
}
}
}
}
}
if (maxbufsize != null) {
}
try {
// connect to server
// issue ldapsearch
} catch (CommunicationException e1) {
} catch (InvalidSearchFilterException e2) {
} catch (NamingException e3) {
}
"No common protection layer between client and server";
// No error, the modify is success
if ( errorMessage == null ) {
errorCode = "0";
} else {
if (errorCause != null)
// return 89-LDAP_PARAM_ERROR, which is also returned by ldap clients
errorCode = "89";
} else {
if ( ind > 0 ) {
} else errorCode = "0";
}
}
try {
}
}
} catch (NamingException ne) {
}
}
}