]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Let's Encrypt certificates did not work when the hostname contained uppercase
authorMichael R Sweet <michaelrsweet@gmail.com>
Thu, 17 Nov 2016 18:32:45 +0000 (13:32 -0500)
committerMichael R Sweet <michaelrsweet@gmail.com>
Thu, 17 Nov 2016 18:32:45 +0000 (13:32 -0500)
letters (Issue #4919)

CHANGES.txt
cups/http-addr.c

index 00dcd85b6783b72780ccff502e135ad6f1c42cb4..33a750168fb9a633f90fe907060efd7c070b001f 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES.txt - 2.2.2 - 2016-11-15
+CHANGES.txt - 2.2.2 - 2016-11-17
 --------------------------------
 
 CHANGES IN CUPS V2.2.2
@@ -17,6 +17,8 @@ CHANGES IN CUPS V2.2.2
          for mimeMediaType, name, and text values in conformance with RFC 2911.
        - The network backends now log the addresses that were found for a
          printer (<rdar://problem/29268474>)
+       - Let's Encrypt certificates did not work when the hostname contained
+         uppercase letters (Issue #4919)
         - Updated documentation (PR #4896)
         - Updated localizations (PR #4894, PR #4895, PR #4904, PR #4908)
 
index dd61d4a093ead9d0a41bd1e33c9f4cc0a9704d15..78d5ea83edad3c738dd210b879660536f047b969 100644 (file)
@@ -871,6 +871,18 @@ httpGetHostname(http_t *http,              /* I - HTTP connection or NULL */
       strlcat(s, ".", (size_t)slen);
   }
 
+ /*
+  * Convert the hostname to lowercase as needed...
+  */
+
+  if (s[0] != '/')
+  {
+    char       *ptr;                   /* Pointer into string */
+
+    for (ptr = s; *ptr; ptr ++)
+      *ptr = (char)_cups_tolower((int)*ptr);
+  }
+
  /*
   * Return the hostname with as much domain info as we have...
   */