Note: You may need to enable JFFS2 support under Administration > Management > JFFS2 Support to have a usable /jffs location
Prerequisites
- A XCA PKI database https://youtu.be/ezzj3x207lQ
Create Your SSL Certificate
Exporting Required Files
Applying SSL Certificates in DD-WRT
Automatically Applying SSL Certificates on DD-WRT Startup
On one of my cheaper routers /jffs was read-only and had 0 bytes available. I followed the same steps as above but used a USB flash drive to store the files. I was able to replace /jffs with /tmp/mnt/USB to complete setting up SSL on the device. Leaving HTTP checked under Administration > Management > Web Access can provide a fallback until https is working reliably. If for some reason https stops working you can re-enable access via http by connecting to the router via SSH and running the following commands:
nvram set httpd_enable=1
nvram set http_enable=1
Special thanks to the DD-WRT forums and alexandrusavin on GitHub for inspiration on getting this working
https://gist.github.com/alexandrusavin/69b26846d6593d6f217219b5bd8882c4