Commit 6cc33820d166bc790c79f8e42aec8f53bcefd2ba
tls: permit wildcard ALPN/SNI values
Use fnmatch(3) to provide support for glob style wildcard values in the ALPN and SNI parameters of the TLS probe. Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>Jonathan McCrohan committed on 6/6/2017, 12:11:29 AM
Parent: 00d5872aa176a23588f143551aa4b7e8dd1c0ca6
Files changed
tls.c | changed |
tls.c | ||
---|---|---|
@@ -29,8 +29,9 @@ | ||
29 | 29 | * TLS handshake and RFC4366. |
30 | 30 | */ |
31 | 31 | |
32 | 32 | |
33 | + | |
33 | 34 | |
34 | 35 | |
35 | 36 | |
36 | 37 | |
@@ -289,9 +290,9 @@ | ||
289 | 290 | char **item; |
290 | 291 | |
291 | 292 | for (item = list; *item; item++) { |
292 | 293 | if (verbose) fprintf(stderr, "matching [%.*s] with [%s]\n", (int)name_len, name, *item); |
293 | - if(!strncmp(*item, name, name_len)) { | |
294 | + if(!fnmatch(*item, name, 0)) { | |
294 | 295 | return 1; |
295 | 296 | } |
296 | 297 | } |
297 | 298 | return 0; |
Built with git-ssb-web