Skip to content
phuonglab edited this page Aug 2, 2021 · 5 revisions

Embedded Linux

Table of Contents

1. ======= lighttpd ==========

  • Enable ssl

    cd /etc/lighttpd/certs
    openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes
    chmod 400 lighttpd.pem
    ⇒ Change common name during generate lighttpd.pem key to matching domain name 192.168.123.196
  • Then edit /etc/lighttpd/lighttpd.conf and add:

    $SERVER["socket"] == ":443" {
      ssl.engine = "enable" 
      ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem" 
    }
  • Curl test:

    echo "" | openssl s_client -servername 192.168.123.196 -connect 192.168.123.196:443 2>/dev/null </dev/null |  sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > client.key
    curl -v --cacert client.key https://192.168.123.196:443/deviceInfo 

Clone this wiki locally