crypto engine

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue May 6 17:00:46 CEST 2008


Nikos Mavrogiannopoulos wrote:

>>   do this instead:
>>
>> typedef int (*gnutls_rng_init_func)( void** ctx);
>> typedef int (*gnutls_rng_rnd_func) ( void* ctx, gnutls_rnd_level_t level, void* data, int datasize);
>> typedef void (*gnutls_rng_deinit_func)( void* ctx);
>>
>> int gnutls_crypto_rnd_register( int priority,
>>                                 gnutls_rng_init_func init,
>>                                 gnutls_rng_rnd_func rnd,
>>                                 gnutls_rng_deinit_func deinit);
> 
> I'm really thinking doing this. The only bad thing is that because of
> the many functions that need to be registered the API would be quite
> ugly, but anyway it would allow us to maintain a stable api.

And it is seems that the API is quite ugly and cumbersome to use (such
as a function with 24 arguments). I'll keep the current struct based API
but I'll added some versioning information in the registration functions
to avoid modifying a structure with different version.





More information about the Gnutls-devel mailing list