Module: sip-router
Branch: andrei/tcp_tls_changes
Commit: 59f603ace872b2b4b05048b2e57b982b42f7aebe
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=59f603a…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri May 28 13:22:00 2010 +0200
tls: fix empty files treatment
Empty filenames ("") are now treated as unset.
---
modules/tls/tls_domain.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/tls/tls_domain.c b/modules/tls/tls_domain.c
index 793bf58..762991a 100644
--- a/modules/tls/tls_domain.c
+++ b/modules/tls/tls_domain.c
@@ -336,7 +336,7 @@ static int load_cert(tls_domain_t* d)
int i;
int procs_no;
- if (!d->cert_file.s) {
+ if (!d->cert_file.s || !d->cert_file.len) {
DBG("%s: No certificate configured\n", tls_domain_str(d));
return 0;
}
@@ -363,7 +363,7 @@ static int load_ca_list(tls_domain_t* d)
int i;
int procs_no;
- if (!d->ca_file.s) {
+ if (!d->ca_file.s || !d->ca_file.len) {
DBG("%s: No CA list configured\n", tls_domain_str(d));
return 0;
}
@@ -697,7 +697,7 @@ static int load_private_key(tls_domain_t* d)
int idx, ret_pwd, i;
int procs_no;
- if (!d->pkey_file.s) {
+ if (!d->pkey_file.s || !d->pkey_file.len) {
DBG("%s: No private key specified\n", tls_domain_str(d));
return 0;
}