Github user SolidWallOfCode commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/992#discussion_r78580820
--- Diff: iocore/net/SSLCertLookup.cc ---
@@ -346,48 +349,30 @@ int
SSLContextStorage::insert(const char *name, int idx)
{
ats_wildcard_matcher wildcard;
- bool inserted = false;
+ InkHashTableValue value;
+ char lower_case_name[TS_MAX_HOST_NAME_LEN + 1];
if (wildcard.match(name)) {
- // We turn wildcards into the reverse DNS form, then insert them into
the trie
- // so that we can do a longest match lookup.
- char namebuf[TS_MAX_HOST_NAME_LEN + 1];
- char *reversed;
- ats_scoped_obj<ContextRef> ref;
-
- reversed = reverse_dns_name(name + 1, namebuf);
- if (!reversed) {
- Error("wildcard name '%s' is too long", name);
- return -1;
+ // Strip the wildcard and store the subdomain
+ const char *subdomain = index(name, '*');
+ if (subdomain) {
+ subdomain = index(subdomain, '.');
--- End diff --
Isn't it required that `subdomain[1] == '.'`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---