[Asterisk-code-review] Prevent Undefined Capath Crash (asterisk[master])
Joshua Elson
asteriskteam at digium.com
Thu May 4 17:37:19 CDT 2017
Joshua Elson has uploaded a new change for review. ( https://gerrit.asterisk.org/5585 )
Change subject: Prevent Undefined Capath Crash
......................................................................
Prevent Undefined Capath Crash
It is possible to initialize a valid config without a capath
or cafile definition. This will cause a crash on a reload.
This fix ensures capath is always allocated.
ASTERISK-26983 #close
Change-Id: I63ff715d9d9023427543a5b8a4ba7b0d82533c12
---
M main/tcptls.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/5585/1
diff --git a/main/tcptls.c b/main/tcptls.c
index a3c7dfa..53822df 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -448,6 +448,8 @@
if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) {
ast_log(LOG_ERROR, "TLS/SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath);
}
+ } else {
+ cfg->capath = NULL;
}
#ifdef HAVE_OPENSSL_EC
--
To view, visit https://gerrit.asterisk.org/5585
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63ff715d9d9023427543a5b8a4ba7b0d82533c12
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Elson <joshelson at gmail.com>
More information about the asterisk-code-review
mailing list