Home

QSslConfiguration

QSslConfiguration is a class in the Qt Network module that describes the SSL/TLS settings used for secure network connections, such as those performed by QSslSocket and related networking components. It provides a programmatic way to specify how TLS is negotiated, including the protocol version, the cipher suites that may be used, and the credentials and trust anchors involved in the handshake. Applications can obtain the current configuration, modify its properties, and apply it to a socket or network component to control TLS behavior.

Key elements stored by QSslConfiguration include the SSL protocol version, the list of allowed ciphers, the

QSslConfiguration can be retrieved, modified, and then applied to individual sockets or network access components. There

In practice, QSslConfiguration is used to enforce secure connections by selecting appropriate TLS versions, enabling or

peer
verification
mode
(whether
the
peer’s
certificate
should
be
verified
or
not),
and
the
verification
depth.
It
also
holds
the
local
credentials
presented
to
the
peer,
such
as
a
local
certificate
and
its
private
key,
and
the
set
of
trusted
CA
certificates
used
to
validate
the
peer’s
certificate.
The
configuration
can
also
influence
how
certificates
are
validated
and
which
certificates
are
considered
trustworthy.
is
typically
a
notion
of
a
default
configuration
that
can
be
changed
globally,
while
sockets
may
also
possess
their
own
explicit
configurations.
This
allows
both
global
uniform
security
policies
and
per-connection
customization.
disabling
peer
verification
as
appropriate,
and
ensuring
that
proper
certificates
and
CA
authorities
are
in
place.
Care
should
be
taken
to
keep
CA
certificates
current
and
to
avoid
turning
off
verification
in
production
environments.
See
also
related
classes
such
as
QSslCertificate,
QSslKey,
and
QSslSocket.