aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-25 17:42:25 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-25 17:42:25 +0000
commit8572cbb5e62d09d36c344d0ba5084754dc4cb8f1 (patch)
tree703240c020592947600d0f684ac5da2ec4456735 /package/network/services
parente8fcadf51da68688099e748914db41906d5a5457 (diff)
downloadmaster-187ad058-8572cbb5e62d09d36c344d0ba5084754dc4cb8f1.tar.gz
master-187ad058-8572cbb5e62d09d36c344d0ba5084754dc4cb8f1.tar.bz2
master-187ad058-8572cbb5e62d09d36c344d0ba5084754dc4cb8f1.zip
package/uhttpd: generate 2048 bit RSA key
RSA keys should be generated with sufficient length. Using 1024 bits is considered unsafe. In other packages the used key length is 2048 bits. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48494 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/uhttpd/files/uhttpd.config2
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init2
2 files changed, 2 insertions, 2 deletions
diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config
index 059987c446..e14b9fefd7 100644
--- a/package/network/services/uhttpd/files/uhttpd.config
+++ b/package/network/services/uhttpd/files/uhttpd.config
@@ -111,7 +111,7 @@ config cert px5g
option days 730
# RSA key size
- option bits 1024
+ option bits 2048
# Location
option country ZZ
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index add09243ec..4ca6c8d626 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -45,7 +45,7 @@ generate_keys() {
[ -x "$PX5G_BIN" ] && {
$PX5G_BIN selfsigned -der \
- -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \
+ -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \
-subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
sync
mv "${UHTTPD_KEY}.new" "${UHTTPD_KEY}"