diff --git a/conf/uts-server.cnf b/conf/uts-server.cnf index 766e31f..c345153 100644 --- a/conf/uts-server.cnf +++ b/conf/uts-server.cnf @@ -102,15 +102,9 @@ tcp_nodelay = 0 # Loglevel (debug, info, notice, warn, err, emerg, crit) log_level = info -# Section defining which TSA section to use. +# TSA configuration parameters [ tsa ] -# Name of the TSA section to use as default. -default_tsa = tsa_config1 - -# Example of Time-Stamp section configuration. -[ tsa_config1 ] - # TSA root directory. dir = /etc/uts-server/pki diff --git a/inc/rfc3161.h b/inc/rfc3161.h index a721bf6..640c397 100644 --- a/inc/rfc3161.h +++ b/inc/rfc3161.h @@ -14,6 +14,7 @@ /* Name of config entry that defines the OID file. */ #define OID_SECTION "oids" +#define TSA_SECTION "tsa" // number of char we get to log for the serial #define SERIAL_ID_SIZE 8 diff --git a/src/lib/rfc3161.c b/src/lib/rfc3161.c index fca94c9..0a9d514 100644 --- a/src/lib/rfc3161.c +++ b/src/lib/rfc3161.c @@ -120,11 +120,11 @@ TS_RESP_CTX *create_tsctx(rfc3161_context *ct, CONF *conf, const char *section, TS_RESP_CTX *resp_ctx = NULL; // recover the section defining the default tsa - if ((section = TS_CONF_get_tsa_section(conf, section)) == NULL) { - uts_logger(ct, LOG_ERR, "failed to get or use '%s' in section [ %s ]", - "default_tsa", "tsa"); - goto end; - } + //if ((section = TS_CONF_get_tsa_section(conf, section)) == NULL) { + // uts_logger(ct, LOG_ERR, "failed to get or use '%s' in section [ %s ]", + // "default_tsa", "tsa"); + // goto end; + //} if ((resp_ctx = TS_RESP_CTX_new()) == NULL) { uts_logger(ct, LOG_ERR, "failed to initialize tsa context"); goto end; diff --git a/src/lib/utils.c b/src/lib/utils.c index fc93c3f..4a83022 100644 --- a/src/lib/utils.c +++ b/src/lib/utils.c @@ -362,7 +362,7 @@ int set_params(rfc3161_context *ct, char *conf_file, char *conf_wd) { ct->ts_ctx_pool = calloc(numthreads, sizeof(ts_resp_ctx_wrapper)); ct->numthreads = numthreads; for (int i = 0; i < numthreads; i++) { - ct->ts_ctx_pool[i].ts_ctx = create_tsctx(ct, ct->conf, NULL, NULL); + ct->ts_ctx_pool[i].ts_ctx = create_tsctx(ct, ct->conf, TSA_SECTION, NULL); ct->ts_ctx_pool[i].available = 1; if (ct->ts_ctx_pool[i].ts_ctx == NULL) ret = 0; diff --git a/tests/cfg/uts-server-ssl.cnf b/tests/cfg/uts-server-ssl.cnf index 5eebecd..9c145cb 100644 --- a/tests/cfg/uts-server-ssl.cnf +++ b/tests/cfg/uts-server-ssl.cnf @@ -81,13 +81,6 @@ log_level = info #################################################################### [ tsa ] -# The default TSA section. -default_tsa = tsa_config1 - -[ tsa_config1 ] - -# These are used by the TSA reply generation only. - # TSA root directory dir = ./pki diff --git a/tests/cfg/uts-server.cnf b/tests/cfg/uts-server.cnf index 0cef8a6..010ceea 100644 --- a/tests/cfg/uts-server.cnf +++ b/tests/cfg/uts-server.cnf @@ -81,13 +81,6 @@ log_level = info #################################################################### [ tsa ] -# The default TSA section. -default_tsa = tsa_config1 - -[ tsa_config1 ] - -# These are used by the TSA reply generation only. - # TSA root directory dir = ./pki