We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6461410 commit acb71c0Copy full SHA for acb71c0
trantor/net/inner/TcpConnectionImpl.cc
@@ -84,21 +84,30 @@ inline std::string certNameToRegex(const std::string &certName)
84
result.reserve(certName.size() + 11);
85
86
bool isStar = false;
87
+ bool isLeadingStar = true;
88
for (char ch : certName)
89
{
90
if (isStar == false)
91
92
if (ch == '*')
93
isStar = true;
94
+ else if (ch == '.')
95
+ {
96
+ result += "\\.";
97
+ isLeadingStar = false;
98
+ }
99
else
100
101
result.push_back(ch);
102
103
104
}
105
106
- if (ch == '.')
107
+ if (ch == '.' && isLeadingStar)
108
result += "([^.]*\\.|)?";
109
- result += std::string("\\*") + ch;
110
+ result += std::string("[^.]*") + ch;
111
isStar = false;
112
113
0 commit comments