test-tls-connection(1)

NAME
test-tls-connection - tests the TLS connection to a remote endpoint

SYNOPSIS
test-tls-connection host:port ca_certificate_file
[-s certificate_file | - -save-certificate certificate_file]
[-n | - -no-view-certificate]
[-c | - -no-check-certificate]
[-- openssl_args ...]
test-tls-connection [-h | - -help]
test-tls-connection [-v | - -version]

DESCRIPTION
test-tls-connection tests the TLS connection to a remote endpoint. The certificate provided by the remote endpoint can be verified (by calling check-certificate) or only displayed (by using view-certificate). Optionally, it can also be saved as a PEM file.

ARGUMENTS
The following options are available:

host:port
    Specifies hostname or IP address, and TCP port number of the remote endpoint to connect to. If no port number is provided, 443 (HTTPS) is used.

ca_certificate_file
    Specifies the CA certificate to verify the certificate of the remote endpoint.

-s certificate_file | - -save-certificate certificate_file
    Specifies a file name to store the certificate of the remote endpoint (as a PEM file).

-- openssl_args ...
    Specifies optional OpenSSL arguments. All arguments after -- are passed to OpenSSL.

-n | - -no-view-certificate
    Do not run view-certificate on the received certificate of the remote endpoint.

-c | - -no-check-certificate
    Do not run check-certificate on the received certificate of the remote endpoint.

-h | - -help
    Prints the program's command-line parameters and exits.

-v | - -version
    Prints the program version and exits.

EXIT STATUS
The test-tls-connection tool exits with 0 on success, and >0 in case of an error.

EXAMPLES

test-tls-connection www.heise.de:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt

test-tls-connection www.nntb.no:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt --no-view-certificate

test-tls-connection www.nntb.no:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt --no-check-certificate

test-tls-connection www.nntb.no:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt --save-certificate www.nntb.no.crt

test-tls-connection www.heise.de:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt -n -c -s www.heise.de.crt

test-tls-connection www.ietf.org:443 /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt -s www.ietf.org.crt

test-tls-connection www.simula.no /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt -n -c -s www.simula.no.crt

test-tls-connection www.dnb.no /etc/ssl/certs/DigiCert_Global_Root_G2.pem -s www.dnb.no.crt

test-tls-connection --help

test-tls-connection -h

test-tls-connection --version

test-tls-connection -v

SEE ALSO
check-certificate(1), der2pem(1), extract-pem(1), pem2der(1), view-certificate(1), view-crl(1), openssl(1)

NOTES
This program is part of System-Tools. The latest version of System-Tools can be found on the System-Tools Homepage at System-Tools Homepage: https://www.nntb.no/~dreibh/system-tools/.

AUTHORS
Thomas Dreibholz, Homepage: https://www.nntb.no/~dreibh