uhttpd: use sha256 when generating certificates with openssl (FS#512)

Patch from attachment to FS#512

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2017-02-17 14:21:47 +01:00
parent 6c44ac286b
commit 7df998bb6d

View file

@ -47,7 +47,7 @@ generate_keys() {
# Prefer px5g for certificate generation (existence evaluated last) # Prefer px5g for certificate generation (existence evaluated last)
local GENKEY_CMD="" local GENKEY_CMD=""
local UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"') local UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"')
[ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -outform der -nodes" [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform der -nodes"
[ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -der" [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -der"
[ -n "$GENKEY_CMD" ] && { [ -n "$GENKEY_CMD" ] && {
$GENKEY_CMD \ $GENKEY_CMD \