summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-11-18 09:44:05 +0000
committerLaurent Bercot <ska@appnovation.com>2021-11-18 09:44:05 +0000
commit069e3184359c76f8bb4aa3e7c62a69d571b478ac (patch)
treecd71ef285e7ceb4e5a25de6c5cd57180e26dd23a
parentcd8afb68b8bc189a0ab618536918e93f1ef864a6 (diff)
downloads6-networking-069e3184359c76f8bb4aa3e7c62a69d571b478ac.tar.xz
SNI matches are case-insensitive
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/sbearssl/sbearssl_sni_policy_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sbearssl/sbearssl_sni_policy_init.c b/src/sbearssl/sbearssl_sni_policy_init.c
index 3446f35..e03c15a 100644
--- a/src/sbearssl/sbearssl_sni_policy_init.c
+++ b/src/sbearssl/sbearssl_sni_policy_init.c
@@ -1,6 +1,6 @@
/* ISC license. */
-#include <string.h>
+#include <strings.h>
#include <bearssl.h>
@@ -20,7 +20,7 @@ static void *sbearssl_sni_policy_node_dtok (uint32_t d, void *data)
static int sbearssl_sni_policy_node_cmp (void const *a, void const *b, void *data)
{
(void)data ;
- return strcmp((char const *)a, (char const *)b) ;
+ return strcasecmp((char const *)a, (char const *)b) ;
}
void sbearssl_sni_policy_init (sbearssl_sni_policy_context *pol)