mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 07:13:36 +02:00
Disallow wildcard matching of a TLD specified as a FQDN.
Found by Frank Denis. ok tb@
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tls_verify.c,v 1.33 2026/03/28 11:33:33 tb Exp $ */
|
||||
/* $OpenBSD: tls_verify.c,v 1.34 2026/05/30 17:06:09 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
|
||||
*
|
||||
@@ -59,6 +59,9 @@ tls_match_name(const char *cert_name, const char *name)
|
||||
/* Disallow "*.bar" */
|
||||
if (next_dot == NULL)
|
||||
return -1;
|
||||
/* Disallow "*.bar." */
|
||||
if (next_dot[1] == '\0')
|
||||
return -1;
|
||||
/* Disallow "*.bar.." */
|
||||
if (next_dot[1] == '.')
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user