Name Description Size Coverage
openssl_symbols.cpp Note to maintainer: ------------------- We load OpenSSL symbols dynamically. Because symbols are known to disappear, and signatures sometimes change, between releases, we need to be careful about how this is done. To ensure we don't end up dereferencing null function pointers, and continue running even if certain functions are missing, we define helper functions for each of the symbols we load from OpenSSL, all prefixed with "q_" (declared in qsslsocket_openssl_symbols_p.h). So instead of calling SSL_connect directly, we call q_SSL_connect, which is a function that checks if the actual SSL_connect fptr is null, and returns a failure if it is, or calls SSL_connect if it isn't. This requires a somewhat tedious process of declaring each function we want to call in OpenSSL thrice: once with the q_, in _p.h, once using the DEFINEFUNC macros below, and once in the function that actually resolves the symbols, below the DEFINEFUNC declarations below. There's one DEFINEFUNC macro declared for every number of arguments exposed by OpenSSL (feel free to extend when needed). The easiest thing to do is to find an existing entry that matches the arg count of the function you want to import, and do the same. The first macro arg is the function return type. The second is the verbatim name of the function/symbol. Then follows a list of N pairs of argument types with a variable name, and just the variable name (char *a, a, char *b, b, etc). Finally there's two arguments - a suitable return statement for the error case (for an int function, return 0 or return -1 is usually right). Then either just "return" or DUMMYARG, the latter being for void functions. Note: Take into account that these macros and declarations are processed at compile-time, and the result depends on the OpenSSL headers the compiling host has installed, but the symbols are resolved at run-time, possibly with a different version of OpenSSL. 30049 -
openssl_symbols_p.h 12732 -
qopcuakeypair.cpp ! \class QOpcUaKeyPair \inmodule QtOpcUa \since 5.14 \brief QOpcUaKeyPair handles private and public key pairs. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. It can generate, load and store keys for asymmetric encryption. Instances of this class have to be passed to functions which need a key. 4137 -
qopcuakeypair.h 1384 -
qopcuakeypair_openssl.cpp userData 5997 -
qopcuakeypair_p.h 1382 -
qopcuax509certificatesigningrequest.cpp ! \class QOpcUaX509CertificateSigningRequest \inmodule QtOpcUa \since 5.14 \brief QOpcUaX509CertificateSigningRequest create a certificate signing request. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. Before actually creating the singing request data, any extension needed for that specific request has to be added. Current supported extensions are SubjectAlternativeName, BasicConstrains, KeyUsage and ExtendedKeyUsage. \code // Generate key QOpcUaKeyPair key; key.generateRsaKey(QOpcUaKeyPair::RsaKeyStrength::Bits1024); QOpcUaX509CertificateSigningRequest csr; QOpcUaX509DistinguishedName dn; dn.setEntry(QOpcUaX509DistinguishedName::Type::CommonName, "QtOpcUaViewer"); dn.setEntry(QOpcUaX509DistinguishedName::Type::CountryName, "DE"); dn.setEntry(QOpcUaX509DistinguishedName::Type::LocalityName, "Berlin"); dn.setEntry(QOpcUaX509DistinguishedName::Type::StateOrProvinceName, "Berlin"); dn.setEntry(QOpcUaX509DistinguishedName::Type::OrganizationName, "The Qt Company"); csr.setSubject(dn); QOpcUaX509ExtensionSubjectAlternativeName *san = new QOpcUaX509ExtensionSubjectAlternativeName; san->addData(QOpcUaX509ExtensionSubjectAlternativeName::Type::DNS, "foo.com"); san->addData(QOpcUaX509ExtensionSubjectAlternativeName::Type::DNS, "foo.com"); san->addData(QOpcUaX509ExtensionSubjectAlternativeName::Type::URI, "urn:foo.com:The%20Qt%20Company:QtOpcUaViewer"); san->setCritical(true); csr.addExtension(san); QOpcUaX509ExtensionBasicConstraints *bc = new QOpcUaX509ExtensionBasicConstraints; bc->setCa(false); bc->setCritical(true); csr.addExtension(bc); QOpcUaX509ExtensionKeyUsage *ku = new QOpcUaX509ExtensionKeyUsage; ku->setCritical(true); ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::DigitalSignature); ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::NonRepudiation); ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::KeyEncipherment); ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::DataEncipherment); ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::CertificateSigning); csr.addExtension(ku); QOpcUaX509ExtensionExtendedKeyUsage *eku = new QOpcUaX509ExtensionExtendedKeyUsage; eku->setCritical(true); eku->setKeyUsage(QOpcUaX509ExtensionExtendedKeyUsage::KeyUsage::EmailProtection); csr.addExtension(eku); QByteArray csrData = csr.createRequest(key); \endcode \sa QOpcUaX509ExtensionSubjectAlternativeName, QOpcUaX509ExtensionBasicConstraints, QOpcUaX509ExtensionKeyUsage, QOpcUaX509ExtensionKeyUsage 7150 -
qopcuax509certificatesigningrequest.h 1555 -
qopcuax509certificatesigningrequest_openssl.cpp 18303 -
qopcuax509certificatesigningrequest_p.h 2166 -
qopcuax509distinguishedname.cpp ! \class QOpcUaX509DistinguishedName \inmodule QtOpcUa \since 5.14 \brief Information about a distinguished name item. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. \code QOpcUaX509DistinguishedName dn; dn.setEntry(QOpcUaX509DistinguishedName::Type::CommonName, "QtOpcUaViewer"); dn.setEntry(QOpcUaX509DistinguishedName::Type::CountryName, "DE"); dn.setEntry(QOpcUaX509DistinguishedName::Type::LocalityName, "Berlin"); dn.setEntry(QOpcUaX509DistinguishedName::Type::StateOrProvinceName, "Berlin"); dn.setEntry(QOpcUaX509DistinguishedName::Type::OrganizationName, "The Qt Company"); \endcode \sa QOpcUaX509CertificateSigningRequest 3569 -
qopcuax509distinguishedname.h 1199 -
qopcuax509extension.cpp ! \class QOpcUaX509Extension \inmodule QtOpcUa \since 5.14 \brief Base class for all X509 extensions. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. \sa QOpcUaX509ExtensionSubjectAlternativeName, QOpcUaX509ExtensionBasicConstraints, QOpcUaX509ExtensionKeyUsage, QOpcUaX509ExtensionKeyUsage 2098 -
qopcuax509extension.h 969 -
qopcuax509extension_p.h 787 -
qopcuax509extensionbasicconstraints.cpp ! \class QOpcUaX509ExtensionBasicConstraints \inmodule QtOpcUa \since 5.14 \brief Class for X509 basic constraints. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. 3105 -
qopcuax509extensionbasicconstraints.h 1056 -
qopcuax509extensionextendedkeyusage.cpp ! \class QOpcUaX509ExtensionExtendedKeyUsage \inmodule QtOpcUa \since 5.14 \brief Class for X509 extended key usage. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. 3148 -
qopcuax509extensionextendedkeyusage.h 1399 -
qopcuax509extensionkeyusage.cpp ! \class QOpcUaX509ExtensionKeyUsage \inmodule QtOpcUa \since 5.14 \brief Class for X509 extended key usage. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. 3131 -
qopcuax509extensionkeyusage.h 1386 -
qopcuax509extensionsubjectalternativename.cpp ! \class QOpcUaX509ExtensionSubjectAlternativeName \inmodule QtOpcUa \since 5.14 \brief Class for an X509 subject alternative name. This class is currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice. 3225 -
qopcuax509extensionsubjectalternativename.h 1171 -
qopcuax509utils.cpp 754 -
qopcuax509utils_p.h 1070 -