#if !USE_OPENSSL
debugs(0, DBG_CRITICAL, "WARNING: cache_peer option '" << token << "' requires --with-openssl");
#else
- p->secure.encryptTransport = true;
p->secure.parse(token+3);
#endif
} else if (strncmp(token, "tls-", 4) == 0) {
- p->secure.encryptTransport = true;
p->secure.parse(token+4);
} else if (strcmp(token, "front-end-https") == 0) {
p->front_end_https = 1;
void
Security::PeerOptions::parse(const char *token)
{
+ if (!*token) {
+ // config says just "ssl" or "tls" (or "tls-")
+ encryptTransport = true;
+ return;
+ }
+
if (strncmp(token, "disable", 7) == 0) {
clear();
- } else if (strncmp(token, "cert=", 5) == 0) {
+ return;
+ }
+
+ if (strncmp(token, "cert=", 5) == 0) {
certFile = SBuf(token + 5);
if (privateKeyFile.isEmpty())
privateKeyFile = certFile;
sslDomain = SBuf(token + 7);
} else {
debugs(3, DBG_CRITICAL, "ERROR: Unknown TLS option '" << token << "'");
+ return;
}
+
+ encryptTransport = true;
}
void