diff --git a/entrypoint.sh b/entrypoint.sh index f8ef189..ca327f4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,8 +10,7 @@ fi set +e cd /home/ervu/cacerts -echo o | /opt/cprocsp/bin/amd64/certmgr -install -store uRoot -file testgost2012_10.crt -echo o | /opt/cprocsp/bin/amd64/certmgr -install -store uRoot -thumbprint 67aea9fc8041cfafafbb77c4837038f05e727501 -file testroot.p7b +echo o | /opt/cprocsp/bin/amd64/certmgr -install -store uRoot -file test_ca_2014.crt set -e /opt/ervu-sign-module/ervu-sign-module diff --git a/src/modules/service_sign.c b/src/modules/service_sign.c index af94665..78bf9f7 100644 --- a/src/modules/service_sign.c +++ b/src/modules/service_sign.c @@ -78,6 +78,16 @@ sign_conf_load(sign_conf_t *conf, const conf_file_context_t conf_file) goto error; } + if (str_t_is_null(conf->sign_cert_thumbprint)) { + LOG_ERROR(SIGN_CONF_SECTION ":" SIGN_CONF_KEY_SIGN_CERT_THUMBPRINT " is required"); + goto error; + } + + if (str_t_is_null(conf->sign_cert_password)) { + LOG_ERROR(SIGN_CONF_SECTION ":" SIGN_CONF_KEY_SIGN_CERT_PASSWORD " is required"); + goto error; + } + LOG_TRACE("sign_conf_load exit"); return 0; diff --git a/src/modules/service_verify.c b/src/modules/service_verify.c index 1fcfd80..521be5e 100644 --- a/src/modules/service_verify.c +++ b/src/modules/service_verify.c @@ -74,6 +74,11 @@ verify_conf_load(verify_conf_t *conf, const conf_file_context_t conf_file) goto error; } + if (conf->esia_cert_thumbprint_list.size == 0) { + LOG_ERROR(VERIFY_CONF_SECTION ":" VERIFY_CONF_KEY_THUMBPRINT " is required"); + goto error; + } + LOG_TRACE("verify_conf_load exit"); return 0;