/*
- * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
bool
ACLServerNameData::match(const char *host)
{
- if (host == NULL)
+ if (host == nullptr)
return 0;
debugs(28, 3, "checking '" << host << "'");
debugs(28, 3, "'" << host << "' " << (result ? "found" : "NOT found"));
- return (result != NULL);
+ return (result != nullptr);
}
-ACLData<char const *> *
-ACLServerNameData::clone() const
-{
- /* Splay trees don't clone yet. */
- assert (!domains);
- return new ACLServerNameData;
-}
-
/// A helper function to be used with Ssl::matchX509CommonNames().
/// \retval 0 when the name (cn or an alternate name) matches acl data
/// \retval 1 when the name does not match
int
ACLServerNameStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
{
- assert(checklist != NULL && checklist->request != NULL);
+ assert(checklist != nullptr && checklist->request != nullptr);
const char *serverName = nullptr;
SBuf clientSniKeeper; // because c_str() is not constant
const Acl::Options &
ACLServerNameStrategy::options()
{
- static const Acl::BooleanOption ClientRequested;
- static const Acl::BooleanOption ServerProvided;
- static const Acl::BooleanOption Consensus;
- static const Acl::Options MyOptions = {
- {"--client-requested", &ClientRequested},
- {"--server-provided", &ServerProvided},
- {"--consensus", &Consensus}
- };
-
+ static const Acl::BooleanOption ClientRequested("--client-requested");
+ static const Acl::BooleanOption ServerProvided("--server-provided");
+ static const Acl::BooleanOption Consensus("--consensus");
+ static const Acl::Options MyOptions = { &ClientRequested, &ServerProvided, &Consensus };
ClientRequested.linkWith(&useClientRequested);
ServerProvided.linkWith(&useServerProvided);
Consensus.linkWith(&useConsensus);