[gnutls-devel] gnutls_x509_dn_get_rdn_ava and sequences

Nikos Mavrogiannopoulos nmav at gnutls.org
Fri Jan 24 10:16:38 CET 2014

On Fri, Jan 24, 2014 at 9:18 AM, Kurt Roeckx <kurt at roeckx.be> wrote:
>> > But I'm little confused why gnutls is showing me the data like that.
>> > I was expecting to just get a type 12 (UTF8String) from the
>> > gnutls_x509_dn_get_rdn_ava() since it says it's supposed to model
>> > the sequence of sequences.
>> It models the sequence of sequences in the DN itself, not any possible
>> sequence within the individual fields. The postalAddress field as you
>> notice is a sequence as well. That's why you see that difference and
>> that's the reason it is not being decoded by default.
> So are there some functions I can use that to go over that
> sequence, or do I need to write my own parser?

You can decode it using libtasn1 or even a custom parser. If you do a
patch for gnutls to decode it would also be appreciated.


More information about the Gnutls-devel mailing list