Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTlsPrivate::TlsCryptographOpenSSL Class Reference

#include <qtls_openssl_p.h>

+ Inheritance diagram for QTlsPrivate::TlsCryptographOpenSSL:
+ Collaboration diagram for QTlsPrivate::TlsCryptographOpenSSL:

Public Types

enum  ExDataOffset { errorOffsetInExData = 1 , socketOffsetInExData = 2 }
 

Public Member Functions

 ~TlsCryptographOpenSSL ()
 
void init (QSslSocket *qObj, QSslSocketPrivate *dObj) override
 
void checkSettingSslContext (std::shared_ptr< QSslContext > tlsContext) override
 
std::shared_ptr< QSslContextsslContext () const override
 
QList< QSslErrortlsErrors () const override
 
void startClientEncryption () override
 
void startServerEncryption () override
 
bool startHandshake ()
 
void enableHandshakeContinuation () override
 
void cancelCAFetch () override
 
void continueHandshake () override
 
void transmit () override
 
void disconnectFromHost () override
 
void disconnected () override
 
QSslCipher sessionCipher () const override
 
QSsl::SslProtocol sessionProtocol () const override
 
QList< QOcspResponseocsps () const override
 
bool checkSslErrors ()
 
int handleNewSessionTicket (SSL *connection)
 
void alertMessageSent (int encoded)
 
void alertMessageReceived (int encoded)
 
int emitErrorFromCallback (X509_STORE_CTX *ctx)
 
void trySendFatalAlert ()
 
void storePeerCertificates ()
 
unsigned pskClientTlsCallback (const char *hint, char *identity, unsigned max_identity_len, unsigned char *psk, unsigned max_psk_len)
 
unsigned pskServerTlsCallback (const char *identity, unsigned char *psk, unsigned max_psk_len)
 
bool isInSslRead () const
 
void setRenegotiated (bool renegotiated)
 

Public Attributes

QSslSocketq = nullptr
 
QSslSocketPrivated = nullptr
 
QByteArray ocspResponseDer
 

Detailed Description

Definition at line 36 of file qtls_openssl_p.h.

Member Enumeration Documentation

◆ ExDataOffset

Enumerator
errorOffsetInExData 
socketOffsetInExData 

Definition at line 39 of file qtls_openssl_p.h.

Constructor & Destructor Documentation

◆ ~TlsCryptographOpenSSL()

QTlsPrivate::TlsCryptographOpenSSL::~TlsCryptographOpenSSL ( )

Definition at line 474 of file qtls_openssl.cpp.

Member Function Documentation

◆ alertMessageReceived()

void QTlsPrivate::TlsCryptographOpenSSL::alertMessageReceived ( int encoded)

Definition at line 1292 of file qtls_openssl.cpp.

References emit, and Q_ASSERT.

◆ alertMessageSent()

void QTlsPrivate::TlsCryptographOpenSSL::alertMessageSent ( int encoded)

Definition at line 1277 of file qtls_openssl.cpp.

References d, emit, QSsl::Fatal, and Q_ASSERT.

◆ cancelCAFetch()

void QTlsPrivate::TlsCryptographOpenSSL::cancelCAFetch ( )
override

Definition at line 749 of file qtls_openssl.cpp.

◆ checkSettingSslContext()

void QTlsPrivate::TlsCryptographOpenSSL::checkSettingSslContext ( std::shared_ptr< QSslContext > tlsContext)
override

Definition at line 496 of file qtls_openssl.cpp.

◆ checkSslErrors()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ continueHandshake()

◆ disconnected()

void QTlsPrivate::TlsCryptographOpenSSL::disconnected ( )
override

Definition at line 1132 of file qtls_openssl.cpp.

References d, QSslSocketPrivate::maxReadBufferSize(), QSslSocketPrivate::plainTcpSocket(), Q_ASSERT, QSslSocketPrivate::setEncrypted(), QSslSocketPrivate::setMaxReadBufferSize(), and transmit().

+ Here is the call graph for this function:

◆ disconnectFromHost()

void QTlsPrivate::TlsCryptographOpenSSL::disconnectFromHost ( )
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().

+ Here is the call graph for this function:

◆ emitErrorFromCallback()

int QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback ( X509_STORE_CTX * ctx)

◆ enableHandshakeContinuation()

void QTlsPrivate::TlsCryptographOpenSSL::enableHandshakeContinuation ( )
override

Definition at line 744 of file qtls_openssl.cpp.

◆ handleNewSessionTicket()

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.

+ Here is the call graph for this function:

◆ init()

void QTlsPrivate::TlsCryptographOpenSSL::init ( QSslSocket * qObj,
QSslSocketPrivate * dObj )
override

Definition at line 479 of file qtls_openssl.cpp.

References QByteArray::clear(), QList< T >::clear(), d, ocspResponseDer, and Q_ASSERT.

+ Here is the call graph for this function:

◆ isInSslRead()

bool QTlsPrivate::TlsCryptographOpenSSL::isInSslRead ( ) const

Definition at line 1760 of file qtls_openssl.cpp.

◆ ocsps()

QList< QOcspResponse > QTlsPrivate::TlsCryptographOpenSSL::ocsps ( ) const
override

Definition at line 1185 of file qtls_openssl.cpp.

◆ pskClientTlsCallback()

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 emit, hint(), QSslPreSharedKeyAuthenticator::identity(), QSslPreSharedKeyAuthenticator::maximumIdentityLength(), QSslPreSharedKeyAuthenticator::maximumPreSharedKeyLength(), QSslPreSharedKeyAuthenticator::preSharedKey(), Q_ASSERT, qMin(), and QTlsBackend::setupClientPskAuth().

Referenced by QTlsPrivate::q_ssl_psk_client_callback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pskServerTlsCallback()

unsigned QTlsPrivate::TlsCryptographOpenSSL::pskServerTlsCallback ( const char * identity,
unsigned char * psk,
unsigned max_psk_len )

Definition at line 1738 of file qtls_openssl.cpp.

References emit, QSslPreSharedKeyAuthenticator::maximumPreSharedKeyLength(), QSslPreSharedKeyAuthenticator::preSharedKey(), Q_ASSERT, qMin(), and QTlsBackend::setupServerPskAuth().

+ Here is the call graph for this function:

◆ sessionCipher()

QSslCipher QTlsPrivate::TlsCryptographOpenSSL::sessionCipher ( ) const
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sessionProtocol()

QSsl::SslProtocol QTlsPrivate::TlsCryptographOpenSSL::sessionProtocol ( ) const
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.

+ Here is the call graph for this function:

◆ setRenegotiated()

void QTlsPrivate::TlsCryptographOpenSSL::setRenegotiated ( bool renegotiated)

Definition at line 1765 of file qtls_openssl.cpp.

◆ sslContext()

std::shared_ptr< QSslContext > QTlsPrivate::TlsCryptographOpenSSL::sslContext ( ) const
override

Definition at line 502 of file qtls_openssl.cpp.

◆ startClientEncryption()

void QTlsPrivate::TlsCryptographOpenSSL::startClientEncryption ( )
override

Definition at line 512 of file qtls_openssl.cpp.

References arg, d, QTlsBackendOpenSSL::getErrorsFromOpenSsl(), Q_ASSERT, QAbstractSocket::SslInternalError, startHandshake(), and transmit().

+ Here is the call graph for this function:

◆ startHandshake()

bool QTlsPrivate::TlsCryptographOpenSSL::startHandshake ( )

◆ startServerEncryption()

void QTlsPrivate::TlsCryptographOpenSSL::startServerEncryption ( )
override

Definition at line 527 of file qtls_openssl.cpp.

References arg, d, QTlsBackendOpenSSL::getErrorsFromOpenSsl(), Q_ASSERT, QAbstractSocket::SslInternalError, startHandshake(), and transmit().

+ Here is the call graph for this function:

◆ storePeerCertificates()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tlsErrors()

QList< QSslError > QTlsPrivate::TlsCryptographOpenSSL::tlsErrors ( ) const
override

Definition at line 507 of file qtls_openssl.cpp.

◆ transmit()

◆ trySendFatalAlert()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ d

◆ ocspResponseDer

QByteArray QTlsPrivate::TlsCryptographOpenSSL::ocspResponseDer

Definition at line 96 of file qtls_openssl_p.h.

Referenced by init().

◆ q

QSslSocket* QTlsPrivate::TlsCryptographOpenSSL::q = nullptr

Definition at line 78 of file qtls_openssl_p.h.


The documentation for this class was generated from the following files: