| | |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.ldap.CompareRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.CompareResponseProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.ProtocolOp; |
| | | import org.opends.server.types.NullOutputStream; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.util.EmbeddedUtils; |
| | | import org.opends.server.util.PasswordReader; |
| | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | import org.opends.server.controls.LDAPAssertionRequestControl; |
| | | |
| | | |
| | | /** |
| | |
| | | LDAPCompareOptions compareOptions) |
| | | throws IOException, LDAPException |
| | | { |
| | | ArrayList<LDAPControl> controls = compareOptions.getControls(); |
| | | ASN1OctetString dnOctetStr = new ASN1OctetString(line); |
| | | ASN1OctetString attrValOctetStr = new ASN1OctetString(attributeVal); |
| | | ArrayList<Control> controls = compareOptions.getControls(); |
| | | ByteString dnOctetStr = ByteString.valueOf(line); |
| | | ByteString attrValOctetStr = ByteString.wrap(attributeVal); |
| | | |
| | | ProtocolOp protocolOp = new CompareRequestProtocolOp(dnOctetStr, |
| | | attributeType, attrValOctetStr); |
| | |
| | | { |
| | | for (String ctrlString : controlStr.getValues()) |
| | | { |
| | | LDAPControl ctrl = LDAPToolUtils.getControl(ctrlString, err); |
| | | Control ctrl = LDAPToolUtils.getControl(ctrlString, err); |
| | | if(ctrl == null) |
| | | { |
| | | Message message = ERR_TOOL_INVALID_CONTROL_STRING.get(ctrlString); |
| | |
| | | { |
| | | filter = LDAPFilter.decode(filterString); |
| | | |
| | | LDAPControl assertionControl = |
| | | new LDAPControl(OID_LDAP_ASSERTION, true, |
| | | new ASN1OctetString(filter.encode().encode())); |
| | | Control assertionControl = |
| | | new LDAPAssertionRequestControl(true, filter); |
| | | compareOptions.getControls().add(assertionControl); |
| | | } |
| | | catch (LDAPException le) |