I replaced the cert/key of uhttpd before and it always worked.
This time I am doing it to an old router that came with openwrt and not upgradeable.
The old cert probably has 1K or 2K keysize.
I did the replace the crt and key files as pointed by uci show uhttpd. I am using 4KB key size.
But the uhttp won't start. I tried to do uci set uhttpd.px5g.bits='4096' and commit it, but did not help.
I am getting this error:
Fri Jul 17 16:26:48 2020 daemon.err uhttpd[6027]: Failed to load certificate/key files
Any ideas to get more specific errors?
Here is my config:
uhttpd.main=uhttpd
uhttpd.main.listen_http='0.0.0.0:80' '[::]:80'
uhttpd.main.listen_https='0.0.0.0:443' '[::]:443'
uhttpd.main.redirect_https='1'
uhttpd.main.home='/www'
uhttpd.main.rfc1918_filter='1'
uhttpd.main.max_requests='3'
uhttpd.main.max_connections='100'
uhttpd.main.cert='/etc/uhttpd/uhttpd.crt'
uhttpd.main.key='/etc/uhttpd/uhttpd.key'
uhttpd.main.cgi_prefix='/cgi-bin'
uhttpd.main.script_timeout='60'
uhttpd.main.network_timeout='30'
uhttpd.main.http_keepalive='20'
uhttpd.main.tcp_keepalive='1'
uhttpd.main.ubus_prefix='/ubus'
uhttpd.px5g=cert
uhttpd.px5g.days='730'
uhttpd.px5g.country='ZZ'
uhttpd.px5g.state='Somewhere'
uhttpd.px5g.location='Uknown'
uhttpd.px5g.commonname='OpenWrt'
uhttpd.px5g.bits='1024'