Ignore case when comparing the CN with the domain
authorFrank Zschockelt <lm@freakysoft.de>
Sat, 20 Mar 2010 09:44:29 +0100
changeset 618 21918b7512b9
parent 617 985421e66f25
child 619 a3facd81de25
Ignore case when comparing the CN with the domain
loudmouth/lm-ssl-openssl.c
--- a/loudmouth/lm-ssl-openssl.c	Thu Mar 04 10:01:48 2010 +0100
+++ b/loudmouth/lm-ssl-openssl.c	Sat Mar 20 09:44:29 2010 +0100
@@ -216,7 +216,7 @@
             domain = strstr (cn, server);
         }
 
-        if ((domain == NULL) || (strncmp (server, domain, LM_SSL_CN_MAX) != 0)) {
+        if ((domain == NULL) || (strncasecmp (server, domain, LM_SSL_CN_MAX) != 0)) {
             if (base->func (ssl,
                             LM_SSL_STATUS_CERT_HOSTNAME_MISMATCH,
                             base->func_data) != LM_SSL_RESPONSE_CONTINUE) {