LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gnutls-cli

TLS/SSL connection testing and debugging client

TLDR

Connect to TLS server
$ gnutls-cli [example.com]
copy
Connect on specific port
$ gnutls-cli -p [443] [example.com]
copy
Show certificate chain
$ gnutls-cli --print-cert [example.com]
copy
Test with specific protocol
$ gnutls-cli --priority="NORMAL:-VERS-TLS-ALL:+VERS-TLS1.3" [example.com]
copy
Start with STARTTLS
$ gnutls-cli --starttls-proto=[smtp] [mail.example.com]:587
copy
Verify certificate only
$ gnutls-cli --tofu [example.com] < /dev/null
copy

SYNOPSIS

gnutls-cli [options] hostname

DESCRIPTION

gnutls-cli is a TLS/SSL client for testing and debugging secure connections. It connects to servers, displays certificate information, and allows testing of various TLS configurations.The tool helps diagnose certificate issues, protocol support, and cipher suite negotiation. It can also serve as a simple secure client for interactive protocols.

PARAMETERS

-p, --port port

Connect to port.
-s, --starttls
Establish a plain-text session first and switch to TLS on EOF or SIGALRM (generic STARTTLS).
--print-cert
Print server certificate.
--starttls-proto proto
Use STARTTLS (smtp, pop3, imap, ftp, xmpp, ldap).
--priority string
Priority string for cipher selection.
-V, --verbose
Verbose output.
--tofu
Trust on first use.
--insecure
Don't verify certificate.
-x, --x509cafile file
CA certificate file.
--benchmark-ciphers
Benchmark cipher performance.
--list
List supported algorithms.
-d, --debug LEVEL
Set debugging verbosity level.

INSTALL

sudo apt install gnutls-bin
copy
sudo dnf install gnutls-utils
copy
sudo apk add gnutls-utils
copy

CAVEATS

Certificate verification requires proper CA setup. Priority string syntax complex. Some servers may behave differently with test clients.

HISTORY

gnutls-cli is part of GnuTLS, developed by Nikos Mavrogiannopoulos and others starting in 2000. GnuTLS provides an alternative to OpenSSL under the LGPL license, and gnutls-cli serves as its diagnostic and testing tool.

SEE ALSO

openssl(1), curl(1), certtool(1), nmap(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid