Blame doc/manpages/gnutls-cli.1

Packit aea12f
.de1 NOP
Packit aea12f
.  it 1 an-trap
Packit aea12f
.  if \\n[.$] \,\\$*\/
Packit aea12f
..
Packit aea12f
.ie t \
Packit aea12f
.ds B-Font [CB]
Packit aea12f
.ds I-Font [CI]
Packit aea12f
.ds R-Font [CR]
Packit aea12f
.el \
Packit aea12f
.ds B-Font B
Packit aea12f
.ds I-Font I
Packit aea12f
.ds R-Font R
Packit aea12f
.TH gnutls-cli 1 "25 May 2019" "3.6.8" "User Commands"
Packit aea12f
.\"
Packit aea12f
.\" DO NOT EDIT THIS FILE (in-mem file)
Packit aea12f
.\"
Packit aea12f
.\" It has been AutoGen-ed
Packit aea12f
.\" From the definitions ../../src/cli-args.def.tmp
Packit aea12f
.\" and the template file agman-cmd.tpl
Packit aea12f
.SH NAME
Packit aea12f
\f\*[B-Font]gnutls-cli\fP
Packit aea12f
\- GnuTLS client
Packit aea12f
.SH SYNOPSIS
Packit aea12f
\f\*[B-Font]gnutls-cli\fP
Packit aea12f
.\" Mixture of short (flag) options and long options
Packit aea12f
[\f\*[B-Font]\-flags\f[]]
Packit aea12f
[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
Packit aea12f
[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
Packit aea12f
[hostname]
Packit aea12f
.sp \n(Ppu
Packit aea12f
.ne 2
Packit aea12f
Packit aea12f
Operands and options may be intermixed.  They will be reordered.
Packit aea12f
.sp \n(Ppu
Packit aea12f
.ne 2
Packit aea12f
Packit aea12f
.SH "DESCRIPTION"
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
.SH "OPTIONS"
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-debug\f[]=\f\*[I-Font]number\f[]
Packit aea12f
Enable debugging.
Packit aea12f
This option takes an integer number as its argument.
Packit aea12f
The value of
Packit aea12f
\f\*[I-Font]number\f[]
Packit aea12f
is constrained to being:
Packit aea12f
.in +4
Packit aea12f
.nf
Packit aea12f
.na
Packit aea12f
in the range  0 through 9999
Packit aea12f
.fi
Packit aea12f
.in -4
Packit aea12f
.sp
Packit aea12f
Specifies the debug level.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-verbose\f[]
Packit aea12f
More verbose output.
Packit aea12f
This option may appear an unlimited number of times.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-tofu\f[], \f\*[B-Font]\-\-no\-tofu\f[]
Packit aea12f
Enable trust on first use authentication.
Packit aea12f
The \fIno\-tofu\fP form will disable the option.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-strict\-tofu\f[], \f\*[B-Font]\-\-no\-strict\-tofu\f[]
Packit aea12f
Fail to connect if a certificate is unknown or a known certificate has changed.
Packit aea12f
The \fIno\-strict\-tofu\fP form will disable the option.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-dane\f[], \f\*[B-Font]\-\-no\-dane\f[]
Packit aea12f
Enable DANE certificate verification (DNSSEC).
Packit aea12f
The \fIno\-dane\fP form will disable the option.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-local\-dns\f[], \f\*[B-Font]\-\-no\-local\-dns\f[]
Packit aea12f
Use the local DNS server for DNSSEC resolving.
Packit aea12f
The \fIno\-local\-dns\fP form will disable the option.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-ca\-verification\f[], \f\*[B-Font]\-\-no\-ca\-verification\f[]
Packit aea12f
Enable CA certificate verification.
Packit aea12f
The \fIno\-ca\-verification\fP form will disable the option.
Packit aea12f
This option is enabled by default.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-ocsp\f[], \f\*[B-Font]\-\-no\-ocsp\f[]
Packit aea12f
Enable OCSP certificate verification.
Packit aea12f
The \fIno\-ocsp\fP form will disable the option.
Packit aea12f
.sp
Packit aea12f
This option will enable verification of the peer's certificate using ocsp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-r\f[], \f\*[B-Font]\-\-resume\f[]
Packit aea12f
Establish a session and resume.
Packit aea12f
.sp
Packit aea12f
Connect, establish a session, reconnect and resume.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-earlydata\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Send early data on resumption from the specified file.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-rehandshake\f[]
Packit aea12f
Establish a session and rehandshake.
Packit aea12f
.sp
Packit aea12f
Connect, establish a session and rehandshake immediately.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-sni\-hostname\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Server's hostname for server name indication extension.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-verify\-hostname\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Server's hostname to use for validation.
Packit aea12f
.sp
Packit aea12f
Set explicitly the server name to be used when validating the server's certificate.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-starttls\f[]
Packit aea12f
Connect, establish a plain session and start TLS.
Packit aea12f
.sp
Packit aea12f
The TLS session will be initiated when EOF or a SIGALRM is received.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-app-proto\f[]
Packit aea12f
This is an alias for the \fI--starttls-proto\fR option.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-starttls\-proto\f[]=\f\*[I-Font]string\f[]
Packit aea12f
The application protocol to be used to obtain the server's certificate (https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres).
Packit aea12f
This option must not appear in combination with any of the following options:
Packit aea12f
starttls.
Packit aea12f
.sp
Packit aea12f
Specify the application layer protocol for STARTTLS. If the protocol is supported, gnutls-cli will proceed to the TLS negotiation.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-udp\f[]
Packit aea12f
Use DTLS (datagram TLS) over UDP.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-mtu\f[]=\f\*[I-Font]number\f[]
Packit aea12f
Set MTU for datagram TLS.
Packit aea12f
This option takes an integer number as its argument.
Packit aea12f
The value of
Packit aea12f
\f\*[I-Font]number\f[]
Packit aea12f
is constrained to being:
Packit aea12f
.in +4
Packit aea12f
.nf
Packit aea12f
.na
Packit aea12f
in the range  0 through 17000
Packit aea12f
.fi
Packit aea12f
.in -4
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-crlf\f[]
Packit aea12f
Send CR LF instead of LF.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-fastopen\f[]
Packit aea12f
Enable TCP Fast Open.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-x509fmtder\f[]
Packit aea12f
Use DER format for certificates to read from.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-print\-cert\f[]
Packit aea12f
Print peer's certificate in PEM format.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-save\-cert\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Save the peer's certificate chain in the specified file in PEM format.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-save\-ocsp\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Save the peer's OCSP status response in the provided file.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-save\-server\-trace\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Save the server-side TLS message trace in the provided file.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-save\-client\-trace\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Save the client-side TLS message trace in the provided file.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-dh\-bits\f[]=\f\*[I-Font]number\f[]
Packit aea12f
The minimum number of bits allowed for DH.
Packit aea12f
This option takes an integer number as its argument.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-priority\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Priorities string.
Packit aea12f
.sp
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
.sp
Packit aea12f
Check  the  GnuTLS  manual  on  section  \(lqPriority strings\(rq for more
Packit aea12f
information on the allowed keywords
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-x509cafile\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Certificate file or PKCS #11 URL to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-x509crlfile\f[]=\f\*[I-Font]file\f[]
Packit aea12f
CRL file to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-x509keyfile\f[]=\f\*[I-Font]string\f[]
Packit aea12f
X.509 key file or PKCS #11 URL to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-x509certfile\f[]=\f\*[I-Font]string\f[]
Packit aea12f
X.509 Certificate file or PKCS #11 URL to use.
Packit aea12f
This option must appear in combination with the following options:
Packit aea12f
x509keyfile.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-srpusername\f[]=\f\*[I-Font]string\f[]
Packit aea12f
SRP username to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-srppasswd\f[]=\f\*[I-Font]string\f[]
Packit aea12f
SRP password to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-pskusername\f[]=\f\*[I-Font]string\f[]
Packit aea12f
PSK username to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-pskkey\f[]=\f\*[I-Font]string\f[]
Packit aea12f
PSK key (in hex) to use.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-port\f[]=\f\*[I-Font]string\f[]
Packit aea12f
The port or service to connect to.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-insecure\f[]
Packit aea12f
Don't abort program if server certificate can't be validated.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-verify\-allow\-broken\f[]
Packit aea12f
Allow broken algorithms, such as MD5 for certificate verification.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-ranges\f[]
Packit aea12f
Use length-hiding padding to prevent traffic analysis.
Packit aea12f
.sp
Packit aea12f
When possible (e.g., when using CBC ciphersuites), use length-hiding padding to prevent traffic analysis.
Packit aea12f
.sp
Packit aea12f
.B
Packit aea12f
NOTE: THIS OPTION IS DEPRECATED
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-benchmark\-ciphers\f[]
Packit aea12f
Benchmark individual ciphers.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-benchmark\-tls\-kx\f[]
Packit aea12f
Benchmark TLS key exchange methods.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-benchmark\-tls\-ciphers\f[]
Packit aea12f
Benchmark TLS ciphers.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-l\f[], \f\*[B-Font]\-\-list\f[]
Packit aea12f
Print a list of the supported algorithms and modes.
Packit aea12f
This option must not appear in combination with any of the following options:
Packit aea12f
port.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-priority\-list\f[]
Packit aea12f
Print a list of the supported priority strings.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-noticket\f[]
Packit aea12f
Don't allow session tickets.
Packit aea12f
.sp
Packit aea12f
Disable the request of receiving of session tickets under TLS1.2 or earlier
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-srtp\-profiles\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Offer SRTP profiles.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-alpn\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Application layer protocol.
Packit aea12f
This option may appear an unlimited number of times.
Packit aea12f
.sp
Packit aea12f
This option will set and enable the Application Layer Protocol Negotiation  (ALPN) in the TLS protocol.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-heartbeat\f[]
Packit aea12f
Activate heartbeat support.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-recordsize\f[]=\f\*[I-Font]number\f[]
Packit aea12f
The maximum record size to advertize.
Packit aea12f
This option takes an integer number as its argument.
Packit aea12f
The value of
Packit aea12f
\f\*[I-Font]number\f[]
Packit aea12f
is constrained to being:
Packit aea12f
.in +4
Packit aea12f
.nf
Packit aea12f
.na
Packit aea12f
in the range  0 through 4096
Packit aea12f
.fi
Packit aea12f
.in -4
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-disable\-sni\f[]
Packit aea12f
Do not send a Server Name Indication (SNI).
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-disable\-extensions\f[]
Packit aea12f
Disable all the TLS extensions.
Packit aea12f
.sp
Packit aea12f
This option disables all TLS extensions. Deprecated option. Use the priority string.
Packit aea12f
.sp
Packit aea12f
.B
Packit aea12f
NOTE: THIS OPTION IS DEPRECATED
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-single\-key\-share\f[]
Packit aea12f
Send a single key share under TLS1.3.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-post\-handshake\-auth\f[]
Packit aea12f
Enable post-handshake authentication under TLS1.3.
Packit aea12f
.sp
Packit aea12f
This option enables post-handshake authentication when under TLS1.3.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-inline\-commands\f[]
Packit aea12f
Inline commands of the form ^<cmd>^.
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-inline\-commands\-prefix\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Change the default delimiter for inline commands..
Packit aea12f
.sp
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
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-provider\f[]=\f\*[I-Font]file\f[]
Packit aea12f
Specify the PKCS #11 provider library.
Packit aea12f
.sp
Packit aea12f
This will override the default options in /etc/gnutls/pkcs11.conf
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-fips140\-mode\f[]
Packit aea12f
Reports the status of the FIPS140-2 mode in gnutls library.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-logfile\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Redirect informational messages to a specific file..
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-keymatexport\f[]=\f\*[I-Font]string\f[]
Packit aea12f
Label used for exporting keying material.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\-keymatexportsize\f[]=\f\*[I-Font]number\f[]
Packit aea12f
Size of the exported keying material.
Packit aea12f
This option takes an integer number as its argument.
Packit aea12f
.sp
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-help\f[]
Packit aea12f
Display usage information and exit.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
Packit aea12f
Pass the extended usage information through a pager.
Packit aea12f
.TP
Packit aea12f
.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
Packit aea12f
Output version of program and exit.  The default mode is `v', a simple
Packit aea12f
version.  The `c' mode will print copyright information and `n' will
Packit aea12f
print the full copyright notice.
Packit aea12f
.PP
Packit aea12f
.SH EXAMPLES
Packit aea12f
.br
Packit aea12f
\fBConnecting using PSK authentication\fP
Packit aea12f
.br
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
.br
Packit aea12f
.in +4
Packit aea12f
.nf
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
- Simple Client Mode:
Packit aea12f
.in -4
Packit aea12f
.fi
Packit aea12f
By keeping the \-\-pskusername parameter and removing the \-\-pskkey parameter, it will query only for the password during the handshake. 
Packit aea12f
.sp
Packit aea12f
.br
Packit aea12f
\fBConnecting to STARTTLS services\fP
Packit aea12f
.br
Packit aea12f
.sp
Packit aea12f
You could also use the client to connect to services with starttls capability.
Packit aea12f
.br
Packit aea12f
.in +4
Packit aea12f
.nf
Packit aea12f
$ gnutls\-cli \-\-starttls\-proto smtp \-\-port 25 localhost
Packit aea12f
.in -4
Packit aea12f
.fi
Packit aea12f
.sp
Packit aea12f
.br
Packit aea12f
\fBListing ciphersuites in a priority string\fP
Packit aea12f
.br
Packit aea12f
To list the ciphersuites in a priority string:
Packit aea12f
.br
Packit aea12f
.in +4
Packit aea12f
.nf
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
.sp
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
.in -4
Packit aea12f
.fi
Packit aea12f
.sp
Packit aea12f
.br
Packit aea12f
\fBConnecting using a PKCS #11 token\fP
Packit aea12f
.br
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
.sp
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
.br
Packit aea12f
.in +4
Packit aea12f
.nf
Packit aea12f
$ p11tool \-\-list\-tokens
Packit aea12f
.sp
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
.sp
Packit aea12f
$ p11tool \-\-login \-\-list\-certs "pkcs11:model=PKCS15;manufacturer=MyMan;serial=1234;token=Test"
Packit aea12f
.sp
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
.sp
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
.sp
Packit aea12f
$ gnutls\-cli www.example.com \-\-x509keyfile $MYKEY \-\-x509certfile $MYCERT
Packit aea12f
.in -4
Packit aea12f
.fi
Packit aea12f
Notice that the private key only differs from the certificate in the type.
Packit aea12f
.SH "EXIT STATUS"
Packit aea12f
One of the following exit values will be returned:
Packit aea12f
.TP
Packit aea12f
.NOP 0 " (EXIT_SUCCESS)"
Packit aea12f
Successful program execution.
Packit aea12f
.TP
Packit aea12f
.NOP 1 " (EXIT_FAILURE)"
Packit aea12f
The operation failed or the command syntax was not valid.
Packit aea12f
.TP
Packit aea12f
.NOP 70 " (EX_SOFTWARE)"
Packit aea12f
libopts had an internal operational error.  Please report
Packit aea12f
it to autogen-users@lists.sourceforge.net.  Thank you.
Packit aea12f
.PP
Packit aea12f
.SH "SEE ALSO"
Packit aea12f
gnutls\-cli\-debug(1), gnutls\-serv(1)
Packit aea12f
.SH "AUTHORS"
Packit aea12f
Nikos Mavrogiannopoulos, Simon Josefsson and others; see /usr/share/doc/gnutls/AUTHORS for a complete list.
Packit aea12f
.SH "COPYRIGHT"
Packit aea12f
Copyright (C) 2000-2019 Free Software Foundation, and others all rights reserved.
Packit aea12f
This program is released under the terms of the GNU General Public License, version 3 or later.
Packit aea12f
.SH "BUGS"
Packit aea12f
Please send bug reports to: bugs@gnutls.org
Packit aea12f
.SH "NOTES"
Packit aea12f
This manual page was \fIAutoGen\fP-erated from the \fBgnutls-cli\fP
Packit aea12f
option definitions.