Blob Blame History Raw
From 500b87127e6c4edc5f7182cc1a5261c4f96f38e1 Mon Sep 17 00:00:00 2001
From: Chris <ccpp@gmx.at>
Date: Mon, 17 Jun 2013 21:26:35 +0200
Subject: [PATCH 4/5] Using the more efficient code for comparing host names

---
 libfreerdp-core/tls.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/libfreerdp-core/tls.c b/libfreerdp-core/tls.c
index db09960..2fbaa2c 100644
--- a/libfreerdp-core/tls.c
+++ b/libfreerdp-core/tls.c
@@ -268,30 +268,6 @@ boolean tls_match_hostname(char *pattern, int pattern_length, char *hostname)
 			return TRUE;
 	}
 
-	/* ccpp: Check for wildcard certificates */
-	if (memchr(pattern, '*', pattern_length) != NULL)
-	{
-		/* The wildcard matches one subdomain level (all except a dot) */
-
-		int pattern_position = 0;
-		int hostname_position = 0;
-
-		for(; hostname[hostname_position] && pattern_position < pattern_length; pattern_position++, hostname_position++)
-		{
-			if( pattern[pattern_position] == '*' ) {
-				while( hostname[hostname_position] != '.' && hostname[hostname_position] != '\0' )
-					hostname_position++;
-
-				pattern_position++;
-			}
-
-			if (hostname[hostname_position] != pattern[pattern_position] )
-			{
-				return FALSE;
-			}
-		}
-	}
-
 	if (pattern_length > 2 && pattern[0] == '*' && pattern[1] == '.')
 	{
 		char *check_hostname = &hostname[ strlen(hostname) - pattern_length+1 ];
-- 
2.5.5