[PATCH] session ticket support

Simon Josefsson simon at josefsson.org
Wed Aug 5 10:08:02 CEST 2009


Daiki Ueno <ueno at unixuser.org> writes:

>>>>>> In <87ws5jkc62.fsf at mocca.josefsson.org> 
>>>>>>	Simon Josefsson <simon at josefsson.org> wrote:
>> I suggest renaming these APIs like this:
>
>>  gnutls_session_ticket_key_allocate
>>  gnutls_session_ticket_key_randomize
>>  gnutls_session_ticket_key_import
>>  gnutls_session_ticket_key_export
>
> Thanks for the suggestion.  I'll reflect them in the next patch.

Great.

>> Also, what do you think about a 'gnutls_session_ticket_key_format_t'
>> parameter?  I think some people may want to export the key in
>> text-format rather than raw binary.
>
> As another option, how about making gnutls_session_ticket_key_t a public
> struct so that people can write custom export function?

Thinking about that, doesn't a gnutls_datum_t suffice?  Then you don't
need the import/export functions at all.  Possibly the
allocate+randomize function could also be merged into one API:

  int gnutls_session_ticket_key_generate (gnutls_datum_t *key);

The function would allocate and randomize key->data and set key->size
accordingly.  The key->data field needs to be released using gnutls_free
as usual.

/Simon





More information about the Gnutls-devel mailing list