[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: How to use JLDAP to search for an entry in OpenLDAP using a binary search filter?
I believe you can escape the bytes in the filter with a "\". So your filter would be "(byBinaryVal=\\2B\\1A)"
Marc
On 9/16/05, Safdar Kureishy <safdar.kureishy@gmail.com> wrote:
Hi,
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:
http://www.openldap.org/lists/openldap-devel/200009/msg00096.html.
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,
Safdar