![]() |
Qt 6.x
The Qt SDK
|
#include <qtls_openssl_p.h>
Public Types | |
enum | ExDataOffset { errorOffsetInExData = 1 , socketOffsetInExData = 2 } |
Public Attributes | |
QSslSocket * | q = nullptr |
QSslSocketPrivate * | d = nullptr |
QByteArray | ocspResponseDer |
Definition at line 36 of file qtls_openssl_p.h.
Enumerator | |
---|---|
errorOffsetInExData | |
socketOffsetInExData |
Definition at line 39 of file qtls_openssl_p.h.
QTlsPrivate::TlsCryptographOpenSSL::~TlsCryptographOpenSSL | ( | ) |
Definition at line 474 of file qtls_openssl.cpp.
void QTlsPrivate::TlsCryptographOpenSSL::alertMessageReceived | ( | int | encoded | ) |
Definition at line 1292 of file qtls_openssl.cpp.
void QTlsPrivate::TlsCryptographOpenSSL::alertMessageSent | ( | int | encoded | ) |
Definition at line 1277 of file qtls_openssl.cpp.
References d, emit, QSsl::Fatal, and Q_ASSERT.
|
override |
Definition at line 749 of file qtls_openssl.cpp.
|
override |
Definition at line 496 of file qtls_openssl.cpp.
bool QTlsPrivate::TlsCryptographOpenSSL::checkSslErrors | ( | ) |
Definition at line 1190 of file qtls_openssl.cpp.
References QSslSocket::AutoVerifyPeer, QList< T >::constFirst(), d, emit, QSslError::errorString(), QList< T >::isEmpty(), QAbstractSocket::PauseOnSslErrors, QSslSocketPrivate::pauseSocketNotifiers(), QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, QSslSocketPrivate::setPaused(), QSslSocket::SslClientMode, QAbstractSocket::SslHandshakeFailedError, QSslSocketPrivate::tlsMode(), QSslSocketPrivate::verifyErrorsHaveBeenIgnored(), and QSslSocket::VerifyPeer.
Referenced by startHandshake().
|
override |
Definition at line 755 of file qtls_openssl.cpp.
References QIODeviceBase::Append, QByteArray::append(), QFileDevice::close(), d, QByteArray::data(), emit, file, QSslSocketPrivate::isAutoStartingHandshake(), QSslSocketPrivate::isPendingClose(), QSslSocketPrivate::maxReadBufferSize(), QSslConfiguration::NextProtocolNegotiationNegotiated, QSslConfiguration::NextProtocolNegotiationUnsupported, QFile::open(), QSslSocketPrivate::plainTcpSocket(), QSsl::PublicKey, Q_ASSERT, q_SSL_get0_alpn_selected(), q_SSL_get0_next_proto_negotiated(), q_SSL_get_client_random(), q_SSL_get_server_tmp_key, q_SSL_get_session(), q_SSL_SESSION_get_master_key(), q_SSL_session_reused(), QByteArrayLiteral, qCWarning, QSslSocketPrivate::setEncrypted(), QSslSocketPrivate::setPendingClose(), QByteArray::size(), QSslSocket::SslClientMode, QSsl::SslOptionDisableSessionPersistence, QSsl::SslOptionDisableSessionSharing, QDir::tempPath(), QSslSocketPrivate::tlsMode(), QByteArray::toHex(), QByteArray::toUpper(), Qt::Uninitialized, and QIODevice::write().
Referenced by startHandshake().
|
override |
Definition at line 1132 of file qtls_openssl.cpp.
References d, QSslSocketPrivate::maxReadBufferSize(), QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, QSslSocketPrivate::setEncrypted(), QSslSocketPrivate::setMaxReadBufferSize(), and transmit().
|
override |
Definition at line 1114 of file qtls_openssl.cpp.
References QTlsBackendOpenSSL::clearErrorQueue(), d, QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, q_SSL_in_init(), q_SSL_shutdown(), and transmit().
int QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback | ( | X509_STORE_CTX * | ctx | ) |
Definition at line 1299 of file qtls_openssl.cpp.
References QList< T >::append(), QTlsPrivate::X509CertificateOpenSSL::certificateFromX509(), emit, QTlsPrivate::X509CertificateOpenSSL::errorEntryFromStoreContext(), errorOffsetInExData, QTlsPrivate::X509CertificateOpenSSL::openSSLErrorToQSslError(), Q_ASSERT, q_SSL_get_ex_data(), q_X509_STORE_CTX_get_current_cert(), qCWarning, and QTlsBackendOpenSSL::s_indexForSSLExtraData.
|
override |
Definition at line 744 of file qtls_openssl.cpp.
int QTlsPrivate::TlsCryptographOpenSSL::handleNewSessionTicket | ( | SSL * | connection | ) |
Definition at line 1222 of file qtls_openssl.cpp.
References connection, d, QByteArray::data(), emit, Q_ASSERT, q_i2d_SSL_SESSION(), q_SSL_get_session(), q_SSL_SESSION_get_ticket_lifetime_hint(), q_SSL_version(), qCDebug, qCWarning, and QSsl::SslOptionDisableSessionPersistence.
|
override |
Definition at line 479 of file qtls_openssl.cpp.
References QByteArray::clear(), QList< T >::clear(), d, ocspResponseDer, and Q_ASSERT.
bool QTlsPrivate::TlsCryptographOpenSSL::isInSslRead | ( | ) | const |
Definition at line 1760 of file qtls_openssl.cpp.
|
override |
Definition at line 1185 of file qtls_openssl.cpp.
unsigned QTlsPrivate::TlsCryptographOpenSSL::pskClientTlsCallback | ( | const char * | hint, |
char * | identity, | ||
unsigned | max_identity_len, | ||
unsigned char * | psk, | ||
unsigned | max_psk_len | ||
) |
Definition at line 1711 of file qtls_openssl.cpp.
References QByteArray::constData(), emit, hint(), QSslPreSharedKeyAuthenticator::identity(), QByteArray::isEmpty(), QSslPreSharedKeyAuthenticator::maximumIdentityLength(), QSslPreSharedKeyAuthenticator::maximumPreSharedKeyLength(), QSslPreSharedKeyAuthenticator::preSharedKey(), Q_ASSERT, qMin(), QTlsBackend::setupClientPskAuth(), and QByteArray::size().
Referenced by QTlsPrivate::q_ssl_psk_client_callback().
unsigned QTlsPrivate::TlsCryptographOpenSSL::pskServerTlsCallback | ( | const char * | identity, |
unsigned char * | psk, | ||
unsigned | max_psk_len | ||
) |
Definition at line 1738 of file qtls_openssl.cpp.
References QByteArray::constData(), emit, QByteArray::isEmpty(), QSslPreSharedKeyAuthenticator::maximumPreSharedKeyLength(), QSslPreSharedKeyAuthenticator::preSharedKey(), Q_ASSERT, qMin(), QTlsBackend::setupServerPskAuth(), and QByteArray::size().
|
override |
Definition at line 1153 of file qtls_openssl.cpp.
References q_SSL_get_current_cipher(), QTlsBackendOpenSSL::qt_OpenSSL_cipher_to_QSslCipher(), and sessionCipher().
Referenced by sessionCipher().
|
override |
Definition at line 1162 of file qtls_openssl.cpp.
References q_SSL_version(), QT_WARNING_DISABLE_DEPRECATED, QT_WARNING_POP, QT_WARNING_PUSH, QSsl::TlsV1_2, QSsl::TlsV1_3, and QSsl::UnknownProtocol.
void QTlsPrivate::TlsCryptographOpenSSL::setRenegotiated | ( | bool | renegotiated | ) |
Definition at line 1765 of file qtls_openssl.cpp.
|
override |
Definition at line 502 of file qtls_openssl.cpp.
|
override |
Definition at line 512 of file qtls_openssl.cpp.
References arg, d, QTlsBackendOpenSSL::getErrorsFromOpenSsl(), Q_ASSERT, QAbstractSocket::SslInternalError, startHandshake(), and transmit().
bool QTlsPrivate::TlsCryptographOpenSSL::startHandshake | ( | ) |
Definition at line 542 of file qtls_openssl.cpp.
References QSslSocket::AutoVerifyPeer, cert, QSslError::CertificateBlacklisted, checkSslErrors(), QList< T >::clear(), QAbstractSocket::ConnectedState, continueHandshake(), d, emit, error, errorOffsetInExData, QSslError::HostNameMismatch, QSslCertificatePrivate::isBlacklisted(), QList< T >::isEmpty(), QSslCertificate::isNull(), QSslSocketPrivate::isRootsOnDemandAllowed(), QTlsBackendOpenSSL::msgErrorsDuringHandshake(), QSslError::NoPeerCertificate, QTlsPrivate::X509CertificateOpenSSL::openSSLErrorToQSslError(), Q_ASSERT, q_SSL_accept(), q_SSL_connect(), q_SSL_get_error(), q_SSL_set_ex_data(), q_SSL_set_info_callback(), qCDebug, QTlsPrivate::qt_AlertInfoCallback(), QList< T >::reserve(), QSslSocketPrivate::rootCertOnDemandLoadingSupported(), QTlsBackendOpenSSL::s_indexForSSLExtraData, QList< T >::size(), socketOffsetInExData, QSslSocket::SslClientMode, QAbstractSocket::SslHandshakeFailedError, storePeerCertificates(), QSslSocketPrivate::tlsMode(), trySendFatalAlert(), QSslSocketPrivate::verificationName(), QSslSocketPrivate::verifyErrorsHaveBeenIgnored(), and QSslSocket::VerifyPeer.
Referenced by startClientEncryption(), startServerEncryption(), and transmit().
|
override |
Definition at line 527 of file qtls_openssl.cpp.
References arg, d, QTlsBackendOpenSSL::getErrorsFromOpenSsl(), Q_ASSERT, QAbstractSocket::SslInternalError, startHandshake(), and transmit().
void QTlsPrivate::TlsCryptographOpenSSL::storePeerCertificates | ( | ) |
Definition at line 1508 of file qtls_openssl.cpp.
References QTlsPrivate::X509CertificateOpenSSL::certificateFromX509(), d, Q_ASSERT, q_SSL_get_peer_certificate(), q_X509_free(), QSslSocket::SslServerMode, QTlsPrivate::X509CertificateOpenSSL::stackOfX509ToQSslCertificates(), and QSslSocketPrivate::tlsMode().
Referenced by startHandshake().
Definition at line 507 of file qtls_openssl.cpp.
|
override |
Definition at line 861 of file qtls_openssl.cpp.
References arg, QTlsPrivate::X509CertificateOpenSSL::certificateFromX509(), QAbstractSocket::ConnectedState, d, emit, error, QIODevicePrivate::errorString, QTlsBackendOpenSSL::getErrorsFromOpenSsl(), QSslSocketPrivate::isPaused(), QSslSocketPrivate::maxReadBufferSize(), QIODeviceBase::NotOpen, QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, q_BIO_pending, q_BIO_read(), q_BIO_write(), q_SSL_get_error(), q_SSL_get_peer_certificate(), q_SSL_read(), q_SSL_write(), qCDebug, QSslSocketPrivate::readyReadPointer(), QAbstractSocket::RemoteHostClosedError, QSslSocketPrivate::setEncrypted(), QAbstractSocket::SslInternalError, startHandshake(), QSslSocketPrivate::tlsBuffer(), QSslSocketPrivate::tlsEmittedBytesWritten(), and QSslSocketPrivate::tlsWriteBuffer().
Referenced by disconnected(), disconnectFromHost(), startClientEncryption(), and startServerEncryption().
void QTlsPrivate::TlsCryptographOpenSSL::trySendFatalAlert | ( | ) |
Definition at line 1339 of file qtls_openssl.cpp.
References d, QIODeviceBase::NotOpen, QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, q_BIO_pending, and q_BIO_read().
Referenced by startHandshake().
QSslSocketPrivate* QTlsPrivate::TlsCryptographOpenSSL::d = nullptr |
Definition at line 79 of file qtls_openssl_p.h.
Referenced by alertMessageSent(), checkSslErrors(), continueHandshake(), disconnected(), disconnectFromHost(), handleNewSessionTicket(), init(), startClientEncryption(), startHandshake(), startServerEncryption(), storePeerCertificates(), transmit(), and trySendFatalAlert().
QByteArray QTlsPrivate::TlsCryptographOpenSSL::ocspResponseDer |
Definition at line 96 of file qtls_openssl_p.h.
Referenced by init().
QSslSocket* QTlsPrivate::TlsCryptographOpenSSL::q = nullptr |
Definition at line 78 of file qtls_openssl_p.h.