[Opendnssec-develop] proposed libhsm API

Jelte Jansen jelte at NLnetLabs.nl
Mon Apr 27 07:58:45 UTC 2009


John Dickinson wrote:
> 
>>> In other words we either need to keep track of the thread or give out 
>>> session ids via the libhsm interface. A session id which needs to be 
>>> translated to the session id within the HSM.
>>
> 
> Forgive my naivety but the only thing that needs to be threaded ever is
> 
> ldns_rr* hsm_sign_rrset(const ldns_rr_list* rrset, const hsm_key_t *key);
> 
> so how about
> 
> ldns_rr* hsm_sign_rrset(const ldns_rr_list* rrset, const hsm_key_t *key, 
> int thread_id);
> 

why not define a hsm_ctx, have that one be returned by what is currently
hsm_autoconf(), and pass it around to all other functions? Then we don't need 
global variables, and if someone wants to do multithreading with one ctx he can 
lock that himself.

Jelte



More information about the Opendnssec-develop mailing list