TLS/SSL related stuff¶
Prerequisites¶
If needed, in Debian or Ubutnu gnutls-cli can be installed using
apt install gnutls-bin
Check certificate of a Web server¶
Using OpenSSL:
openssl s_client -verify_return_error -connect <HOST>:443
Using GnuTLS:
gnu-tls-cli <HOST>
Check certificate of an SMTP server¶
Using OpenSSL:
openssl s_client -verify_return_error -starttls smtp -connect <HOST>:25
Using GnuTLS
gnutls-cli --starttls-proto smtp <HOST>
Check security of an existing TLS setup¶
This needs Docker be installed so you can run Docker images.
Create a file /usr/local/bin/testssl with the following content:
#!/bin/sh
docker run --rm -ti drwetter/testssl.sh $1
The run the following command to test the TLS setup for the web server
running at domain.example:
testssl domain.example
You can also test other services by adding the port number - for example for IMAP with TLS at port 993:
testssl domain.example:993