uhttpd: prefer px5g for certificate creation
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 5 Oct 2016 08:11:15 +0000 (11:11 +0300)
committerJohn Crispin <john@phrozen.org>
Wed, 26 Oct 2016 13:16:51 +0000 (15:16 +0200)
Prefer the old default 'px5g' for certificate creation
as Firefox seems to dislike OpenSSL-created certs.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
package/network/services/uhttpd/files/uhttpd.init

index d703d762e694a18d5ecf5ddaba31240c47165e6d..35c1985cd2b124d43b285a65a256cc9408be1a60 100755 (executable)
@@ -44,10 +44,10 @@ generate_keys() {
        config_get location   "$cfg" location
        config_get commonname "$cfg" commonname
 
-       # Prefer OpenSSL for certificate generation (existence evaluated last)
+       # Prefer px5g for certificate generation (existence evaluated last)
        local GENKEY_CMD=""
-       [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -der"
        [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -outform der -nodes"
+       [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -der"
        [ -n "$GENKEY_CMD" ] && {
                $GENKEY_CMD \
                        -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \