Skip to content

Commit

Permalink
improve config check error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed Jul 22, 2021
1 parent 7fa69df commit f07b1f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ int confclient_cb(struct gconffile **cf, void *arg, char *block, char *opt, char
? tlsgettls(conf->tls, NULL)
: tlsgettls("defaultClient", "default");
if (!conf->tlsconf)
debugx(1, DBG_ERR, "error in block %s, no tls context defined", block);
debugx(1, DBG_ERR, "error in block %s, tls context not defined", block);
if (matchcertattrs) {
for (i=0; matchcertattrs[i]; i++){
if (!addmatchcertattr(conf, matchcertattrs[i])) {
Expand Down Expand Up @@ -2485,7 +2485,7 @@ int confclient_cb(struct gconffile **cf, void *arg, char *block, char *opt, char
existing->tlsconf != conf->tlsconf &&
hostportmatches(existing->hostports, conf->hostports, 0)) {

debugx(1, DBG_ERR, "error in block %s, overlapping clients must reference the same tls block", block);
debugx(1, DBG_ERR, "error in block %s, masked by overlapping (equal or less specific IP/prefix) client %s with different tls block", block, existing->name);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tlscommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ struct tls *tlsgettls(char *alt1, char *alt2) {
struct tls *t;

t = hash_read(tlsconfs, alt1, strlen(alt1));
if (!t)
if (!t && alt2)
t = hash_read(tlsconfs, alt2, strlen(alt2));
return t;
}
Expand Down

0 comments on commit f07b1f7

Please sign in to comment.