![]() |
Qt 6.x
The Qt SDK
|
The QSslCertificateExtension class provides an API for accessing the extensions of an X509 certificate. More...
#include <qsslcertificateextension.h>
Public Member Functions | |
QSslCertificateExtension () | |
Constructs a QSslCertificateExtension. | |
QSslCertificateExtension (const QSslCertificateExtension &other) | |
Constructs a copy of other. | |
QSslCertificateExtension & | operator= (QSslCertificateExtension &&other) noexcept |
QSslCertificateExtension & | operator= (const QSslCertificateExtension &other) |
Assigns other to this extension and returns a reference to this extension. | |
~QSslCertificateExtension () | |
Destroys the extension. | |
void | swap (QSslCertificateExtension &other) noexcept |
Swaps this certificate extension instance with other. | |
QString | oid () const |
Returns the ASN.1 OID of this extension. | |
QString | name () const |
Returns the name of the extension. | |
QVariant | value () const |
Returns the value of the extension. | |
bool | isCritical () const |
Returns the criticality of the extension. | |
bool | isSupported () const |
Returns the true if this extension is supported. | |
Friends | |
class | QSslCertificatePrivate |
The QSslCertificateExtension class provides an API for accessing the extensions of an X509 certificate.
\reentrant
\inmodule QtNetwork
QSslCertificateExtension provides access to an extension stored in an X509 certificate. The information available depends on the type of extension being accessed.
All X509 certificate extensions have the following properties:
\table \header
Whilst this class provides access to any type of extension, only some are guaranteed to be returned in a format that will remain unchanged between releases. The isSupported() method returns true
for extensions where this is the case.
The extensions currently supported, and the structure of the value returned are as follows:
\table \header
In addition to the supported extensions above, many other common extensions will be returned in a reasonably structured way. Extensions that the SSL backend has no support for at all will be returned as a QByteArray.
Further information about the types of extensions certificates can contain can be found in RFC 5280.
Definition at line 17 of file qsslcertificateextension.h.
QT_BEGIN_NAMESPACE QSslCertificateExtension::QSslCertificateExtension | ( | ) |
Constructs a QSslCertificateExtension.
Definition at line 102 of file qsslcertificateextension.cpp.
QSslCertificateExtension::QSslCertificateExtension | ( | const QSslCertificateExtension & | other | ) |
Constructs a copy of other.
Definition at line 110 of file qsslcertificateextension.cpp.
QSslCertificateExtension::~QSslCertificateExtension | ( | ) |
Destroys the extension.
Definition at line 118 of file qsslcertificateextension.cpp.
bool QSslCertificateExtension::isCritical | ( | ) | const |
Returns the criticality of the extension.
Definition at line 167 of file qsslcertificateextension.cpp.
References QSslCertificateExtensionPrivate::critical.
bool QSslCertificateExtension::isSupported | ( | ) | const |
Returns the true if this extension is supported.
In this case, supported simply means that the structure of the QVariant returned by the value() accessor will remain unchanged between versions. Unsupported extensions can be freely used, however there is no guarantee that the returned data will have the same structure between versions.
Definition at line 180 of file qsslcertificateextension.cpp.
References QSslCertificateExtensionPrivate::supported.
QString QSslCertificateExtension::name | ( | ) | const |
Returns the name of the extension.
If no name is known for the extension then the OID will be returned.
Definition at line 150 of file qsslcertificateextension.cpp.
References QSslCertificateExtensionPrivate::name.
QString QSslCertificateExtension::oid | ( | ) | const |
Returns the ASN.1 OID of this extension.
Definition at line 141 of file qsslcertificateextension.cpp.
References QSslCertificateExtensionPrivate::oid.
QSslCertificateExtension & QSslCertificateExtension::operator= | ( | const QSslCertificateExtension & | other | ) |
Assigns other to this extension and returns a reference to this extension.
Definition at line 125 of file qsslcertificateextension.cpp.
References other().
|
inlinenoexcept |
Definition at line 22 of file qsslcertificateextension.h.
References other(), and swap().
|
inlinenoexcept |
Swaps this certificate extension instance with other.
This function is very fast and never fails.
Definition at line 26 of file qsslcertificateextension.h.
QVariant QSslCertificateExtension::value | ( | ) | const |
Returns the value of the extension.
The structure of the value returned depends on the extension type.
Definition at line 159 of file qsslcertificateextension.cpp.
References QSslCertificateExtensionPrivate::value.
|
friend |
Definition at line 36 of file qsslcertificateextension.h.