help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnutls] Re: Certificate list size in `gnutls_certificate_get_peers


From: Simon Josefsson
Subject: [Help-gnutls] Re: Certificate list size in `gnutls_certificate_get_peers ()'
Date: Thu, 12 Apr 2007 14:38:58 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hey,
>
> Simon Josefsson <address@hidden> writes:
>
>> address@hidden (Ludovic Courtès) writes:
>>
>>> Hi,
>>>
>>> Simon Josefsson <address@hidden> writes:
>>>
>>>> I just realized that we can solve it without an ABI/API change: just
>>>> make the array zero-terminated.  You'll have to traverse the list in
>>>> order to find out its size, but perhaps that is not so much trouble.
>>>> What do you think?
>>>
>>> Yes, good idea.
>>
>> Patches welcome. :)  I'm a bit busy now, but perhaps next week...
>
> Looks like it may be more complicated than it seems because we don't
> have such an array internally.  What we have is an array of
> `gnutls_cert's, each of which contains both the raw certificate and the
> parsed certificate (see `session->internals.selected_cert_list').
>
> Thus, to provide a (null-terminated) array of raw certificates in
> `gnutls_certificate_get_ours ()', we'd need to allocate that array or
> ask users for storage.
>
> Or we could change the `gnutls_cert' structure so that it no longer
> includes `raw' and store the raw certificates elsewhere.  But that would
> certainly have unforeseen implications on the rest of the code...  ;-)

Right, I was thinking of the latter solution, and I also found that it
would require some larger changes.

> I'm a bit busy, too, so I probably won't investigate it any further ATM.

I've added a TODO:

- Make gnutls_certificate_get_out return a zero-terminated array (or
  add a new API that return the size of the array).

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]