Next: gnutls-serv Invocation, Up: Other included programs [Contents][Index]
Simple client program to set up a TLS connection to some other computer. It sets up a TLS connection and forwards data from the standard input to the secured socket and vice versa.
This section was generated by AutoGen,
using the agtexi-cmd
template and the option descriptions for the gnutls-cli
program.
This software is released under the GNU General Public License, version 3 or later.
This is the automatically generated usage text for gnutls-cli.
The text printed is the same whether selected with the help
option
(--help) or the more-help
option (--more-help). more-help
will print
the usage text by passing it through a pager program.
more-help
is disabled on platforms without a working
fork(2)
function. The PAGER
environment variable is
used to select the program, defaulting to more. Both will exit
with a status code of 0.
gnutls-cli - GnuTLS client Usage: gnutls-cli [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostname] -d, --debug=num Enable debugging. - it must be in the range: 0 to 9999 -V, --verbose More verbose output - may appear multiple times --tofu Enable trust on first use authentication - disabled as '--no-tofu' --dane Enable DANE certificate verification (DNSSEC) - disabled as '--no-dane' --local-dns Use the local DNS server for DNSSEC resolving. - disabled as '--no-local-dns' --ca-verification Disable CA certificate verification - disabled as '--no-ca-verification' - enabled by default --ocsp Enable OCSP certificate verification - disabled as '--no-ocsp' -r, --resume Establish a session and resume -e, --rehandshake Establish a session and rehandshake -s, --starttls Connect, establish a plain session and start TLS. -u, --udp Use DTLS (datagram TLS) over UDP --mtu=num Set MTU for datagram TLS - it must be in the range: 0 to 17000 --crlf Send CR LF instead of LF --x509fmtder Use DER format for certificates to read from -f, --fingerprint Send the openpgp fingerprint, instead of the key --print-cert Print peer's certificate in PEM format --dh-bits=num The minimum number of bits allowed for DH --priority=str Priorities string --x509cafile=str Certificate file or PKCS #11 URL to use --x509crlfile=file CRL file to use - file must pre-exist --pgpkeyfile=file PGP Key file to use - file must pre-exist --pgpkeyring=file PGP Key ring file to use - file must pre-exist --pgpcertfile=file PGP Public Key (certificate) file to use - file must pre-exist --x509keyfile=str X.509 key file or PKCS #11 URL to use --x509certfile=str X.509 Certificate file or PKCS #11 URL to use --pgpsubkey=str PGP subkey to use (hex or auto) --srpusername=str SRP username to use --srppasswd=str SRP password to use --pskusername=str PSK username to use --pskkey=str PSK key (in hex) to use -p, --port=str The port or service to connect to --insecure Don't abort program if server certificate can't be validated --ranges Use length-hiding padding to prevent traffic analysis --benchmark-ciphers Benchmark individual ciphers --benchmark-soft-ciphers Benchmark individual software ciphers (no hw acceleration) --benchmark-tls-kx Benchmark TLS key exchange methods --benchmark-tls-ciphers Benchmark TLS ciphers -l, --list Print a list of the supported algorithms and modes --noticket Don't allow session tickets --srtp-profiles=str Offer SRTP profiles --alpn=str Application layer protocol - may appear multiple times -b, --heartbeat Activate heartbeat support --recordsize=num The maximum record size to advertize - it must be in the range: 0 to 4096 --disable-sni Do not send a Server Name Indication (SNI) --disable-extensions Disable all the TLS extensions -v, --version[=arg] output version information and exit -h, --help display extended usage information and exit -!, --more-help extended usage information passed thru pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. Operands and options may be intermixed. They will be reordered. Simple client program to set up a TLS connection to some other computer. It sets up a TLS connection and forwards data from the standard input to the secured socket and vice versa. Please send bug reports to: <bug-gnutls@gnu.org>
This is the “enable debugging.” option. This option takes an argument number. Specifies the debug level.
This is the “enable trust on first use authentication” option. This option will, in addition to certificate authentication, perform authentication based on previously seen public keys, a model similar to SSH authentication.
This is the “enable dane certificate verification (dnssec)” option. This option will, in addition to certificate authentication using the trusted CAs, verify the server certificates using on the DANE information available via DNSSEC.
This is the “use the local dns server for dnssec resolving.” option. This option will use the local DNS server for DNSSEC. This is disabled by default due to many servers not allowing DNSSEC.
This is the “disable ca certificate verification” option.
This option has some usage constraints. It:
This option will disable CA certificate verification. It is to be used with the –dane or –tofu options.
This is the “enable ocsp certificate verification” option. This option will enable verification of the peer’s certificate using ocsp
This is the “establish a session and resume” option. Connect, establish a session, reconnect and resume.
This is the “establish a session and rehandshake” option. Connect, establish a session and rehandshake immediately.
This is the “connect, establish a plain session and start tls.” option. The TLS session will be initiated when EOF or a SIGALRM is received.
This is the “the minimum number of bits allowed for dh” option. This option takes an argument number. This option sets the minimum number of bits allowed for a Diffie-Hellman key exchange. You may want to lower the default value if the peer sends a weak prime and you get an connection error with unacceptable prime.
This is the “priorities string” option. This option takes an argument string. TLS algorithms and protocols to enable. You can use predefined sets of ciphersuites such as PERFORMANCE, NORMAL, SECURE128, SECURE256.
Check the GnuTLS manual on section “Priority strings” for more information on allowed keywords
This is the “use length-hiding padding to prevent traffic analysis” option. When possible (e.g., when %NEW_PADDING is specified), use length-hiding padding to prevent traffic analysis.
This is the “print a list of the supported algorithms and modes” option. Print a list of the supported algorithms and modes. If a priority string is given then only the enabled ciphersuites are shown.
This is the “application layer protocol” option. This option takes an argument string.
This option has some usage constraints. It:
This option will set and enable the Application Layer Protocol Negotiation (ALPN) in the TLS protocol.
This is the “disable all the tls extensions” option. This option disables all TLS extensions. Deprecated option. Use the priority string.
One of the following exit values will be returned:
Successful program execution.
The operation failed or the command syntax was not valid.
gnutls-cli-debug(1), gnutls-serv(1)
To connect to a server using PSK authentication, you need to enable the choice of PSK by using a cipher priority parameter such as in the example below.
$ ./gnutls-cli -p 5556 localhost --pskusername psk_identity \ --pskkey 88f3824b3e5659f52d00e959bacab954b6540344 \ --priority NORMAL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK Resolving 'localhost'... Connecting to '127.0.0.1:5556'... - PSK authentication. - Version: TLS1.1 - Key Exchange: PSK - Cipher: AES-128-CBC - MAC: SHA1 - Compression: NULL - Handshake was completed - Simple Client Mode:
By keeping the –pskusername parameter and removing the –pskkey parameter, it will query only for the password during the handshake.
To list the ciphersuites in a priority string:
$ ./gnutls-cli --priority SECURE192 -l Cipher suites for SECURE192 TLS_ECDHE_ECDSA_AES_256_CBC_SHA384 0xc0, 0x24 TLS1.2 TLS_ECDHE_ECDSA_AES_256_GCM_SHA384 0xc0, 0x2e TLS1.2 TLS_ECDHE_RSA_AES_256_GCM_SHA384 0xc0, 0x30 TLS1.2 TLS_DHE_RSA_AES_256_CBC_SHA256 0x00, 0x6b TLS1.2 TLS_DHE_DSS_AES_256_CBC_SHA256 0x00, 0x6a TLS1.2 TLS_RSA_AES_256_CBC_SHA256 0x00, 0x3d TLS1.2 Certificate types: CTYPE-X.509 Protocols: VERS-TLS1.2, VERS-TLS1.1, VERS-TLS1.0, VERS-SSL3.0, VERS-DTLS1.0 Compression: COMP-NULL Elliptic curves: CURVE-SECP384R1, CURVE-SECP521R1 PK-signatures: SIGN-RSA-SHA384, SIGN-ECDSA-SHA384, SIGN-RSA-SHA512, SIGN-ECDSA-SHA512
Next: gnutls-serv Invocation, Up: Other included programs [Contents][Index]