Skip to content

Commit 6cb7e59

Browse files
committed
Merge pull request #164 from florida63/fix-sslpeerverification
add LOG_ERR for SSLPeerVerification and SSLAvailable
2 parents 68c516c + 2d5503d commit 6cb7e59

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/conf.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,11 @@ parse_auth_server(FILE * file, const char *filename, int *linenum)
329329
break;
330330
case oAuthServSSLAvailable:
331331
ssl_available = parse_boolean_value(p2);
332-
if (ssl_available < 0)
333-
ssl_available = 0;
332+
if (ssl_available < 0) {
333+
debug(LOG_WARNING, "Bad syntax for Parameter: SSLAvailable on line %d " "in %s."
334+
"The syntax is yes or no." , *linenum, filename);
335+
exit(-1);
336+
}
334337
break;
335338
case oBadOption:
336339
default:
@@ -746,8 +749,11 @@ config_read(const char *filename)
746749
break;
747750
case oSSLPeerVerification:
748751
config.ssl_verify = parse_boolean_value(p1);
749-
if (config.ssl_verify < 0)
750-
config.ssl_verify = 0;
752+
if (config.ssl_verify < 0) {
753+
debug(LOG_WARNING, "Bad syntax for Parameter: SSLPeerVerification on line %d " "in %s."
754+
"The syntax is yes or no." , linenum, filename);
755+
exit(-1);
756+
}
751757
#ifndef USE_CYASSL
752758
debug(LOG_WARNING, "SSLPeerVerification is set but no SSL compiled in. Ignoring!");
753759
#endif

wifidog.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ GatewayInterface br-lan
165165
ClientTimeout 5
166166

167167
# Parameter: SSLPeerVerification
168-
# Default: Yes
168+
# Default: yes
169169
# Optional
170170
#
171171
# Enable peer certificate verification when talking to the auth
172172
# server over SSL/TLS. Disabling this setting is mainly useful if
173173
# you do not want to install ca-certificates.
174174
#
175-
# If this setting is set to Yes, then the certificates in
175+
# If this setting is set to yes, then the certificates in
176176
# the directory indicated by SSLCertPath will be used to
177177
# verify the auth server.
178178
#
@@ -183,15 +183,15 @@ ClientTimeout 5
183183
# to False for the auth server in question. Note that this will disable
184184
# HTTPS when redirecting clients to your auth server.
185185
#
186-
# SSLPeerVerification Yes
186+
# SSLPeerVerification yes
187187

188188
# Parameter: SSLCertPath
189189
# Default: /etc/ssl/certs/
190190
# Optional
191191
#
192192
# Where to look for SSL certificates to verify the auth servers
193193
# certificate. Note that these will only be used if the auth server
194-
# in question is configured with SSLAvailable Yes.
194+
# in question is configured with SSLAvailable yes.
195195
#
196196
# The certificates in this directory must be named by their hash
197197
# value. For OpenWRT, you need a ca-certificates package newer

0 commit comments

Comments
 (0)