help-gnutls
[Top][All Lists]
Advanced

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

Re: Question about gnutls_global_set_log_function()


From: Nikos Mavrogiannopoulos
Subject: Re: Question about gnutls_global_set_log_function()
Date: Sat, 18 Aug 2012 09:21:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120805 Icedove/10.0.6

On 08/17/2012 09:06 PM, Murray S. Kucherawy wrote:

> I'm writing a multithreaded application that could be doing RSA
> signature generations and/or validations in parallel.
> 
> Right now gnutls_global_set_log_function() allows me to specify an
> error reporting function, but in theory any thread could call it.  It
> would be helpful to receive something thread-specific in the function
> I provide to gnutls_global_set_log_function() so that, for example, a
> buffer could be assigned per thread to receive this information.


Indeed. However this is a debugging function, not one that is typically
expected to run. Which error conditions do you try to catch using those?

The only related function I can see is
gnutls_global_set_audit_log_function() which supplies the session argument.

> As it stands right now I have to do something like a pthread_key to
> get thread-specific storage from the underlying threading
> implementation.  Not having that dependency would be desirable.  Being
> able to add gnutls_set_thread_specific() that stores a thread-specific
> pointer would be helpful, and then that could be done inside my global
> log function to take thread-specific action.


What do you mean? Where would the thread-specific pointer would be stored?

regards,
Nikos



reply via email to

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