From: Michael R Sweet Date: Thu, 17 Nov 2016 18:32:45 +0000 (-0500) Subject: Let's Encrypt certificates did not work when the hostname contained uppercase X-Git-Tag: v2.2.2~40 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=bd31658d04ed320fd6e8b2896f6997c37fbb3ee0 Let's Encrypt certificates did not work when the hostname contained uppercase letters (Issue #4919) --- diff --git a/CHANGES.txt b/CHANGES.txt index 00dcd85b6..33a750168 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 () + - 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) diff --git a/cups/http-addr.c b/cups/http-addr.c index dd61d4a09..78d5ea83e 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -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... */