summaryrefslogtreecommitdiff
path: root/lib/rsp_tlscommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rsp_tlscommon.c')
-rw-r--r--lib/rsp_tlscommon.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/rsp_tlscommon.c b/lib/rsp_tlscommon.c
index a34fe33..75aa891 100644
--- a/lib/rsp_tlscommon.c
+++ b/lib/rsp_tlscommon.c
@@ -271,14 +271,15 @@ static SSL_CTX *tlscreatectx(uint8_t type, struct tls *conf) {
}
}
- if (!tlsaddcacrl(ctx, conf)) {
- if (conf->vpm) {
- X509_VERIFY_PARAM_free(conf->vpm);
- conf->vpm = NULL;
- }
- SSL_CTX_free(ctx);
- return NULL;
- }
+ if (conf->cacertfile != NULL || conf->cacertpath != NULL)
+ if (!tlsaddcacrl(ctx, conf)) {
+ if (conf->vpm) {
+ X509_VERIFY_PARAM_free(conf->vpm);
+ conf->vpm = NULL;
+ }
+ SSL_CTX_free(ctx);
+ return NULL;
+ }
debug(DBG_DBG, "tlscreatectx: created TLS context %s", conf->name);
return ctx;