Possible bug in CRQ code, or possible user error?

Richard Moore rich at kde.org
Wed Dec 5 00:32:14 CET 2012


On 4 December 2012 23:23, Nikos Mavrogiannopoulos <nmav at gnutls.org> wrote:
> On 12/05/2012 12:09 AM, Richard Moore wrote:
>
>> Hi,
>>
>> I've been trying to access the name fields of certificate requests
>> using gnutls, and I'm not getting any joy, I've included the code
>> below. Is this something I'm doing wrong, or is there a bug here? I
>> always get -56 (The requested data were not available). I've looked
>> over the test cases for this case, and accessing these fields doesn't
>> seem to be covered. Any hints?
>
>
> Hello,
>  Do you mean the DistinguishedName fields? Did you try the:
> gnutls_x509_crq_get_dn_by_oid() and gnutls_x509_crq_get_dn()?
>
>>         d->errno = gnutls_x509_crq_get_attribute_data(d->crq, index,
>>         d->errno = gnutls_x509_crq_get_attribute_by_oid(d->crq,
>
> The functions that you use in your example above are used to set
> additional attributes to the certificate request (that have nothing to
> do with names -e.g. the challenge password is one of those).

Yep, that was it - thanks a lot for spotting I'm an idiot! :-)

Regards

Rich.




More information about the Gnutls-help mailing list