Modifications to the SWAT setup are as follows:
Install OpenSSL.
Generate certificate and private key.
root# /usr/bin/openssl req -new -x509 -days 365 -nodes -config \
/usr/share/doc/packages/stunnel/stunnel.cnf \
-out /etc/stunnel/stunnel.pem -keyout /etc/stunnel/stunnel.pem
Remove SWAT entry from [x]inetd.
Start stunnel.
root# stunnel -p /etc/stunnel/stunnel.pem -d 901 \
-l /usr/local/samba/bin/swat swat
Afterward, simply connect to SWAT by using the URL https://myhost:901, accept the certificate, and the SSL connection is up.