Include new extensions in uhttpd self-signed certs
authorPat Fruth <pat@patfruth.com>
Sun, 20 Oct 2019 20:51:34 +0000 (14:51 -0600)
committerJo-Philipp Wich <jo@mein.io>
Wed, 21 Feb 2024 21:31:36 +0000 (22:31 +0100)
commit0dca40222b5cd71087708e845c6c6b7193660f88
tree04ba887fce15b2abb4a66d893d6e3054a3ac5670
parent82a8b4e0e23ae555d70a1e48e65902aeff2dd1e3
Include new extensions in uhttpd self-signed certs

The introduction of MacOS Catalina includes new requirements for self-signed certificates.
See: https://support.apple.com/en-us/HT210176
These new requirements include the addition of two TLS server certificate extensions.
- extendedKeyUsage
- subjectAltName
The extendedKeyUsage must be set to serverAuth.
The subjectAltName must be set to the DNS name of the server.
In the absense of these new extensions, when the LUCI web interface is configured to use HTTPS and
self-signed certs, MacOS user running Google Chrome browsers will not be able to access the LUCI web enterface.
If you are generating self-signed certs which do not include that extension, Chrome will
report "NET::ERR_CERT_INVALID" instead of "NET::ERR_CERT_AUTHORITY_INVALID".  You can click through to
ignore the latter, but not the former.

This change updates the uhttpd init script to generate self-signed cert that meets the new requirements.
Signed-off-by: Pat Fruth <pat@patfruth.com>
package/network/services/uhttpd/files/uhttpd.init