QSslDiffieHellmanParameters¶
The
QSslDiffieHellmanParametersclass provides an interface for Diffie-Hellman parameters for servers. More…

New in version 5.8.
Synopsis¶
Functions¶
Static functions¶
def
defaultParameters()def
fromEncoded(device[, format=QSsl.Pem])def
fromEncoded(encoded[, format=QSsl.Pem])
Detailed Description¶
QSslDiffieHellmanParametersprovides an interface for setting Diffie-Hellman parameters to servers based onQSslSocket.See also
- class PySide2.QtNetwork.QSslDiffieHellmanParameters¶
PySide2.QtNetwork.QSslDiffieHellmanParameters(other)
- param other:
Constructs an empty
QSslDiffieHellmanParametersinstance.If an empty
QSslDiffieHellmanParametersinstance is set on aQSslConfigurationobject, Diffie-Hellman negotiation will be disabled.See also
- PySide2.QtNetwork.QSslDiffieHellmanParameters.Error¶
Describes a
QSslDiffieHellmanParameterserror.Constant
Description
QSslDiffieHellmanParameters.NoError
No error occurred.
QSslDiffieHellmanParameters.InvalidInputDataError
The given input data could not be used to construct a
QSslDiffieHellmanParametersobject.QSslDiffieHellmanParameters.UnsafeParametersError
The Diffie-Hellman parameters are unsafe and should not be used.
- static PySide2.QtNetwork.QSslDiffieHellmanParameters.defaultParameters()¶
- Return type:
Returns the default
QSslDiffieHellmanParametersused byQSslSocket.This is currently the 1024-bit MODP group from RFC 2459, also known as the Second Oakley Group.
- PySide2.QtNetwork.QSslDiffieHellmanParameters.error()¶
- Return type:
Returns the error that caused the
QSslDiffieHellmanParametersobject to be invalid.
- PySide2.QtNetwork.QSslDiffieHellmanParameters.errorString()¶
- Return type:
str
Returns a human-readable description of the error that caused the
QSslDiffieHellmanParametersobject to be invalid.
- static PySide2.QtNetwork.QSslDiffieHellmanParameters.fromEncoded(device[, format=QSsl.Pem])¶
- Parameters:
device –
PySide2.QtCore.QIODeviceformat –
EncodingFormat
- Return type:
Constructs a
QSslDiffieHellmanParametersobject by reading fromdevicein either PEM or DER form as specified byencoding.Use the
isValid()method on the returned object to check whether the Diffie-Hellman parameters were valid and loaded correctly.In particular, if
deviceisNoneor not open for reading, an invalid object will be returned.See also
- static PySide2.QtNetwork.QSslDiffieHellmanParameters.fromEncoded(encoded[, format=QSsl.Pem])
- Parameters:
encoded –
PySide2.QtCore.QByteArrayformat –
EncodingFormat
- Return type:
- PySide2.QtNetwork.QSslDiffieHellmanParameters.isEmpty()¶
- Return type:
bool
Returns
trueif this is a an emptyQSslDiffieHellmanParametersinstance.Setting an empty
QSslDiffieHellmanParametersinstance on aQSslSocket-based server will disable Diffie-Hellman key exchange.
- PySide2.QtNetwork.QSslDiffieHellmanParameters.isValid()¶
- Return type:
bool
Returns
trueif this is a validQSslDiffieHellmanParameters; otherwise false.This method should be used after constructing a
QSslDiffieHellmanParametersobject to determine its validity.If a
QSslDiffieHellmanParametersobject is not valid, you can use theerror()method to determine what error prevented the object from being constructed.See also
- PySide2.QtNetwork.QSslDiffieHellmanParameters.__ne__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtNetwork.QSslDiffieHellmanParameters.__eq__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtNetwork.QSslDiffieHellmanParameters.swap(other)¶
- Parameters:
Swaps this
QSslDiffieHellmanParameterswithother. This function is very fast and never fails.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.