![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qtlskey_base_p.h>
Public Member Functions | |
TlsKeyBase (KeyType type=QSsl::PublicKey, KeyAlgorithm algorithm=QSsl::Opaque) | |
bool | isNull () const override |
KeyType | type () const override |
KeyAlgorithm | algorithm () const override |
bool | isPkcs8 () const override |
QByteArray | pemFromDer (const QByteArray &der, const QMap< QByteArray, QByteArray > &headers) const override |
Public Member Functions inherited from QTlsPrivate::TlsKey | |
TlsKey ()=default | |
virtual | ~TlsKey () |
virtual void | decodeDer (KeyType type, KeyAlgorithm algorithm, const QByteArray &der, const QByteArray &passPhrase, bool deepClear)=0 |
virtual void | decodePem (KeyType type, KeyAlgorithm algorithm, const QByteArray &pem, const QByteArray &passPhrase, bool deepClear)=0 |
virtual QByteArray | toPem (const QByteArray &passPhrase) const =0 |
virtual QByteArray | derFromPem (const QByteArray &pem, QMap< QByteArray, QByteArray > *headers) const =0 |
virtual void | fromHandle (Qt::HANDLE handle, KeyType type)=0 |
virtual Qt::HANDLE | handle () const =0 |
virtual int | length () const =0 |
virtual void | clear (bool deepClear)=0 |
virtual QByteArray | decrypt (Cipher cipher, const QByteArray &data, const QByteArray &passPhrase, const QByteArray &iv) const =0 |
virtual QByteArray | encrypt (Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv) const =0 |
QByteArray | pemHeader () const |
QByteArray | pemFooter () const |
Static Protected Member Functions | |
static QByteArray | pkcs8Header (bool encrypted) |
static QByteArray | pkcs8Footer (bool encrypted) |
static bool | isEncryptedPkcs8 (const QByteArray &der) |
Protected Attributes | |
bool | keyIsNull = true |
KeyType | keyType = QSsl::PublicKey |
KeyAlgorithm | keyAlgorithm = QSsl::Opaque |
Additional Inherited Members | |
Public Types inherited from QTlsPrivate::TlsKey | |
using | KeyType = QSsl::KeyType |
using | KeyAlgorithm = QSsl::KeyAlgorithm |
Definition at line 31 of file qtlskey_base_p.h.
|
inline |
Definition at line 34 of file qtlskey_base_p.h.
References TlsKeyBase().
Referenced by TlsKeyBase().
|
inlineoverridevirtual |
Return this key's algorithm.
Implements QTlsPrivate::TlsKey.
Definition at line 48 of file qtlskey_base_p.h.
|
staticprotected |
Definition at line 63 of file qtlskey_base.cpp.
References QAsn1Element::ObjectIdentifierType, QAsn1Element::OctetStringType, and QAsn1Element::SequenceType.
|
inlineoverridevirtual |
Returns true
if this is a null key, false
otherwise.
Implements QTlsPrivate::TlsKey.
Definition at line 40 of file qtlskey_base_p.h.
References keyIsNull.
|
inlineoverridevirtual |
This function is internally used only by Qt's own TLS plugins and affects the way PEM file is generated by TlsKey. It's sufficient to override it and return false
in case a new TLS backend is not using Qt's plugin as a base.
Implements QTlsPrivate::TlsKey.
Reimplemented in QTlsPrivate::TlsKeyGeneric.
Definition at line 52 of file qtlskey_base_p.h.
Referenced by pemFromDer().
|
overridevirtual |
If overridden, this function is expected to convert der, using headers, to PEM format.
Implements QTlsPrivate::TlsKey.
Definition at line 12 of file qtlskey_base.cpp.
References isPkcs8().
|
staticprotected |
Definition at line 56 of file qtlskey_base.cpp.
|
staticprotected |
Definition at line 49 of file qtlskey_base.cpp.
|
inlineoverridevirtual |
Returns the type of this key (public or private).
Implements QTlsPrivate::TlsKey.
Definition at line 44 of file qtlskey_base_p.h.
|
protected |
Definition at line 66 of file qtlskey_base_p.h.
|
protected |
Definition at line 64 of file qtlskey_base_p.h.
Referenced by QTlsPrivate::TlsKeyGeneric::clear(), QTlsPrivate::TlsKeyOpenSSL::clear(), QTlsPrivate::TlsKeyOpenSSL::decodePem(), QTlsPrivate::TlsKeyOpenSSL::fromEVP_PKEY(), isNull(), and QTlsPrivate::TlsKeyOpenSSL::publicKeyFromX509().
|
protected |
Definition at line 65 of file qtlskey_base_p.h.