1
0
Fork 0
mirror of https://github.com/kakwa/uts-server synced 2025-07-04 20:47:09 +02:00

enabling multi-threads support

as TS_RESP_CTX is not thread safe, this commit implement a pool of
TS_RESP_CTX in which a thread can pick one in a thread safe maner.

* implement a ts_resp_ctx_wrapper containing a TS_RESP_CTX and a
  lock and bool to mark the availability of the TS_RESP_CTX
* implement the get_ctxw to recover a given TS_RESP_CTX in a thread safe
   maner
* adapt the rest of the code to accomodate the new way of doing things
* set the default number of threads to 10 as it's now safe to do so
This commit is contained in:
kakwa 2016-09-08 23:21:53 +02:00
parent 81d7a808cb
commit e948177a41
6 changed files with 56 additions and 12 deletions

View file

@ -38,5 +38,6 @@ static int save_ts_serial(const char *serialfile, ASN1_INTEGER *serial);
TS_RESP_CTX *create_tsctx(rfc3161_context *ct, CONF *conf, const char *section,
const char *policy);
int add_oid_section(rfc3161_context *ct, CONF *conf);
ts_resp_ctx_wrapper *get_ctxw(rfc3161_context *ct);
void init_ssl();
void free_ssl();