Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QTlsPrivate Namespace Reference

Namespace containing onternal types that TLS backends implement. More...

Classes

class  QSecureTransportContext
struct  SchannelCipherInfo
class  TlsCryptographOpenSSL
class  TlsCryptographSchannel
class  TlsCryptographSecureTransport
class  TlsKey
 TlsKey is an abstract class, that allows a TLS plugin to provide an underlying implementation for the class QSslKey. More...
class  TlsKeyBase
class  TlsKeyGeneric
class  TlsKeyOpenSSL
class  TlsKeySchannel
class  TlsKeySecureTransport
class  X509Certificate
 X509Certificate is an abstract class that allows a TLS backend to provide an implementation of the QSslCertificate class. More...
class  X509CertificateBase
class  X509CertificateGeneric
class  X509CertificateOpenSSL
class  X509CertificateSchannel
class  X509CertificateSecureTransport

Typedefs

using X509ChainVerifyPtr
using X509PemReaderPtr = QList<QSslCertificate> (*)(const QByteArray &pem, int count)
using X509DerReaderPtr = X509PemReaderPtr
using X509Pkcs12ReaderPtr

Enumerations

enum class  Cipher {
  DesCbc , DesEde3Cbc , Rc2Cbc , Aes128Cbc ,
  Aes192Cbc , Aes256Cbc
}

Functions

int qt_X509Callback (int ok, X509_STORE_CTX *ctx)
int q_X509Callback (int ok, X509_STORE_CTX *ctx)
int q_X509CallbackDirect (int ok, X509_STORE_CTX *ctx)
QList< QByteArrayfetchSslCertificateData ()
static unsigned q_ssl_psk_client_callback (SSL *ssl, const char *hint, char *identity, unsigned max_identity_len, unsigned char *psk, unsigned max_psk_len)
static unsigned int q_ssl_psk_server_callback (SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len)
void qt_AlertInfoCallback (const SSL *connection, int from, int value)
QList< QSslCertificatesystemCaCertificates ()
QByteArray doCrypt (QSslKeyPrivate::Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv, bool enc)
QList< QSslCipherdefaultCiphers ()
QT_WARNING_POP const SchannelCipherInfocipherInfoByOpenSslName (const QString &name)
QList< CRYPTO_SETTINGS > cryptoSettingsForCiphers (const QList< QSslCipher > &ciphers)
QList< QSslCipherciphersByName (QStringView schannelSuiteName)
bool containsTls13Cipher (const QList< QSslCipher > &ciphers)
static void attachPrivateKeyToCertificate (const QSslCertificate &certificate, const QSslKey &privateKey)
QSslCipher QSslCipher_from_SSLCipherSuite (SSLCipherSuite cipher)
SSLContextRef qt_createSecureTransportContext (QSslSocket::SslMode mode)
 Q_GLOBAL_STATIC_WITH_ARGS (OidLengthMap, oidLengthMap,(createOidMap())) namespace

Variables

QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED std::array< SchannelCipherInfo, 44 > schannelCipherInfo
UNICODE_STRING cbcChainingMode
UNICODE_STRING gcmChainingMode
static const uint8_t dhparam []

Detailed Description

Namespace containing onternal types that TLS backends implement.

(Network-private)

This namespace is private to Qt and the backends that implement its TLS support.

Typedef Documentation

◆ X509ChainVerifyPtr

Initial value:
const QString &hostName)
Definition qlist.h:80

Definition at line 147 of file qtlsbackend_p.h.

◆ X509DerReaderPtr

◆ X509PemReaderPtr

Definition at line 149 of file qtlsbackend_p.h.

◆ X509Pkcs12ReaderPtr

Initial value:
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase)
IOBluetoothDevice * device
\inmodule QtCore
Definition qbytearray.h:58
\inmodule QtCore \reentrant
Definition qiodevice.h:38
The QSslCertificate class provides a convenient API for an X509 certificate.
The QSslKey class provides an interface for private and public keys.
Definition qsslkey.h:24
GLuint64 key
QList< QSslCertificate > cert
[0]

Definition at line 151 of file qtlsbackend_p.h.

Enumeration Type Documentation

◆ Cipher

enum class QTlsPrivate::Cipher
strong
Enumerator
DesCbc 
DesEde3Cbc 
Rc2Cbc 
Aes128Cbc 
Aes192Cbc 
Aes256Cbc 

Definition at line 30 of file qssl_p.h.

Function Documentation

◆ attachPrivateKeyToCertificate()

void QTlsPrivate::attachPrivateKeyToCertificate ( const QSslCertificate & certificate,
const QSslKey & privateKey )
static

Definition at line 2253 of file qtls_schannel.cpp.

◆ cipherInfoByOpenSslName()

QT_WARNING_POP const SchannelCipherInfo * QTlsPrivate::cipherInfoByOpenSslName ( const QString & name)

Definition at line 210 of file qtls_schannel.cpp.

◆ ciphersByName()

QList< QSslCipher > QTlsPrivate::ciphersByName ( QStringView schannelSuiteName)

Definition at line 398 of file qtls_schannel.cpp.

◆ containsTls13Cipher()

bool QTlsPrivate::containsTls13Cipher ( const QList< QSslCipher > & ciphers)

Definition at line 462 of file qtls_schannel.cpp.

◆ cryptoSettingsForCiphers()

QList< CRYPTO_SETTINGS > QTlsPrivate::cryptoSettingsForCiphers ( const QList< QSslCipher > & ciphers)

Determines which algorithms are not used by the requested ciphers to build up a black list that can be passed to SCH_CREDENTIALS.

Definition at line 236 of file qtls_schannel.cpp.

◆ defaultCiphers()

QList< QSslCipher > QTlsPrivate::defaultCiphers ( )

Definition at line 428 of file qtls_schannel.cpp.

◆ doCrypt()

QByteArray QTlsPrivate::doCrypt ( QSslKeyPrivate::Cipher cipher,
const QByteArray & data,
const QByteArray & key,
const QByteArray & iv,
bool enc )

Definition at line 449 of file qtlskey_openssl.cpp.

References QTlsBackendOpenSSL::logAndClearErrorQueue(), q_EVP_aes_128_cbc(), q_EVP_aes_192_cbc(), q_EVP_aes_256_cbc(), q_EVP_CIPHER_CTX_free(), q_EVP_CIPHER_CTX_new(), q_EVP_CIPHER_CTX_reset(), q_EVP_CipherFinal(), q_EVP_CipherInit(), q_EVP_CipherInit_ex(), q_EVP_des_cbc(), q_EVP_des_ede3_cbc(), and q_EVP_rc2_cbc().

Here is the call graph for this function:

◆ fetchSslCertificateData()

QList< QByteArray > QTlsPrivate::fetchSslCertificateData ( )

Definition at line 29 of file qsslsocket_openssl_android.cpp.

◆ Q_GLOBAL_STATIC_WITH_ARGS()

QTlsPrivate::Q_GLOBAL_STATIC_WITH_ARGS ( OidLengthMap ,
oidLengthMap ,
(createOidMap())  )

◆ q_ssl_psk_client_callback()

unsigned QTlsPrivate::q_ssl_psk_client_callback ( SSL * ssl,
const char * hint,
char * identity,
unsigned max_identity_len,
unsigned char * psk,
unsigned max_psk_len )
static

Definition at line 211 of file qtls_openssl.cpp.

References QTlsPrivate::TlsCryptographOpenSSL::pskClientTlsCallback(), q_SSL_get_ex_data(), and QTlsBackendOpenSSL::s_indexForSSLExtraData.

Here is the call graph for this function:

◆ q_ssl_psk_server_callback()

unsigned int QTlsPrivate::q_ssl_psk_server_callback ( SSL * ssl,
const char * identity,
unsigned char * psk,
unsigned int max_psk_len )
static

Definition at line 218 of file qtls_openssl.cpp.

References QTlsPrivate::TlsCryptographOpenSSL::pskServerTlsCallback(), q_SSL_get_ex_data(), and QTlsBackendOpenSSL::s_indexForSSLExtraData.

Here is the call graph for this function:

◆ q_X509Callback()

◆ q_X509CallbackDirect()

int QTlsPrivate::q_X509CallbackDirect ( int ok,
X509_STORE_CTX * ctx )

Definition at line 171 of file qtls_openssl.cpp.

References QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback(), q_SSL_get_ex_data(), q_SSL_get_ex_data_X509_STORE_CTX_idx(), q_X509_STORE_CTX_get_ex_data(), QTlsBackendOpenSSL::s_indexForSSLExtraData, and QTlsPrivate::TlsCryptographOpenSSL::socketOffsetInExData.

Here is the call graph for this function:

◆ QSslCipher_from_SSLCipherSuite()

QSslCipher QTlsPrivate::QSslCipher_from_SSLCipherSuite ( SSLCipherSuite cipher)

Definition at line 27 of file qtlsbackend_st.cpp.

◆ qt_AlertInfoCallback()

void QTlsPrivate::qt_AlertInfoCallback ( const SSL * connection,
int from,
int value )

Definition at line 326 of file qtls_openssl.cpp.

References QTlsPrivate::TlsCryptographOpenSSL::alertMessageReceived(), QTlsPrivate::TlsCryptographOpenSSL::alertMessageSent(), q_SSL_get_ex_data(), QTlsBackendOpenSSL::s_indexForSSLExtraData, and QTlsPrivate::TlsCryptographOpenSSL::socketOffsetInExData.

Referenced by QTlsPrivate::TlsCryptographOpenSSL::startHandshake().

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

◆ qt_createSecureTransportContext()

SSLContextRef QTlsPrivate::qt_createSecureTransportContext ( QSslSocket::SslMode mode)

Definition at line 167 of file qtls_st.cpp.

◆ qt_X509Callback()

int QTlsPrivate::qt_X509Callback ( int ok,
X509_STORE_CTX * ctx )

Definition at line 356 of file qx509_openssl.cpp.

References QTlsPrivate::X509CertificateOpenSSL::errorEntryFromStoreContext(), QTlsPrivate::TlsCryptographOpenSSL::errorOffsetInExData, q_SSL_get_ex_data(), q_SSL_get_ex_data_X509_STORE_CTX_idx(), q_X509_STORE_CTX_get0_store(), q_X509_STORE_CTX_get_ex_data(), q_X509_STORE_get_ex_data(), and QTlsBackendOpenSSL::s_indexForSSLExtraData.

Referenced by QTlsPrivate::X509CertificateOpenSSL::verify().

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

◆ systemCaCertificates()

QList< QSslCertificate > QTlsPrivate::systemCaCertificates ( )

Definition at line 359 of file qtlsbackend_openssl.cpp.

Variable Documentation

◆ cbcChainingMode

UNICODE_STRING QTlsPrivate::cbcChainingMode
Initial value:
= {
sizeof(BCRYPT_CHAIN_MODE_CBC) - 2,
sizeof(BCRYPT_CHAIN_MODE_CBC),
const_cast<PWSTR>(BCRYPT_CHAIN_MODE_CBC)
}

Definition at line 220 of file qtls_schannel.cpp.

◆ dhparam

const uint8_t QTlsPrivate::dhparam
static
Initial value:
=
"\x30\x82\x01\x08\x02\x82\x01\x01\x00\x97\xea\xd0\x46\xf7\xae\xa7\x76\x80"
"\x9c\x74\x56\x98\xd8\x56\x97\x2b\x20\x6c\x77\xe2\x82\xbb\xc8\x84\xbe\xe7"
"\x63\xaf\xcc\x30\xd0\x67\x97\x7d\x1b\xab\x59\x30\xa9\x13\x67\x21\xd7\xd4"
"\x0e\x46\xcf\xe5\x80\xdf\xc9\xb9\xba\x54\x9b\x46\x2f\x3b\x45\xfc\x2f\xaf"
"\xad\xc0\x17\x56\xdd\x52\x42\x57\x45\x70\x14\xe5\xbe\x67\xaa\xde\x69\x75"
"\x30\x0d\xf9\xa2\xc4\x63\x4d\x7a\x39\xef\x14\x62\x18\x33\x44\xa1\xf9\xc1"
"\x52\xd1\xb6\x72\x21\x98\xf8\xab\x16\x1b\x7b\x37\x65\xe3\xc5\x11\x00\xf6"
"\x36\x1f\xd8\x5f\xd8\x9f\x43\xa8\xce\x9d\xbf\x5e\xd6\x2d\xfa\x0a\xc2\x01"
"\x54\xc2\xd9\x81\x54\x55\xb5\x26\xf8\x88\x37\xf5\xfe\xe0\xef\x4a\x34\x81"
"\xdc\x5a\xb3\x71\x46\x27\xe3\xcd\x24\xf6\x1b\xf1\xe2\x0f\xc2\xa1\x39\x53"
"\x5b\xc5\x38\x46\x8e\x67\x4c\xd9\xdd\xe4\x37\x06\x03\x16\xf1\x1d\x7a\xba"
"\x2d\xc1\xe4\x03\x1a\x58\xe5\x29\x5a\x29\x06\x69\x61\x7a\xd8\xa9\x05\x9f"
"\xc1\xa2\x45\x9c\x17\xad\x52\x69\x33\xdc\x18\x8d\x15\xa6\x5e\xcd\x94\xf4"
"\x45\xbb\x9f\xc2\x7b\x85\x00\x61\xb0\x1a\xdc\x3c\x86\xaa\x9f\x5c\x04\xb3"
"\x90\x0b\x35\x64\xff\xd9\xe3\xac\xf2\xf2\xeb\x3a\x63\x02\x01\x02"

Definition at line 200 of file qtls_st.cpp.

◆ gcmChainingMode

UNICODE_STRING QTlsPrivate::gcmChainingMode
Initial value:
= {
sizeof(BCRYPT_CHAIN_MODE_GCM) - 2,
sizeof(BCRYPT_CHAIN_MODE_GCM),
const_cast<PWSTR>(BCRYPT_CHAIN_MODE_GCM)
}

Definition at line 226 of file qtls_schannel.cpp.

◆ schannelCipherInfo

QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED std::array< SchannelCipherInfo, 44 > QTlsPrivate::schannelCipherInfo

Definition at line 158 of file qtls_schannel.cpp.