|
Packit |
aea12f |
@node gnutls-cli Invocation
|
|
Packit |
aea12f |
@section Invoking gnutls-cli
|
|
Packit |
aea12f |
@pindex gnutls-cli
|
|
Packit |
aea12f |
@ignore
|
|
Packit |
aea12f |
# -*- buffer-read-only: t -*- vi: set ro:
|
|
Packit |
aea12f |
#
|
|
Packit |
aea12f |
# DO NOT EDIT THIS FILE (invoke-gnutls-cli.texi)
|
|
Packit |
aea12f |
#
|
|
Packit |
aea12f |
# It has been AutoGen-ed
|
|
Packit |
aea12f |
# From the definitions ../src/cli-args.def
|
|
Packit |
aea12f |
# and the template file agtexi-cmd.tpl
|
|
Packit |
aea12f |
@end ignore
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Simple client program to set up a TLS connection to some other computer.
|
|
Packit |
aea12f |
It sets up a TLS connection and forwards data from the standard input to the secured socket and vice versa.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This section was generated by @strong{AutoGen},
|
|
Packit |
aea12f |
using the @code{agtexi-cmd} template and the option descriptions for the @code{gnutls-cli} program.
|
|
Packit |
aea12f |
This software is released under the GNU General Public License, version 3 or later.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@anchor{gnutls-cli usage}
|
|
Packit |
aea12f |
@subheading gnutls-cli help/usage (@option{--help})
|
|
Packit |
aea12f |
@cindex gnutls-cli help
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the automatically generated usage text for gnutls-cli.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
The text printed is the same whether selected with the @code{help} option
|
|
Packit |
aea12f |
(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
|
|
Packit |
aea12f |
the usage text by passing it through a pager program.
|
|
Packit |
aea12f |
@code{more-help} is disabled on platforms without a working
|
|
Packit |
aea12f |
@code{fork(2)} function. The @code{PAGER} environment variable is
|
|
Packit |
aea12f |
used to select the program, defaulting to @file{more}. Both will exit
|
|
Packit |
aea12f |
with a status code of 0.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@exampleindent 0
|
|
Packit |
aea12f |
@example
|
|
Packit |
aea12f |
gnutls-cli - GnuTLS client
|
|
Packit |
aea12f |
Usage: gnutls-cli [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostname]
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
-d, --debug=num Enable debugging
|
|
Packit |
aea12f |
- it must be in the range:
|
|
Packit |
aea12f |
0 to 9999
|
|
Packit |
aea12f |
-V, --verbose More verbose output
|
|
Packit |
aea12f |
- may appear multiple times
|
|
Packit |
aea12f |
--tofu Enable trust on first use authentication
|
|
Packit |
aea12f |
- disabled as '--no-tofu'
|
|
Packit |
aea12f |
--strict-tofu Fail to connect if a certificate is unknown or a known certificate has
|
|
Packit |
aea12f |
changed
|
|
Packit |
aea12f |
- disabled as '--no-strict-tofu'
|
|
Packit |
aea12f |
--dane Enable DANE certificate verification (DNSSEC)
|
|
Packit |
aea12f |
- disabled as '--no-dane'
|
|
Packit |
aea12f |
--local-dns Use the local DNS server for DNSSEC resolving
|
|
Packit |
aea12f |
- disabled as '--no-local-dns'
|
|
Packit |
aea12f |
--ca-verification Enable CA certificate verification
|
|
Packit |
aea12f |
- disabled as '--no-ca-verification'
|
|
Packit |
aea12f |
- enabled by default
|
|
Packit |
aea12f |
--ocsp Enable OCSP certificate verification
|
|
Packit |
aea12f |
- disabled as '--no-ocsp'
|
|
Packit |
aea12f |
-r, --resume Establish a session and resume
|
|
Packit |
aea12f |
--earlydata=str Send early data on resumption from the specified file
|
|
Packit |
aea12f |
-e, --rehandshake Establish a session and rehandshake
|
|
Packit |
aea12f |
--sni-hostname=str Server's hostname for server name indication extension
|
|
Packit |
aea12f |
--verify-hostname=str Server's hostname to use for validation
|
|
Packit |
aea12f |
-s, --starttls Connect, establish a plain session and start TLS
|
|
Packit |
aea12f |
--app-proto=str an alias for the 'starttls-proto' option
|
|
Packit |
aea12f |
--starttls-proto=str The application protocol to be used to obtain the server's certificate
|
|
Packit |
aea12f |
(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)
|
|
Packit |
aea12f |
- prohibits the option 'starttls'
|
|
Packit |
aea12f |
-u, --udp Use DTLS (datagram TLS) over UDP
|
|
Packit |
aea12f |
--mtu=num Set MTU for datagram TLS
|
|
Packit |
aea12f |
- it must be in the range:
|
|
Packit |
aea12f |
0 to 17000
|
|
Packit |
aea12f |
--crlf Send CR LF instead of LF
|
|
Packit |
aea12f |
--fastopen Enable TCP Fast Open
|
|
Packit |
aea12f |
--x509fmtder Use DER format for certificates to read from
|
|
Packit |
aea12f |
--print-cert Print peer's certificate in PEM format
|
|
Packit |
aea12f |
--save-cert=str Save the peer's certificate chain in the specified file in PEM format
|
|
Packit |
aea12f |
--save-ocsp=str Save the peer's OCSP status response in the provided file
|
|
Packit Service |
991b93 |
- prohibits the option 'save-ocsp-multi'
|
|
Packit Service |
991b93 |
--save-ocsp-multi=str Save all OCSP responses provided by the peer in this file
|
|
Packit Service |
991b93 |
- prohibits the option 'save-ocsp'
|
|
Packit |
aea12f |
--save-server-trace=str Save the server-side TLS message trace in the provided file
|
|
Packit |
aea12f |
--save-client-trace=str Save the client-side TLS message trace in the provided file
|
|
Packit |
aea12f |
--dh-bits=num The minimum number of bits allowed for DH
|
|
Packit |
aea12f |
--priority=str Priorities string
|
|
Packit |
aea12f |
--x509cafile=str Certificate file or PKCS #11 URL to use
|
|
Packit |
aea12f |
--x509crlfile=file CRL file to use
|
|
Packit |
aea12f |
- file must pre-exist
|
|
Packit |
aea12f |
--x509keyfile=str X.509 key file or PKCS #11 URL to use
|
|
Packit |
aea12f |
--x509certfile=str X.509 Certificate file or PKCS #11 URL to use
|
|
Packit |
aea12f |
- requires the option 'x509keyfile'
|
|
Packit Service |
991b93 |
--rawpkkeyfile=str Private key file (PKCS #8 or PKCS #12) or PKCS #11 URL to use
|
|
Packit Service |
991b93 |
--rawpkfile=str Raw public-key file to use
|
|
Packit Service |
991b93 |
- requires the option 'rawpkkeyfile'
|
|
Packit |
aea12f |
--srpusername=str SRP username to use
|
|
Packit |
aea12f |
--srppasswd=str SRP password to use
|
|
Packit |
aea12f |
--pskusername=str PSK username to use
|
|
Packit |
aea12f |
--pskkey=str PSK key (in hex) to use
|
|
Packit |
aea12f |
-p, --port=str The port or service to connect to
|
|
Packit |
aea12f |
--insecure Don't abort program if server certificate can't be validated
|
|
Packit |
aea12f |
--verify-allow-broken Allow broken algorithms, such as MD5 for certificate verification
|
|
Packit Service |
991b93 |
--benchmark-ciphers Benchmark individual ciphers
|
|
Packit Service |
991b93 |
--benchmark-tls-kx Benchmark TLS key exchange methods
|
|
Packit Service |
991b93 |
--benchmark-tls-ciphers Benchmark TLS ciphers
|
|
Packit |
aea12f |
-l, --list Print a list of the supported algorithms and modes
|
|
Packit |
aea12f |
- prohibits the option 'port'
|
|
Packit Service |
991b93 |
--priority-list Print a list of the supported priority strings
|
|
Packit Service |
991b93 |
--noticket Don't allow session tickets
|
|
Packit Service |
991b93 |
--srtp-profiles=str Offer SRTP profiles
|
|
Packit Service |
991b93 |
--alpn=str Application layer protocol
|
|
Packit |
aea12f |
- may appear multiple times
|
|
Packit |
aea12f |
-b, --heartbeat Activate heartbeat support
|
|
Packit Service |
991b93 |
--recordsize=num The maximum record size to advertize
|
|
Packit |
aea12f |
- it must be in the range:
|
|
Packit |
aea12f |
0 to 4096
|
|
Packit Service |
991b93 |
--disable-sni Do not send a Server Name Indication (SNI)
|
|
Packit Service |
991b93 |
--single-key-share Send a single key share under TLS1.3
|
|
Packit Service |
991b93 |
--post-handshake-auth Enable post-handshake authentication under TLS1.3
|
|
Packit Service |
991b93 |
--inline-commands Inline commands of the form ^<cmd>^
|
|
Packit Service |
991b93 |
--inline-commands-prefix=str Change the default delimiter for inline commands.
|
|
Packit Service |
991b93 |
--provider=file Specify the PKCS #11 provider library
|
|
Packit |
aea12f |
- file must pre-exist
|
|
Packit Service |
991b93 |
--fips140-mode Reports the status of the FIPS140-2 mode in gnutls library
|
|
Packit Service |
991b93 |
--logfile=str Redirect informational messages to a specific file.
|
|
Packit Service |
991b93 |
--keymatexport=str Label used for exporting keying material
|
|
Packit Service |
991b93 |
--keymatexportsize=num Size of the exported keying material
|
|
Packit Service |
991b93 |
--waitresumption Block waiting for the resumption data under TLS1.3
|
|
Packit |
aea12f |
-v, --version[=arg] output version information and exit
|
|
Packit |
aea12f |
-h, --help display extended usage information and exit
|
|
Packit |
aea12f |
-!, --more-help extended usage information passed thru pager
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Options are specified by doubled hyphens and their name or by a single
|
|
Packit |
aea12f |
hyphen and the flag character.
|
|
Packit |
aea12f |
Operands and options may be intermixed. They will be reordered.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Simple client program to set up a TLS connection to some other computer. It
|
|
Packit |
aea12f |
sets up a TLS connection and forwards data from the standard input to the
|
|
Packit |
aea12f |
secured socket and vice versa.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@end example
|
|
Packit |
aea12f |
@exampleindent 4
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@anchor{gnutls-cli debug}
|
|
Packit |
aea12f |
@subheading debug option (-d)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable debugging'' option.
|
|
Packit |
aea12f |
This option takes a number argument.
|
|
Packit |
aea12f |
Specifies the debug level.
|
|
Packit |
aea12f |
@anchor{gnutls-cli tofu}
|
|
Packit |
aea12f |
@subheading tofu option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable trust on first use authentication'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-tofu.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will, in addition to certificate authentication, perform authentication
|
|
Packit |
aea12f |
based on previously seen public keys, a model similar to SSH authentication. Note that when tofu
|
|
Packit |
aea12f |
is specified (PKI) and DANE authentication will become advisory to assist the public key acceptance
|
|
Packit |
aea12f |
process.
|
|
Packit |
aea12f |
@anchor{gnutls-cli strict-tofu}
|
|
Packit |
aea12f |
@subheading strict-tofu option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``fail to connect if a certificate is unknown or a known certificate has changed'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-strict-tofu.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will perform authentication as with option --tofu; however, no questions shall be asked whatsoever, neither to accept an unknown certificate nor a changed one.
|
|
Packit |
aea12f |
@anchor{gnutls-cli dane}
|
|
Packit |
aea12f |
@subheading dane option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable dane certificate verification (dnssec)'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-dane.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will, in addition to certificate authentication using
|
|
Packit |
aea12f |
the trusted CAs, verify the server certificates using on the DANE information
|
|
Packit |
aea12f |
available via DNSSEC.
|
|
Packit |
aea12f |
@anchor{gnutls-cli local-dns}
|
|
Packit |
aea12f |
@subheading local-dns option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``use the local dns server for dnssec resolving'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-local-dns.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will use the local DNS server for DNSSEC.
|
|
Packit |
aea12f |
This is disabled by default due to many servers not allowing DNSSEC.
|
|
Packit |
aea12f |
@anchor{gnutls-cli ca-verification}
|
|
Packit |
aea12f |
@subheading ca-verification option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable ca certificate verification'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-ca-verification.
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
It is enabled by default.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option can be used to enable or disable CA certificate verification. It is to be used with the --dane or --tofu options.
|
|
Packit |
aea12f |
@anchor{gnutls-cli ocsp}
|
|
Packit |
aea12f |
@subheading ocsp option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable ocsp certificate verification'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
can be disabled with --no-ocsp.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will enable verification of the peer's certificate using ocsp
|
|
Packit |
aea12f |
@anchor{gnutls-cli resume}
|
|
Packit |
aea12f |
@subheading resume option (-r)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``establish a session and resume'' option.
|
|
Packit |
aea12f |
Connect, establish a session, reconnect and resume.
|
|
Packit |
aea12f |
@anchor{gnutls-cli rehandshake}
|
|
Packit |
aea12f |
@subheading rehandshake option (-e)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``establish a session and rehandshake'' option.
|
|
Packit |
aea12f |
Connect, establish a session and rehandshake immediately.
|
|
Packit |
aea12f |
@anchor{gnutls-cli sni-hostname}
|
|
Packit |
aea12f |
@subheading sni-hostname option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``server's hostname for server name indication extension'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
Set explicitly the server name used in the TLS server name indication extension. That is useful when testing with servers setup on different DNS name than the intended. If not specified, the provided hostname is used. Even with this option server certificate verification still uses the hostname passed on the main commandline. Use --verify-hostname to change this.
|
|
Packit |
aea12f |
@anchor{gnutls-cli verify-hostname}
|
|
Packit |
aea12f |
@subheading verify-hostname option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``server's hostname to use for validation'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
Set explicitly the server name to be used when validating the server's certificate.
|
|
Packit |
aea12f |
@anchor{gnutls-cli starttls}
|
|
Packit |
aea12f |
@subheading starttls option (-s)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``connect, establish a plain session and start tls'' option.
|
|
Packit |
aea12f |
The TLS session will be initiated when EOF or a SIGALRM is received.
|
|
Packit |
aea12f |
@anchor{gnutls-cli app-proto}
|
|
Packit |
aea12f |
@subheading app-proto option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is an alias for the @code{starttls-proto} option,
|
|
Packit |
aea12f |
@pxref{gnutls-cli starttls-proto, the starttls-proto option documentation}.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@anchor{gnutls-cli starttls-proto}
|
|
Packit |
aea12f |
@subheading starttls-proto option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``the application protocol to be used to obtain the server's certificate (https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
must not appear in combination with any of the following options:
|
|
Packit |
aea12f |
starttls.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Specify the application layer protocol for STARTTLS. If the protocol is supported, gnutls-cli will proceed to the TLS negotiation.
|
|
Packit Service |
991b93 |
@anchor{gnutls-cli save-ocsp-multi}
|
|
Packit Service |
991b93 |
@subheading save-ocsp-multi option
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
This is the ``save all ocsp responses provided by the peer in this file'' option.
|
|
Packit Service |
991b93 |
This option takes a string argument.
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
@noindent
|
|
Packit Service |
991b93 |
This option has some usage constraints. It:
|
|
Packit Service |
991b93 |
@itemize @bullet
|
|
Packit Service |
991b93 |
@item
|
|
Packit Service |
991b93 |
must not appear in combination with any of the following options:
|
|
Packit Service |
991b93 |
save-ocsp.
|
|
Packit Service |
991b93 |
@end itemize
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
The file will contain a list of PEM encoded OCSP status responses if any were provided by the peer, starting with the one for the peer's server certificate.
|
|
Packit |
aea12f |
@anchor{gnutls-cli dh-bits}
|
|
Packit |
aea12f |
@subheading dh-bits option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``the minimum number of bits allowed for dh'' option.
|
|
Packit |
aea12f |
This option takes a number argument.
|
|
Packit |
aea12f |
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.
|
|
Packit |
aea12f |
@anchor{gnutls-cli priority}
|
|
Packit |
aea12f |
@subheading priority option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``priorities string'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
TLS algorithms and protocols to enable. You can
|
|
Packit |
aea12f |
use predefined sets of ciphersuites such as PERFORMANCE,
|
|
Packit |
aea12f |
NORMAL, PFS, SECURE128, SECURE256. The default is NORMAL.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Check the GnuTLS manual on section ``Priority strings'' for more
|
|
Packit |
aea12f |
information on the allowed keywords
|
|
Packit Service |
991b93 |
@anchor{gnutls-cli rawpkkeyfile}
|
|
Packit Service |
991b93 |
@subheading rawpkkeyfile option
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
This is the ``private key file (pkcs #8 or pkcs #12) or pkcs #11 url to use'' option.
|
|
Packit Service |
991b93 |
This option takes a string argument.
|
|
Packit Service |
991b93 |
In order to instruct the application to negotiate raw public keys one
|
|
Packit Service |
991b93 |
must enable the respective certificate types via the priority strings (i.e. CTYPE-CLI-*
|
|
Packit Service |
991b93 |
and CTYPE-SRV-* flags).
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
Check the GnuTLS manual on section ``Priority strings'' for more
|
|
Packit Service |
991b93 |
information on how to set certificate types.
|
|
Packit Service |
991b93 |
@anchor{gnutls-cli rawpkfile}
|
|
Packit Service |
991b93 |
@subheading rawpkfile option
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
This is the ``raw public-key file to use'' option.
|
|
Packit Service |
991b93 |
This option takes a string argument.
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
@noindent
|
|
Packit Service |
991b93 |
This option has some usage constraints. It:
|
|
Packit Service |
991b93 |
@itemize @bullet
|
|
Packit Service |
991b93 |
@item
|
|
Packit Service |
991b93 |
must appear in combination with the following options:
|
|
Packit Service |
991b93 |
rawpkkeyfile.
|
|
Packit Service |
991b93 |
@end itemize
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
In order to instruct the application to negotiate raw public keys one
|
|
Packit Service |
991b93 |
must enable the respective certificate types via the priority strings (i.e. CTYPE-CLI-*
|
|
Packit Service |
991b93 |
and CTYPE-SRV-* flags).
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
Check the GnuTLS manual on section ``Priority strings'' for more
|
|
Packit Service |
991b93 |
information on how to set certificate types.
|
|
Packit |
aea12f |
@anchor{gnutls-cli ranges}
|
|
Packit |
aea12f |
@subheading ranges option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``use length-hiding padding to prevent traffic analysis'' option.
|
|
Packit |
aea12f |
When possible (e.g., when using CBC ciphersuites), use length-hiding padding to prevent traffic analysis.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
|
|
Packit |
aea12f |
@anchor{gnutls-cli benchmark-ciphers}
|
|
Packit |
aea12f |
@subheading benchmark-ciphers option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``benchmark individual ciphers'' option.
|
|
Packit |
aea12f |
By default the benchmarked ciphers will utilize any capabilities of the local CPU to improve performance. To test against the raw software implementation set the environment variable GNUTLS_CPUID_OVERRIDE to 0x1.
|
|
Packit |
aea12f |
@anchor{gnutls-cli benchmark-tls-ciphers}
|
|
Packit |
aea12f |
@subheading benchmark-tls-ciphers option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``benchmark tls ciphers'' option.
|
|
Packit |
aea12f |
By default the benchmarked ciphers will utilize any capabilities of the local CPU to improve performance. To test against the raw software implementation set the environment variable GNUTLS_CPUID_OVERRIDE to 0x1.
|
|
Packit |
aea12f |
@anchor{gnutls-cli list}
|
|
Packit |
aea12f |
@subheading list option (-l)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``print a list of the supported algorithms and modes'' option.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
must not appear in combination with any of the following options:
|
|
Packit |
aea12f |
port.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Print a list of the supported algorithms and modes. If a priority string is given then only the enabled ciphersuites are shown.
|
|
Packit |
aea12f |
@anchor{gnutls-cli priority-list}
|
|
Packit |
aea12f |
@subheading priority-list option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``print a list of the supported priority strings'' option.
|
|
Packit |
aea12f |
Print a list of the supported priority strings. The ciphersuites corresponding to each priority string can be examined using -l -p.
|
|
Packit |
aea12f |
@anchor{gnutls-cli noticket}
|
|
Packit |
aea12f |
@subheading noticket option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``don't allow session tickets'' option.
|
|
Packit |
aea12f |
Disable the request of receiving of session tickets under TLS1.2 or earlier
|
|
Packit |
aea12f |
@anchor{gnutls-cli alpn}
|
|
Packit |
aea12f |
@subheading alpn option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``application layer protocol'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@noindent
|
|
Packit |
aea12f |
This option has some usage constraints. It:
|
|
Packit |
aea12f |
@itemize @bullet
|
|
Packit |
aea12f |
@item
|
|
Packit |
aea12f |
may appear an unlimited number of times.
|
|
Packit |
aea12f |
@end itemize
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This option will set and enable the Application Layer Protocol Negotiation (ALPN) in the TLS protocol.
|
|
Packit |
aea12f |
@anchor{gnutls-cli disable-extensions}
|
|
Packit |
aea12f |
@subheading disable-extensions option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``disable all the tls extensions'' option.
|
|
Packit |
aea12f |
This option disables all TLS extensions. Deprecated option. Use the priority string.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
|
|
Packit |
aea12f |
@anchor{gnutls-cli single-key-share}
|
|
Packit |
aea12f |
@subheading single-key-share option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``send a single key share under tls1.3'' option.
|
|
Packit |
aea12f |
This option switches the default mode of sending multiple
|
|
Packit |
aea12f |
key shares, to send a single one (the top one).
|
|
Packit |
aea12f |
@anchor{gnutls-cli post-handshake-auth}
|
|
Packit |
aea12f |
@subheading post-handshake-auth option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``enable post-handshake authentication under tls1.3'' option.
|
|
Packit |
aea12f |
This option enables post-handshake authentication when under TLS1.3.
|
|
Packit |
aea12f |
@anchor{gnutls-cli inline-commands}
|
|
Packit |
aea12f |
@subheading inline-commands option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``inline commands of the form ^<cmd>^'' option.
|
|
Packit |
aea12f |
Enable inline commands of the form ^<cmd>^. The inline commands are expected to be in a line by themselves. The available commands are: resume, rekey1 (local rekey), rekey (rekey on both peers) and renegotiate.
|
|
Packit |
aea12f |
@anchor{gnutls-cli inline-commands-prefix}
|
|
Packit |
aea12f |
@subheading inline-commands-prefix option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``change the default delimiter for inline commands.'' option.
|
|
Packit |
aea12f |
This option takes a string argument.
|
|
Packit |
aea12f |
Change the default delimiter (^) used for inline commands. The delimiter is expected to be a single US-ASCII character (octets 0 - 127). This option is only relevant if inline commands are enabled via the inline-commands option
|
|
Packit |
aea12f |
@anchor{gnutls-cli provider}
|
|
Packit |
aea12f |
@subheading provider option
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
This is the ``specify the pkcs #11 provider library'' option.
|
|
Packit |
aea12f |
This option takes a file argument.
|
|
Packit |
aea12f |
This will override the default options in /etc/gnutls/pkcs11.conf
|
|
Packit Service |
991b93 |
@anchor{gnutls-cli logfile}
|
|
Packit Service |
991b93 |
@subheading logfile option
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
This is the ``redirect informational messages to a specific file.'' option.
|
|
Packit Service |
991b93 |
This option takes a string argument.
|
|
Packit Service |
991b93 |
Redirect informational messages to a specific file. The file may be /dev/null also to make the gnutls client quiet to use it in piped server connections where only the server communication may appear on stdout.
|
|
Packit Service |
991b93 |
@anchor{gnutls-cli waitresumption}
|
|
Packit Service |
991b93 |
@subheading waitresumption option
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
This is the ``block waiting for the resumption data under tls1.3'' option.
|
|
Packit Service |
991b93 |
This option makes the client to block waiting for the resumption data under TLS1.3. The option has effect only when --resume is provided.
|
|
Packit |
aea12f |
@anchor{gnutls-cli exit status}
|
|
Packit |
aea12f |
@subheading gnutls-cli exit status
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
One of the following exit values will be returned:
|
|
Packit |
aea12f |
@table @samp
|
|
Packit |
aea12f |
@item 0 (EXIT_SUCCESS)
|
|
Packit |
aea12f |
Successful program execution.
|
|
Packit |
aea12f |
@item 1 (EXIT_FAILURE)
|
|
Packit |
aea12f |
The operation failed or the command syntax was not valid.
|
|
Packit |
aea12f |
@end table
|
|
Packit |
aea12f |
@anchor{gnutls-cli See Also}
|
|
Packit |
aea12f |
@subheading gnutls-cli See Also
|
|
Packit |
aea12f |
gnutls-cli-debug(1), gnutls-serv(1)
|
|
Packit |
aea12f |
@anchor{gnutls-cli Examples}
|
|
Packit |
aea12f |
@subheading gnutls-cli Examples
|
|
Packit |
aea12f |
@subheading Connecting using PSK authentication
|
|
Packit |
aea12f |
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.
|
|
Packit |
aea12f |
@example
|
|
Packit |
aea12f |
$ ./gnutls-cli -p 5556 localhost --pskusername psk_identity \
|
|
Packit |
aea12f |
--pskkey 88f3824b3e5659f52d00e959bacab954b6540344 \
|
|
Packit |
aea12f |
--priority NORMAL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK
|
|
Packit |
aea12f |
Resolving 'localhost'...
|
|
Packit |
aea12f |
Connecting to '127.0.0.1:5556'...
|
|
Packit |
aea12f |
- PSK authentication.
|
|
Packit |
aea12f |
- Version: TLS1.1
|
|
Packit |
aea12f |
- Key Exchange: PSK
|
|
Packit |
aea12f |
- Cipher: AES-128-CBC
|
|
Packit |
aea12f |
- MAC: SHA1
|
|
Packit |
aea12f |
- Compression: NULL
|
|
Packit |
aea12f |
- Handshake was completed
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
- Simple Client Mode:
|
|
Packit |
aea12f |
@end example
|
|
Packit Service |
991b93 |
By keeping the --pskusername parameter and removing the --pskkey parameter, it will query only for the password during the handshake.
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
@subheading Connecting using raw public-key authentication
|
|
Packit Service |
991b93 |
To connect to a server using raw public-key authentication, you need to enable the option to negotiate raw public-keys via the priority strings such as in the example below.
|
|
Packit Service |
991b93 |
@example
|
|
Packit Service |
991b93 |
$ ./gnutls-cli -p 5556 localhost --priority NORMAL:-CTYPE-CLI-ALL:+CTYPE-CLI-RAWPK \
|
|
Packit Service |
991b93 |
--rawpkkeyfile cli.key.pem \
|
|
Packit Service |
991b93 |
--rawpkfile cli.rawpk.pem
|
|
Packit Service |
991b93 |
Processed 1 client raw public key pair...
|
|
Packit Service |
991b93 |
Resolving 'localhost'...
|
|
Packit Service |
991b93 |
Connecting to '127.0.0.1:5556'...
|
|
Packit Service |
991b93 |
- Successfully sent 1 certificate(s) to server.
|
|
Packit Service |
991b93 |
- Server has requested a certificate.
|
|
Packit Service |
991b93 |
- Certificate type: X.509
|
|
Packit Service |
991b93 |
- Got a certificate list of 1 certificates.
|
|
Packit Service |
991b93 |
- Certificate[0] info:
|
|
Packit Service |
991b93 |
- skipped
|
|
Packit Service |
991b93 |
- Description: (TLS1.3-Raw Public Key-X.509)-(ECDHE-SECP256R1)-(RSA-PSS-RSAE-SHA256)-(AES-256-GCM)
|
|
Packit Service |
991b93 |
- Options:
|
|
Packit Service |
991b93 |
- Handshake was completed
|
|
Packit Service |
991b93 |
|
|
Packit Service |
991b93 |
- Simple Client Mode:
|
|
Packit Service |
991b93 |
@end example
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@subheading Connecting to STARTTLS services
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
You could also use the client to connect to services with starttls capability.
|
|
Packit |
aea12f |
@example
|
|
Packit |
aea12f |
$ gnutls-cli --starttls-proto smtp --port 25 localhost
|
|
Packit |
aea12f |
@end example
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@subheading Listing ciphersuites in a priority string
|
|
Packit |
aea12f |
To list the ciphersuites in a priority string:
|
|
Packit |
aea12f |
@example
|
|
Packit |
aea12f |
$ ./gnutls-cli --priority SECURE192 -l
|
|
Packit |
aea12f |
Cipher suites for SECURE192
|
|
Packit |
aea12f |
TLS_ECDHE_ECDSA_AES_256_CBC_SHA384 0xc0, 0x24 TLS1.2
|
|
Packit |
aea12f |
TLS_ECDHE_ECDSA_AES_256_GCM_SHA384 0xc0, 0x2e TLS1.2
|
|
Packit |
aea12f |
TLS_ECDHE_RSA_AES_256_GCM_SHA384 0xc0, 0x30 TLS1.2
|
|
Packit |
aea12f |
TLS_DHE_RSA_AES_256_CBC_SHA256 0x00, 0x6b TLS1.2
|
|
Packit |
aea12f |
TLS_DHE_DSS_AES_256_CBC_SHA256 0x00, 0x6a TLS1.2
|
|
Packit |
aea12f |
TLS_RSA_AES_256_CBC_SHA256 0x00, 0x3d TLS1.2
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Certificate types: CTYPE-X.509
|
|
Packit |
aea12f |
Protocols: VERS-TLS1.2, VERS-TLS1.1, VERS-TLS1.0, VERS-SSL3.0, VERS-DTLS1.0
|
|
Packit |
aea12f |
Compression: COMP-NULL
|
|
Packit |
aea12f |
Elliptic curves: CURVE-SECP384R1, CURVE-SECP521R1
|
|
Packit |
aea12f |
PK-signatures: SIGN-RSA-SHA384, SIGN-ECDSA-SHA384, SIGN-RSA-SHA512, SIGN-ECDSA-SHA512
|
|
Packit |
aea12f |
@end example
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@subheading Connecting using a PKCS #11 token
|
|
Packit |
aea12f |
To connect to a server using a certificate and a private key present in a PKCS #11 token you
|
|
Packit |
aea12f |
need to substitute the PKCS 11 URLs in the x509certfile and x509keyfile parameters.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Those can be found using "p11tool --list-tokens" and then listing all the objects in the
|
|
Packit |
aea12f |
needed token, and using the appropriate.
|
|
Packit |
aea12f |
@example
|
|
Packit |
aea12f |
$ p11tool --list-tokens
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Token 0:
|
|
Packit |
aea12f |
URL: pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test
|
|
Packit |
aea12f |
Label: Test
|
|
Packit |
aea12f |
Manufacturer: EnterSafe
|
|
Packit |
aea12f |
Model: PKCS15
|
|
Packit |
aea12f |
Serial: 1234
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
$ p11tool --login --list-certs "pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test"
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Object 0:
|
|
Packit |
aea12f |
URL: pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test;object=client;type=cert
|
|
Packit |
aea12f |
Type: X.509 Certificate
|
|
Packit |
aea12f |
Label: client
|
|
Packit |
aea12f |
ID: 2a:97:0d:58:d1:51:3c:23:07:ae:4e:0d:72:26:03:7d:99:06:02:6a
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
$ MYCERT="pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test;object=client;type=cert"
|
|
Packit |
aea12f |
$ MYKEY="pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test;object=client;type=private"
|
|
Packit |
aea12f |
$ export MYCERT MYKEY
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
$ gnutls-cli www.example.com --x509keyfile $MYKEY --x509certfile $MYCERT
|
|
Packit |
aea12f |
@end example
|
|
Packit |
aea12f |
Notice that the private key only differs from the certificate in the type.
|