PythonQt.QtNetwork.QSslSocket · declarations 003
Back to PythonQt.QtNetwork.QSslSocket
setLocalCertificateChain
setLocalCertificateChain(localChain: Any) -> None
X.setLocalCertificateChain(localChain)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setLocalCertificateChain(const QList\<QSslCertificate> \&localChain)
Sets the certificate chain to be presented to the peer during the SSL handshake to be localChain.
This function was introduced in Qt 5.1.
See also localCertificateChain() and QSslConfiguration::setLocalCertificateChain().
Upstream PySide2 reference signatures (binding differences may apply):
setLocalCertificateChain(self, localChain: typing.Sequence[PySide2.QtNetwork.QSslCertificate]) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setLocalCertificateChain
setLocalPort
setLocalPort(port: Any) -> Any
X.setLocalPort(port)
setPauseMode
setPauseMode(pauseMode: Any) -> Any
X.setPauseMode(pauseMode)
setPeerAddress
setPeerAddress(address: Any) -> Any
X.setPeerAddress(address)
setPeerName
setPeerName(name: Any) -> Any
X.setPeerName(name)
setPeerPort
setPeerPort(port: Any) -> Any
X.setPeerPort(port)
setPeerVerifyDepth
setPeerVerifyDepth(depth: int) -> None
X.setPeerVerifyDepth(depth)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setPeerVerifyDepth(int depth)
Sets the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, to depth. Setting a depth of 0 means that no maximum depth is set, indicating that the whole certificate chain should be checked.
The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.
This function was introduced in Qt 4.4.
See also peerVerifyDepth() and setPeerVerifyMode().
Upstream PySide2 reference signatures (binding differences may apply):
setPeerVerifyDepth(self, depth: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setPeerVerifyDepth
setPeerVerifyMode
setPeerVerifyMode(mode: Any) -> None
X.setPeerVerifyMode(mode)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setPeerVerifyMode(QSslSocket::PeerVerifyMode mode)
Sets the socket's verify mode to mode. This mode decides whether QSslSocket should request a certificate from the peer (i.e., the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.
The default mode is AutoVerifyPeer, which tells QSslSocket to use VerifyPeer for clients and QueryPeer for servers.
Setting this mode after encryption has started has no effect on the current connection.
This function was introduced in Qt 4.4.
See also peerVerifyMode(), setPeerVerifyDepth(), and mode().
Upstream PySide2 reference signatures (binding differences may apply):
setPeerVerifyMode(self, mode: PySide2.QtNetwork.QSslSocket.PeerVerifyMode) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setPeerVerifyMode
setPeerVerifyName
setPeerVerifyName(hostName: str) -> None
X.setPeerVerifyName(hostName)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setPeerVerifyName(const QString \&hostName)
Sets a different host name, given by hostName, for the certificate validation instead of the one used for the TCP connection.
This function was introduced in Qt 4.8.
See also peerVerifyName() and connectToHostEncrypted().
Upstream PySide2 reference signatures (binding differences may apply):
setPeerVerifyName(self, hostName: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setPeerVerifyName
setPrivateKey
setPrivateKey(fileName: Any, algorithm: Any, format: Any, passPhrase: Any) -> None
X.setPrivateKey(fileName, algorithm, format, passPhrase)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setPrivateKey(const QSslKey \&key)
Sets the socket's private key to key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.
Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.
See also privateKey() and setLocalCertificate().
void QSslSocket::setPrivateKey(const QString \&fileName, QSsl::KeyAlgorithm algorithm \= QSsl::Rsa, QSsl::EncodingFormat format \= QSsl::Pem, const QByteArray \&passPhrase \= QByteArray())
This is an overloaded function.
Reads the string in file fileName and decodes it using a specified algorithm and encoding format to construct an SSL key. If the encoded key is encrypted, passPhrase is used to decrypt it.
The socket's private key is set to the constructed key. The private key and the local certificate are used by clients and servers that must prove their identity to SSL peers.
Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.
See also privateKey() and setLocalCertificate().
Upstream PySide2 reference signatures (binding differences may apply):
setPrivateKey(self, fileName: str, algorithm: PySide2.QtNetwork.QSsl.KeyAlgorithm=..., format: PySide2.QtNetwork.QSsl.EncodingFormat=..., passPhrase: PySide2.QtCore.QByteArray=...) -> None
setPrivateKey(self, key: PySide2.QtNetwork.QSslKey) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setPrivateKey
setProtocol
setProtocol(protocol: Any) -> None
X.setProtocol(protocol)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setProtocol(QSsl::SslProtocol protocol)
Sets the socket's SSL protocol to protocol. This will affect the next initiated handshake; calling this function on an already-encrypted socket will not affect the socket's protocol.
See also protocol().
Upstream PySide2 reference signatures (binding differences may apply):
setProtocol(self, protocol: PySide2.QtNetwork.QSsl.SslProtocol) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setProtocol
setProxy
setProxy(networkProxy: Any) -> Any
X.setProxy(networkProxy)
setReadBufferSize
setReadBufferSize(size: int) -> None
X.setReadBufferSize(size)
Supplemental documentation: Qt 5 reference:
[override virtual] void QSslSocket::setReadBufferSize(qint64 size)
Reimplements: QAbstractSocket::setReadBufferSize(qint64 size).
Sets the size of QSslSocket's internal read buffer to be size bytes.
This function was introduced in Qt 4.4.
Upstream PySide2 reference signatures (binding differences may apply):
setReadBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setReadBufferSize
setSocketDescriptor
setSocketDescriptor(socketDescriptor: int, state: Any, openMode: Any) -> bool
X.setSocketDescriptor(socketDescriptor, state, openMode) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QSslSocket::setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state \= ConnectedState, QIODevice::OpenMode openMode \= ReadWrite)
Reimplements: QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState socketState, QIODevice::OpenMode openMode).
Initializes QSslSocket with the
native socket descriptor socketDescriptor. Returns true if socketDescriptor is
accepted as a valid socket descriptor; otherwise returns false. The socket is opened
in the mode specified by openMode, and enters the socket state specified by state.
Note: It is not possible to initialize two sockets with the same native socket descriptor.
See also socketDescriptor().
Upstream PySide2 reference signatures (binding differences may apply):
setSocketDescriptor(self, socketDescriptor: int, state: PySide2.QtNetwork.QAbstractSocket.SocketState=..., openMode: PySide2.QtCore.QIODevice.OpenMode=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setSocketDescriptor
setSocketError
setSocketError(socketError: Any) -> Any
X.setSocketError(socketError)
setSocketOption
setSocketOption(option: Any, value: Any) -> None
X.setSocketOption(option, value)
Supplemental documentation: Qt 5 reference:
[override virtual] void QSslSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant \&value)
Reimplements: QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant \&value).
Sets the given option to the value described by value.
This function was introduced in Qt 4.6.
See also socketOption().
Upstream PySide2 reference signatures (binding differences may apply):
setSocketOption(self, option: PySide2.QtNetwork.QAbstractSocket.SocketOption, value: typing.Any) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setSocketOption
setSocketState
setSocketState(state: Any) -> Any
X.setSocketState(state)
setSslConfiguration
setSslConfiguration(config: Any) -> None
X.setSslConfiguration(config)
Supplemental documentation: Qt 5 reference:
void QSslSocket::setSslConfiguration(const QSslConfiguration \&configuration)
Sets the socket's SSL configuration to be the contents of configuration. This function sets the local certificate, the ciphers, the private key and the CA certificates to those stored in configuration.
It is not possible to set the SSL-state related fields.
This function was introduced in Qt 4.4.
See also sslConfiguration(), setLocalCertificate(), setPrivateKey(), QSslConfiguration::setCaCertificates(), and QSslConfiguration::setCiphers().
Upstream PySide2 reference signatures (binding differences may apply):
setSslConfiguration(self, config: PySide2.QtNetwork.QSslConfiguration) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#setSslConfiguration
socketDescriptor
socketDescriptor() -> int
X.socketDescriptor() -> int
socketOption
socketOption(option: Any) -> Any
X.socketOption(option) -> object
Supplemental documentation: Qt 5 reference:
[override virtual] QVariant QSslSocket::socketOption(QAbstractSocket::SocketOption option)
Reimplements: QAbstractSocket::socketOption(QAbstractSocket::SocketOption option).
Returns the value of the option option.
This function was introduced in Qt 4.6.
See also setSocketOption().
Upstream PySide2 reference signatures (binding differences may apply):
socketOption(self, option: PySide2.QtNetwork.QAbstractSocket.SocketOption) -> typing.Any
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#socketOption
socketType
socketType() -> Any
X.socketType()
sslConfiguration
sslConfiguration() -> Any
X.sslConfiguration() -> PythonQt.QtNetwork.QSslConfiguration
Supplemental documentation: Qt 5 reference:
QSslConfiguration QSslSocket::sslConfiguration() const
Returns the socket's SSL configuration state. The default SSL configuration of a socket is to use the default ciphers, default CA certificates, no local private key or certificate.
The SSL configuration also contains fields that can change with time without notice.
This function was introduced in Qt 4.4.
See also setSslConfiguration(), localCertificate(), peerCertificate(), peerCertificateChain(), sessionCipher(), privateKey(), QSslConfiguration::ciphers(), and QSslConfiguration::caCertificates().
Upstream PySide2 reference signatures (binding differences may apply):
sslConfiguration(self) -> PySide2.QtNetwork.QSslConfiguration
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslConfiguration
sslErrors
sslErrors() -> tuple
X.sslErrors() -> tuple
Supplemental documentation: Qt 5 reference:
[signal] void QSslSocket::sslErrors(const QList\<QSslError> \&errors)
QSslSocket emits this signal after the SSL handshake to indicate that one or more errors have occurred while establishing the identity of the peer. The errors are usually an indication that QSslSocket is unable to securely identify the peer. Unless any action is taken, the connection will be dropped after this signal has been emitted.
If you want to continue connecting despite the errors that have occurred, you must call QSslSocket::ignoreSslErrors() from inside a slot connected to this signal. If you need to access the error list at a later point, you can call sslHandshakeErrors().
errors contains one or more errors that prevent QSslSocket from verifying the identity of the peer.
Note: You cannot use Qt::QueuedConnection when connecting to this signal, or calling QSslSocket::ignoreSslErrors() will have no effect.
Note: Signal sslErrors is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:
connect(sslSocket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
[=](const QList<QSslError> &errors){ /* ... */ });
See also peerVerifyError().
Upstream PySide2 reference signatures (binding differences may apply):
sslErrors(self) -> typing.List[PySide2.QtNetwork.QSslError]
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslErrors
sslLibraryBuildVersionNumber
sslLibraryBuildVersionNumber() -> int
X.sslLibraryBuildVersionNumber() -> int
Supplemental documentation: Qt 5 reference:
[static] long QSslSocket::sslLibraryBuildVersionNumber()
Returns the version number of the SSL library in use at compile time. If no SSL support is available then this will return an undefined value.
This function was introduced in Qt 5.4.
See also sslLibraryVersionNumber().
Upstream PySide2 reference signatures (binding differences may apply):
sslLibraryBuildVersionNumber() -> int
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslLibraryBuildVersionNumber
sslLibraryBuildVersionString
sslLibraryBuildVersionString() -> str
X.sslLibraryBuildVersionString() -> str
Supplemental documentation: Qt 5 reference:
[static] QString QSslSocket::sslLibraryBuildVersionString()
Returns the version string of the SSL library in use at compile time. If no SSL support is available then this will return an empty value.
This function was introduced in Qt 5.4.
See also sslLibraryVersionString().
Upstream PySide2 reference signatures (binding differences may apply):
sslLibraryBuildVersionString() -> str
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslLibraryBuildVersionString
sslLibraryVersionNumber
sslLibraryVersionNumber() -> int
X.sslLibraryVersionNumber() -> int
Supplemental documentation: Qt 5 reference:
[static] long QSslSocket::sslLibraryVersionNumber()
Returns the version number of the SSL library in use. Note that this is the version of the library in use at run-time not compile time. If no SSL support is available then this will return an undefined value.
This function was introduced in Qt 5.0.
Upstream PySide2 reference signatures (binding differences may apply):
sslLibraryVersionNumber() -> int
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslLibraryVersionNumber
sslLibraryVersionString
sslLibraryVersionString() -> str
X.sslLibraryVersionString() -> str
Supplemental documentation: Qt 5 reference:
[static] QString QSslSocket::sslLibraryVersionString()
Returns the version string of the SSL library in use. Note that this is the version of the library in use at run-time not compile time. If no SSL support is available then this will return an empty value.
This function was introduced in Qt 5.0.
Upstream PySide2 reference signatures (binding differences may apply):
sslLibraryVersionString() -> str
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#sslLibraryVersionString
startClientEncryption
startClientEncryption() -> None
X.startClientEncryption()
Supplemental documentation: Qt 5 reference:
[slot] void QSslSocket::startClientEncryption()
Starts a delayed SSL handshake for a client connection. This function can be called when the socket is in the ConnectedState but still in the UnencryptedMode. If it is not yet connected, or if it is already encrypted, this function has no effect.
Clients that implement STARTTLS functionality often make use of delayed SSL handshakes. Most other clients can avoid calling this function directly by using connectToHostEncrypted() instead, which automatically performs the handshake.
See also connectToHostEncrypted() and startServerEncryption().
Upstream PySide2 reference signatures (binding differences may apply):
startClientEncryption(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#startClientEncryption
startServerEncryption
startServerEncryption() -> None
X.startServerEncryption()
Supplemental documentation: Qt 5 reference:
[slot] void QSslSocket::startServerEncryption()
Starts a delayed SSL handshake for a server connection. This function can be called when the socket is in the ConnectedState but still in UnencryptedMode. If it is not connected or it is already encrypted, the function has no effect.
For server sockets, calling this function is the only way to initiate the SSL handshake. Most servers will call this function immediately upon receiving a connection, or as a result of having received a protocol-specific command to enter SSL mode (e.g, the server may respond to receiving the string "STARTTLS\r\n" by calling this function).
The most common way to implement an SSL server is to create a subclass of QTcpServer and reimplement QTcpServer::incomingConnection(). The returned socket descriptor is then passed to QSslSocket::setSocketDescriptor().
See also connectToHostEncrypted() and startClientEncryption().
Upstream PySide2 reference signatures (binding differences may apply):
startServerEncryption(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#startServerEncryption
state
state() -> Any
X.state()
stateChanged
stateChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtNetwork.QSslSocket.stateChanged; argument details are not documented.
supportedCiphers
supportedCiphers() -> tuple
X.supportedCiphers() -> tuple
Upstream PySide2 reference signatures (binding differences may apply):
supportedCiphers() -> typing.List[PySide2.QtNetwork.QSslCipher]
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#supportedCiphers
supportsSsl
supportsSsl() -> bool
X.supportsSsl() -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QSslSocket::supportsSsl()
Returns true if this platform supports SSL; otherwise, returns false. If the platform
doesn't support SSL, the socket will fail in the connection phase.
Upstream PySide2 reference signatures (binding differences may apply):
supportsSsl() -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#supportsSsl
systemCaCertificates
systemCaCertificates() -> tuple
X.systemCaCertificates() -> tuple
Upstream PySide2 reference signatures (binding differences may apply):
systemCaCertificates() -> typing.List[PySide2.QtNetwork.QSslCertificate]
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#systemCaCertificates
waitForBytesWritten
waitForBytesWritten(msecs: int) -> bool
X.waitForBytesWritten(msecs) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QSslSocket::waitForBytesWritten(int msecs \= 30000)
Reimplements: QAbstractSocket::waitForBytesWritten(int msecs).
Upstream PySide2 reference signatures (binding differences may apply):
waitForBytesWritten(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#waitForBytesWritten
waitForConnected
waitForConnected(msecs: int) -> bool
X.waitForConnected(msecs) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QSslSocket::waitForConnected(int msecs \= 30000)
Reimplements: QAbstractSocket::waitForConnected(int msecs).
Waits until the socket is connected, or msecs milliseconds, whichever happens first.
If the connection has been established, this function returns true; otherwise it
returns false.
See also QAbstractSocket::waitForConnected().
Upstream PySide2 reference signatures (binding differences may apply):
waitForConnected(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#waitForConnected
waitForDisconnected
waitForDisconnected(msecs: int) -> bool
X.waitForDisconnected(msecs) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QSslSocket::waitForDisconnected(int msecs \= 30000)
Reimplements: QAbstractSocket::waitForDisconnected(int msecs).
Waits until the socket has disconnected or msecs milliseconds, whichever comes first.
If the connection has been disconnected, this function returns true; otherwise it
returns false.
See also QAbstractSocket::waitForDisconnected().
Upstream PySide2 reference signatures (binding differences may apply):
waitForDisconnected(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#waitForDisconnected
waitForEncrypted
waitForEncrypted(msecs: int) -> bool
X.waitForEncrypted(msecs) -> bool
Supplemental documentation: Qt 5 reference:
bool QSslSocket::waitForEncrypted(int msecs \= 30000)
Waits until the socket has completed the SSL handshake and has emitted encrypted(), or msecs milliseconds, whichever comes first. If encrypted() has been emitted, this function returns true; otherwise (e.g., the socket is disconnected, or the SSL handshake fails), false is returned.
The following example waits up to one second for the socket to be encrypted:
socket->connectToHostEncrypted("imap", 993);
if (socket->waitForEncrypted(1000))
qDebug("Encrypted!");
If msecs is -1, this function will not time out.
See also startClientEncryption(), startServerEncryption(), encrypted(), and isEncrypted().
Upstream PySide2 reference signatures (binding differences may apply):
waitForEncrypted(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#waitForEncrypted
waitForReadyRead
waitForReadyRead(msecs: int) -> bool
X.waitForReadyRead(msecs) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QSslSocket::waitForReadyRead(int msecs \= 30000)
Reimplements: QAbstractSocket::waitForReadyRead(int msecs).
Upstream PySide2 reference signatures (binding differences may apply):
waitForReadyRead(self, msecs: int=...) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#waitForReadyRead
writeData
writeData(data: str, len: int) -> int
X.writeData(data, len) -> int
Supplemental documentation: Qt 5 reference:
[override virtual protected] qint64 QSslSocket::writeData(const char *data, qint64 len)
Reimplements: QAbstractSocket::writeData(const char *data, qint64 size).
Upstream PySide2 reference signatures (binding differences may apply):
writeData(self, data: str, len: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qsslsocket.html#writeData