![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QSslDiffieHellmanParameters class provides an interface for Diffie-Hellman parameters for servers. More...
#include <qssldiffiehellmanparameters.h>
Public Types | |
enum | Error { NoError , InvalidInputDataError , UnsafeParametersError } |
Describes a QSslDiffieHellmanParameters error. More... |
Public Member Functions | |
QSslDiffieHellmanParameters () | |
Constructs an empty QSslDiffieHellmanParameters instance. | |
QSslDiffieHellmanParameters (const QSslDiffieHellmanParameters &other) | |
Constructs an identical copy of other. | |
QSslDiffieHellmanParameters (QSslDiffieHellmanParameters &&other) noexcept | |
Move-constructs from other. | |
~QSslDiffieHellmanParameters () | |
Destroys the QSslDiffieHellmanParameters object. | |
QSslDiffieHellmanParameters & | operator= (const QSslDiffieHellmanParameters &other) |
Copies the contents of other into this QSslDiffieHellmanParameters, making the two QSslDiffieHellmanParameters identical. | |
QSslDiffieHellmanParameters & | operator= (QSslDiffieHellmanParameters &&other) noexcept |
Move-assigns other to this QSslDiffieHellmanParameters instance. | |
void | swap (QSslDiffieHellmanParameters &other) noexcept |
\memberswap{QSslDiffieHellmanParameters} | |
bool | isEmpty () const noexcept |
Returns true if this is a an empty QSslDiffieHellmanParameters instance. | |
bool | isValid () const noexcept |
Returns true if this is a valid QSslDiffieHellmanParameters; otherwise false. | |
Error | error () const noexcept |
Returns the error that caused the QSslDiffieHellmanParameters object to be invalid. | |
QString | errorString () const noexcept |
Returns a human-readable description of the error that caused the QSslDiffieHellmanParameters object to be invalid. |
Static Public Member Functions | |
static QSslDiffieHellmanParameters | defaultParameters () |
Returns the default QSslDiffieHellmanParameters used by QSslSocket. | |
static QSslDiffieHellmanParameters | fromEncoded (const QByteArray &encoded, QSsl::EncodingFormat format=QSsl::Pem) |
Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding. | |
static QSslDiffieHellmanParameters | fromEncoded (QIODevice *device, QSsl::EncodingFormat format=QSsl::Pem) |
Constructs a QSslDiffieHellmanParameters object by reading from device in either PEM or DER form as specified by encoding. |
Friends | |
class | QSslContext |
bool | operator== (const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) noexcept |
bool | operator!= (const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) noexcept |
Q_NETWORK_EXPORT QDebug | operator<< (QDebug debug, const QSslDiffieHellmanParameters &dhparam) |
Q_NETWORK_EXPORT size_t | qHash (const QSslDiffieHellmanParameters &dhparam, size_t seed=0) |
The QSslDiffieHellmanParameters class provides an interface for Diffie-Hellman parameters for servers.
\reentrant
\inmodule QtNetwork
QSslDiffieHellmanParameters provides an interface for setting Diffie-Hellman parameters to servers based on QSslSocket.
Definition at line 31 of file qssldiffiehellmanparameters.h.
Describes a QSslDiffieHellmanParameters error.
\value NoError No error occurred.
\value InvalidInputDataError The given input data could not be used to construct a QSslDiffieHellmanParameters object.
\value UnsafeParametersError The Diffie-Hellman parameters are unsafe and should not be used.
Enumerator | |
---|---|
NoError | |
InvalidInputDataError | |
UnsafeParametersError |
Definition at line 34 of file qssldiffiehellmanparameters.h.
QSslDiffieHellmanParameters::QSslDiffieHellmanParameters | ( | ) |
Constructs an empty QSslDiffieHellmanParameters instance.
If an empty QSslDiffieHellmanParameters instance is set on a QSslConfiguration object, Diffie-Hellman negotiation will be disabled.
Definition at line 67 of file qssldiffiehellmanparameters.cpp.
QSslDiffieHellmanParameters::QSslDiffieHellmanParameters | ( | const QSslDiffieHellmanParameters & | other | ) |
Constructs an identical copy of other.
Definition at line 126 of file qssldiffiehellmanparameters.cpp.
|
inlinenoexcept |
Move-constructs from other.
Definition at line 44 of file qssldiffiehellmanparameters.h.
QSslDiffieHellmanParameters::~QSslDiffieHellmanParameters | ( | ) |
Destroys the QSslDiffieHellmanParameters object.
Definition at line 145 of file qssldiffiehellmanparameters.cpp.
|
static |
Returns the default QSslDiffieHellmanParameters used by QSslSocket.
This is currently the 2048-bit MODP group from RFC 3526.
Definition at line 50 of file qssldiffiehellmanparameters.cpp.
|
noexcept |
Returns the error that caused the QSslDiffieHellmanParameters object to be invalid.
Definition at line 224 of file qssldiffiehellmanparameters.cpp.
|
noexcept |
Returns a human-readable description of the error that caused the QSslDiffieHellmanParameters object to be invalid.
Definition at line 233 of file qssldiffiehellmanparameters.cpp.
|
static |
Constructs a QSslDiffieHellmanParameters object using the byte array encoded in either PEM or DER form as specified by encoding.
Use the isValid() method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.
Definition at line 84 of file qssldiffiehellmanparameters.cpp.
|
static |
Constructs a QSslDiffieHellmanParameters object by reading from device in either PEM or DER form as specified by encoding.
Use the isValid() 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.
Definition at line 115 of file qssldiffiehellmanparameters.cpp.
|
noexcept |
Returns true
if this is a an empty QSslDiffieHellmanParameters instance.
Setting an empty QSslDiffieHellmanParameters instance on a QSslSocket-based server will disable Diffie-Hellman key exchange.
Definition at line 184 of file qssldiffiehellmanparameters.cpp.
|
noexcept |
Returns true
if this is a valid QSslDiffieHellmanParameters; otherwise false.
This method should be used after constructing a QSslDiffieHellmanParameters object to determine its validity.
If a QSslDiffieHellmanParameters object is not valid, you can use the error() method to determine what error prevented the object from being constructed.
Definition at line 200 of file qssldiffiehellmanparameters.cpp.
QSslDiffieHellmanParameters & QSslDiffieHellmanParameters::operator= | ( | const QSslDiffieHellmanParameters & | other | ) |
Copies the contents of other into this QSslDiffieHellmanParameters, making the two QSslDiffieHellmanParameters identical.
Returns a reference to this QSslDiffieHellmanParameters.
Definition at line 157 of file qssldiffiehellmanparameters.cpp.
|
inlinenoexcept |
Move-assigns other to this QSslDiffieHellmanParameters instance.
Definition at line 48 of file qssldiffiehellmanparameters.h.
|
inlinenoexcept |
\memberswap{QSslDiffieHellmanParameters}
Definition at line 50 of file qssldiffiehellmanparameters.h.
|
friend |
Returns true
if lhs is not equal to rhs; otherwise returns false
.
Definition at line 67 of file qssldiffiehellmanparameters.h.
|
friend |
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.
Definition at line 299 of file qssldiffiehellmanparameters.cpp.
|
friend |
Returns true
if lhs is equal to rhs; otherwise returns false
.
Definition at line 65 of file qssldiffiehellmanparameters.h.
|
friend |
Definition at line 313 of file qssldiffiehellmanparameters.cpp.
|
friend |
Definition at line 62 of file qssldiffiehellmanparameters.h.