[JNDI][LDAP] Binary filter in search

J

JScoobyCed

Hi,

I am performing a DirContext.search(...)
The parameters of the filter are binary (byte[]).
I have triied to encode as String the byte[], but it returns no result:


public Attributes getUserByObjectSid(byte bSidP) {
String strSid = new String(bSidP,"xxx"); // I triied several encoding
SearchControl sc = getSearchControl();
NamingEnumeration ne = null;
ne = ctx.search("DC=qa","(objectSid="+strSid+")",sc);
//...
}

but the search() returns no element...
The bSidP parameter comes fom a different search query on a different
Active Directoryserver.
The env.put("java.naming.ldap.attributes.binary", "objectSid")
is used to make sure I have the right byte[]

Thanks for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top