Creating a certificate with the OpenSSL toolkit

Procedure

  1. Enter the following command:
    cd /etc/stunnel
  2. To create the /etc/stunnel/stunnel.pem file with a certificate and key for SSL, enter the following command
    $openssl req -new -x509 -days 365 -nodes -out stunnel.pem -keyout
    /etc/stunnel/stunnel.pem
  3. To change the permissions for the certificate that you generated, enter the following command.
    $ sudo chmod 600 /etc/stunnel/stunnel.pem