Re: How do I view "?ASN?......" strings meaningfully?

Tim Howes (tim@umich.edu)
Mon, 05 Feb 1996 14:33:36 -0500

> From: Nils Andreas Thommesen <Nils.Thommesen@kvatro.no>
> To: ldap@umich.edu

> When reading the information stored about one entry using LDAP, I do something
- like this:
>
> executing the search to find the entry: ldap_search( )
> waiting for results with ldap_result( )
> getting the first entry ldap_first_entry( )
> looping through all attributes returned, using ldap_first_attribute and ldap_n
- ext_attribute
> for each attribute, I read the values, using ldap_get_values
>
> Almost all attributes are readable strings, but some are ASN.1 strings, which
- look like this
> "{ASN}...Here.follows.lots.of.unreadable.text...".
>
> How can I decode these?

What follows the {ASN} tag is a hex representation of the BER encoded
value. ldapd just returns whatever quipu gives it for attributes it does
not know about, and it's up to you to know BER to decode it. The routines
in liblber might be useful for this, but I'm guessing not very. The short
answer is that you need to know BER to decode it. -- Tim