[Date Prev][Date Next] [Chronological] [Thread] [Top]

How to use JLDAP to search for an entry in OpenLDAP using a binary search filter?


This is a question about JLDAP and OpenLDAP, specifically about searching 
using binary attribute values.

I'm using JLDAP to access OpenLDAP and I need to search for an entry using a 
binary identifier. The only posting I could find about this is at this link, 
but I wasn't able to understand the response: 

I was wondering if anyone could answer this question for me.

I have 2 options: (1) store the binary value as a base64 encoded string to 
start with, so that I can query it as a string search filter, (2) to store 
it in binary form and query it in binary form as well. I'm trying to use 
option (2) if possible.

For option 2, I have the binary value to search for as a byte array 
(byte[]). The current JLDAP apis don't seem to have an option to specify a 
search filter for a byte[] value.

To cut the question short, to search for [binaryId = <somebinarydata>], what 
would the JLDAPConnection.search() method take as parameters against an 
OpenLDAP server?

Thanks in advance,