IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QSslDiffieHellmanParameters Class

The https:// class provides an interface for Diffie-Hellman parameters for servers.

This class was introduced in Qt 5.8.

All functions in this class are reentrant.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QSslDiffieHellmanParameters Class▲

  • Header: QSslDiffieHellmanParameters

  • Since: Qt 5.8

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Network)

    target_link_libraries(mytarget PRIVATE Qt6::Network)

  • qmake: QT += network

  • Group: QSslDiffieHellmanParameters is part of https://, ssl, shared

Detailed Description▲

https:// provides an interface for setting Diffie-Hellman parameters to servers based on https://.

See Also▲

See also https://, https://, https://

Member Type Documentation▲

 

enum QSslDiffieHellmanParameters::Error▲

Describes a https:// error.

Constant

Value

Description

https://::NoError

0

No error occurred.

https://::InvalidInputDataError

1

The given input data could not be used to construct a https:// object.

https://::UnsafeParametersError

2

The Diffie-Hellman parameters are unsafe and should not be used.

Member Function Documentation▲

 

QSslDiffieHellmanParameters::QSslDiffieHellmanParameters()▲

Constructs an empty https:// instance.

If an empty https:// instance is set on a https:// object, Diffie-Hellman negotiation will be disabled.

See Also▲

See also https://(), https://

QSslDiffieHellmanParameters::QSslDiffieHellmanParameters(const QSslDiffieHellmanParameters &other)▲

Constructs an identical copy of other.

QSslDiffieHellmanParameters::QSslDiffieHellmanParameters(QSslDiffieHellmanParameters &&other)▲

Move-constructs from other.

The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

QSslDiffieHellmanParameters::~QSslDiffieHellmanParameters()▲

Destroys the https:// object.

[static] QSslDiffieHellmanParameters QSslDiffieHellmanParameters::defaultParameters()▲

Returns the default https:// used by https://.

This is currently the 1024-bit MODP group from RFC 2459, also known as the Second Oakley Group.

QSslDiffieHellmanParameters::Error QSslDiffieHellmanParameters::error() const▲

Returns the error that caused the https:// object to be invalid.

QString QSslDiffieHellmanParameters::errorString() const▲

Returns a human-readable description of the error that caused the https:// object to be invalid.

[static] QSslDiffieHellmanParameters QSslDiffieHellmanParameters::fromEncoded(const QByteArray &encoded, QSsl::EncodingFormat encoding = QSsl::Pem)▲

Constructs a https:// object using the byte array encoded in either PEM or DER form as specified by encoding.

Use the https://() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

See Also▲

See also https://(), https://

[static] QSslDiffieHellmanParameters QSslDiffieHellmanParameters::fromEncoded(QIODevice *device, QSsl::EncodingFormat encoding = QSsl::Pem)▲

Constructs a https:// object by reading from device in either PEM or DER form as specified by encoding.

Use the https://() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.

In particular, if device is nullptr or not open for reading, an invalid object will be returned.

See Also▲

See also https://(), https://

bool QSslDiffieHellmanParameters::isEmpty() const▲

Returns true if this is a an empty https:// instance.

Setting an empty https:// instance on a https://-based server will disable Diffie-Hellman key exchange.

bool QSslDiffieHellmanParameters::isValid() const▲

Returns true if this is a valid https://; otherwise false.

This method should be used after constructing a https:// object to determine its validity.

If a https:// object is not valid, you can use the https://() method to determine what error prevented the object from being constructed.

See Also▲

See also https://()

void QSslDiffieHellmanParameters::swap(QSslDiffieHellmanParameters &other)▲

Swaps this https:// with other. This function is very fast and never fails.

QSslDiffieHellmanParameters &QSslDiffieHellmanParameters::operator=(const QSslDiffieHellmanParameters &other)▲

Copies the contents of other into this https://, making the two https:// identical.

Returns a reference to this https://.

QSslDiffieHellmanParameters &QSslDiffieHellmanParameters::operator=(QSslDiffieHellmanParameters &&other)▲

Move-assigns other to this https:// instance.

The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

Related Non-Members▲

 

[since 5.8] size_t qHash(const QSslDiffieHellmanParameters &dhparam, size_t seed = 0)▲

Returns an hash value for dhparam, using seed to seed the calculation.

This function was introduced in Qt 5.8.

[since 5.8] bool operator!=(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs)▲

Returns true if lhs is not equal to rhs; otherwise returns false.

This function was introduced in Qt 5.8.

[since 5.8] QDebug operator<<(QDebug debug, const QSslDiffieHellmanParameters &dhparam)▲

Writes the set of Diffie-Hellman parameters in dhparam into the debug object debug for debugging purposes.

The Diffie-Hellman parameters will be represented in Base64-encoded DER form.

This function was introduced in Qt 5.8.

See Also▲

See also Debugging Techniques

[since 5.8] bool operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs)▲

Returns true if lhs is equal to rhs; otherwise returns false.

This function was introduced in Qt 5.8.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+   

Ce document est disponible sous la licence https:// telle que publiée par la Free Software Foundation.