1 @node gnutls-cli Invocation
2 @section Invoking gnutls-cli
5 # -*- buffer-read-only: t -*- vi: set ro:
7 # DO NOT EDIT THIS FILE (invoke-gnutls-cli.texi)
9 # It has been AutoGen-ed November 10, 2012 at 12:25:39 AM by AutoGen 5.16
10 # From the definitions ../src/cli-args.def
11 # and the template file agtexi-cmd.tpl
15 Simple client program to set up a TLS connection to some other computer.
16 It sets up a TLS connection and forwards data from the standard input to the secured socket and vice versa.
18 This section was generated by @strong{AutoGen},
19 using the @code{agtexi-cmd} template and the option descriptions for the @code{gnutls-cli} program.
20 This software is released under the GNU General Public License, version 3 or later.
23 @anchor{gnutls-cli usage}
24 @subheading gnutls-cli help/usage (-h)
25 @cindex gnutls-cli help
27 This is the automatically generated usage text for gnutls-cli.
28 The text printed is the same whether for the @code{help} option (-h) or the @code{more-help} option (-!). @code{more-help} will print
29 the usage text by passing it through a pager program.
30 @code{more-help} is disabled on platforms without a working
31 @code{fork(2)} function. The @code{PAGER} environment variable is
32 used to select the program, defaulting to @file{more}. Both will exit
33 with a status code of 0.
37 gnutls-cli - GnuTLS client - Ver. @@VERSION@@
38 USAGE: gnutls-cli [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostname]
40 -d, --debug=num Enable debugging.
41 - It must be in the range:
43 -V, --verbose More verbose output
44 - may appear multiple times
45 --tofu Enable trust on first use authentication
46 - disabled as --no-tofu
47 --dane Enable DANE certificate verification (DNSSEC)
48 - disabled as --no-dane
49 --local-dns Use the local DNS server for DNSSEC resolving.
50 - disabled as --no-local-dns
51 --ca-verification Disable CA certificate verification
52 - disabled as --no-ca-verification
54 --ocsp Enable OCSP certificate verification
55 - disabled as --no-ocsp
56 -r, --resume Establish a session and resume
57 -b, --heartbeat Activate heartbeat support
58 -e, --rehandshake Establish a session and rehandshake
59 --noticket Don't accept session tickets
60 -s, --starttls Connect, establish a plain session and start TLS.
61 -u, --udp Use DTLS (datagram TLS) over UDP
62 --mtu=num Set MTU for datagram TLS
63 - It must be in the range:
65 --srtp-profiles=str Offer SRTP profiles
66 --crlf Send CR LF instead of LF
67 --x509fmtder Use DER format for certificates to read from
68 -f, --fingerprint Send the openpgp fingerprint, instead of the key
69 --disable-extensions Disable all the TLS extensions
70 --print-cert Print peer's certificate in PEM format
71 --recordsize=num The maximum record size to advertize
72 - It must be in the range:
74 --dh-bits=num The minimum number of bits allowed for DH
75 --priority=str Priorities string
76 --x509cafile=str Certificate file or PKCS #11 URL to use
77 --x509crlfile=file CRL file to use
79 --pgpkeyfile=file PGP Key file to use
81 --pgpkeyring=file PGP Key ring file to use
83 --pgpcertfile=file PGP Public Key (certificate) file to use
85 --x509keyfile=str X.509 key file or PKCS #11 URL to use
86 --x509certfile=str X.509 Certificate file or PKCS #11 URL to use
87 --pgpsubkey=str PGP subkey to use (hex or auto)
88 --srpusername=str SRP username to use
89 --srppasswd=str SRP password to use
90 --pskusername=str PSK username to use
91 --pskkey=str PSK key (in hex) to use
92 -p, --port=str The port or service to connect to
93 --insecure Don't abort program if server certificate can't be validated
94 --benchmark-ciphers Benchmark individual ciphers
95 --benchmark-soft-ciphers Benchmark individual software ciphers (no hw acceleration)
96 --benchmark-tls-kx Benchmark TLS key exchange methods
97 --benchmark-tls-ciphers Benchmark TLS ciphers
98 -l, --list Print a list of the supported algorithms and modes
99 -v, --version[=arg] Output version information and exit
100 -h, --help Display extended usage information and exit
101 -!, --more-help Extended usage information passed thru pager
103 Options are specified by doubled hyphens and their name or by a single
104 hyphen and the flag character.
105 Operands and options may be intermixed. They will be reordered.
109 Simple client program to set up a TLS connection to some other computer. It
110 sets up a TLS connection and forwards data from the standard input to the
111 secured socket and vice versa.
113 please send bug reports to: bug-gnutls@@gnu.org
117 @anchor{gnutls-cli debug}
118 @subheading debug option (-d)
120 This is the ``enable debugging.'' option.
121 This option takes an argument number.
122 Specifies the debug level.
123 @anchor{gnutls-cli tofu}
124 @subheading tofu option
126 This is the ``enable trust on first use authentication'' option.
127 This option will, in addition to certificate authentication, perform authentication based on previously seen public keys, a model similar to SSH authentication.
128 @anchor{gnutls-cli dane}
129 @subheading dane option
131 This is the ``enable dane certificate verification (dnssec)'' option.
132 This option will, in addition to certificate authentication using
133 the trusted CAs, verify the server certificates using on the DANE information
134 available via DNSSEC.
135 @anchor{gnutls-cli local-dns}
136 @subheading local-dns option
138 This is the ``use the local dns server for dnssec resolving.'' option.
139 This option will use the local DNS server for DNSSEC.
140 This is disabled by default due to many servers not allowing DNSSEC.
141 @anchor{gnutls-cli ca-verification}
142 @subheading ca-verification option
144 This is the ``disable ca certificate verification'' option.
147 This option has some usage constraints. It:
150 is enabled by default.
153 This option will disable CA certificate verification. It is to be used with the --dane or --tofu options.
154 @anchor{gnutls-cli ocsp}
155 @subheading ocsp option
157 This is the ``enable ocsp certificate verification'' option.
158 This option will enable verification of the peer's certificate using ocsp
159 @anchor{gnutls-cli resume}
160 @subheading resume option (-r)
162 This is the ``establish a session and resume'' option.
163 Connect, establish a session, reconnect and resume.
164 @anchor{gnutls-cli rehandshake}
165 @subheading rehandshake option (-e)
167 This is the ``establish a session and rehandshake'' option.
168 Connect, establish a session and rehandshake immediately.
169 @anchor{gnutls-cli starttls}
170 @subheading starttls option (-s)
172 This is the ``connect, establish a plain session and start tls.'' option.
173 The TLS session will be initiated when EOF or a SIGALRM is received.
174 @anchor{gnutls-cli disable-extensions}
175 @subheading disable-extensions option
177 This is the ``disable all the tls extensions'' option.
178 This option disables all TLS extensions. Deprecated option. Use the priority string.
179 @anchor{gnutls-cli dh-bits}
180 @subheading dh-bits option
182 This is the ``the minimum number of bits allowed for dh'' option.
183 This option takes an argument number.
184 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.
185 @anchor{gnutls-cli priority}
186 @subheading priority option
188 This is the ``priorities string'' option.
189 This option takes an argument string.
190 TLS algorithms and protocols to enable. You can
191 use predefined sets of ciphersuites such as PERFORMANCE,
192 NORMAL, SECURE128, SECURE256.
194 Check the GnuTLS manual on section ``Priority strings'' for more
195 information on allowed keywords
196 @anchor{gnutls-cli list}
197 @subheading list option (-l)
199 This is the ``print a list of the supported algorithms and modes'' option.
200 Print a list of the supported algorithms and modes. If a priority string is given then only the enabled ciphersuites are shown.
201 @anchor{gnutls-cli exit status}
202 @subheading gnutls-cli exit status
204 One of the following exit values will be returned:
206 @item 0 (EXIT_SUCCESS)
207 Successful program execution.
208 @item 1 (EXIT_FAILURE)
209 The operation failed or the command syntax was not valid.
211 @anchor{gnutls-cli See Also}
212 @subheading gnutls-cli See Also
213 gnutls-cli-debug(1), gnutls-serv(1)
215 @anchor{gnutls-cli Examples}
216 @subheading gnutls-cli Examples
217 @subheading Connecting using PSK authentication
218 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.
220 $ ./gnutls-cli -p 5556 localhost --pskusername psk_identity \
221 --pskkey 88f3824b3e5659f52d00e959bacab954b6540344 \
222 --priority NORMAL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK
223 Resolving 'localhost'...
224 Connecting to '127.0.0.1:5556'...
225 - PSK authentication.
228 - Cipher: AES-128-CBC
231 - Handshake was completed
233 - Simple Client Mode:
235 By keeping the --pskusername parameter and removing the --pskkey parameter, it will query only for the password during the handshake.
237 @subheading Listing ciphersuites in a priority string
238 To list the ciphersuites in a priority string:
240 $ ./gnutls-cli --priority SECURE192 -l
241 Cipher suites for SECURE192
242 TLS_ECDHE_ECDSA_AES_256_CBC_SHA384 0xc0, 0x24 TLS1.2
243 TLS_ECDHE_ECDSA_AES_256_GCM_SHA384 0xc0, 0x2e TLS1.2
244 TLS_ECDHE_RSA_AES_256_GCM_SHA384 0xc0, 0x30 TLS1.2
245 TLS_DHE_RSA_AES_256_CBC_SHA256 0x00, 0x6b TLS1.2
246 TLS_DHE_DSS_AES_256_CBC_SHA256 0x00, 0x6a TLS1.2
247 TLS_RSA_AES_256_CBC_SHA256 0x00, 0x3d TLS1.2
249 Certificate types: CTYPE-X.509
250 Protocols: VERS-TLS1.2, VERS-TLS1.1, VERS-TLS1.0, VERS-SSL3.0, VERS-DTLS1.0
251 Compression: COMP-NULL
252 Elliptic curves: CURVE-SECP384R1, CURVE-SECP521R1
253 PK-signatures: SIGN-RSA-SHA384, SIGN-ECDSA-SHA384, SIGN-RSA-SHA512, SIGN-ECDSA-SHA512