summaryrefslogtreecommitdiffstats
path: root/crypto/ts
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-09-30 13:50:34 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-10-08 16:57:34 +0200
commit55c61473b52aff9fd5217aec543b3d25beea0531 (patch)
treef13404802a058fa10cfe9b2d486149bca9ad0fc4 /crypto/ts
parent02a2567173a451d8d00c276e6d8c1d1cb171234d (diff)
Correct and simplify use of ERR_clear_error() etc. for loading DSO libs
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13045)
Diffstat (limited to 'crypto/ts')
-rw-r--r--crypto/ts/ts_conf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/ts/ts_conf.c b/crypto/ts/ts_conf.c
index 5418bc8bbf..55fae481e1 100644
--- a/crypto/ts/ts_conf.c
+++ b/crypto/ts/ts_conf.c
@@ -17,6 +17,7 @@
#include <openssl/pem.h>
#include <openssl/engine.h>
#include <openssl/ts.h>
+#include <openssl/conf_api.h>
/* Macro definitions for the configuration file. */
#define BASE_SECTION "tsa"
@@ -418,7 +419,7 @@ int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx)
return ret;
}
-int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section,
+int TS_CONF_set_clock_precision_digits(const CONF *conf, const char *section,
TS_RESP_CTX *ctx)
{
int ret = 0;
@@ -427,9 +428,7 @@ int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section,
/*
* If not specified, set the default value to 0, i.e. sec precision
*/
- if (!NCONF_get_number_e(conf, section, ENV_CLOCK_PRECISION_DIGITS,
- &digits))
- digits = 0;
+ digits = _CONF_get_number(conf, section, ENV_CLOCK_PRECISION_DIGITS);
if (digits < 0 || digits > TS_MAX_CLOCK_PRECISION_DIGITS) {
ts_CONF_invalid(section, ENV_CLOCK_PRECISION_DIGITS);
goto err;