QSslDiffieHellmanParameters#
The QSslDiffieHellmanParameters
class provides an interface for Diffie-Hellman parameters for servers. More…
Synopsis#
Functions#
Static functions#
def
defaultParameters
()def
fromEncoded
(device[, format=QSsl.Pem])def
fromEncoded
(encoded[, format=QSsl.Pem])
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
QSslDiffieHellmanParameters
provides an interface for setting Diffie-Hellman parameters to servers based on QSslSocket
.
See also
- class PySide6.QtNetwork.QSslDiffieHellmanParameters#
PySide6.QtNetwork.QSslDiffieHellmanParameters(other)
- Parameters:
Constructs an empty QSslDiffieHellmanParameters
instance.
If an empty QSslDiffieHellmanParameters
instance is set on a QSslConfiguration
object, Diffie-Hellman negotiation will be disabled.
See also
Constructs an identical copy of other
.
- PySide6.QtNetwork.QSslDiffieHellmanParameters.Error#
Describes a QSslDiffieHellmanParameters
error.
Constant
Description
QSslDiffieHellmanParameters.NoError
No error occurred.
QSslDiffieHellmanParameters.InvalidInputDataError
The given input data could not be used to construct a
QSslDiffieHellmanParameters
object.QSslDiffieHellmanParameters.UnsafeParametersError
The Diffie-Hellman parameters are unsafe and should not be used.
- static PySide6.QtNetwork.QSslDiffieHellmanParameters.defaultParameters()#
- Return type:
Returns the default QSslDiffieHellmanParameters
used by QSslSocket
.
This is currently the 2048-bit MODP group from RFC 3526.
Returns the error that caused the QSslDiffieHellmanParameters
object to be invalid.
- PySide6.QtNetwork.QSslDiffieHellmanParameters.errorString()#
- Return type:
str
Returns a human-readable description of the error that caused the QSslDiffieHellmanParameters
object to be invalid.
- static PySide6.QtNetwork.QSslDiffieHellmanParameters.fromEncoded(device[, format=QSsl.Pem])#
- Parameters:
device –
PySide6.QtCore.QIODevice
format –
EncodingFormat
- Return type:
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 None
or not open for reading, an invalid object will be returned.
See also
- static PySide6.QtNetwork.QSslDiffieHellmanParameters.fromEncoded(encoded[, format=QSsl.Pem])
- Parameters:
encoded –
PySide6.QtCore.QByteArray
format –
EncodingFormat
- Return type:
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.
See also
- PySide6.QtNetwork.QSslDiffieHellmanParameters.isEmpty()#
- Return type:
bool
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.
- PySide6.QtNetwork.QSslDiffieHellmanParameters.isValid()#
- Return type:
bool
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.
See also
- PySide6.QtNetwork.QSslDiffieHellmanParameters.__ne__(rhs)#
- Parameters:
- Return type:
bool
Returns true
if lhs
is not equal to rhs
; otherwise returns false
.
- PySide6.QtNetwork.QSslDiffieHellmanParameters.__eq__(rhs)#
- Parameters:
- Return type:
bool
Returns true
if lhs
is equal to rhs
; otherwise returns false
.
- PySide6.QtNetwork.QSslDiffieHellmanParameters.swap(other)#
- Parameters:
Swaps this QSslDiffieHellmanParameters
with other
. This function is very fast and never fails.