Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QSslCertificateExtension Class

The QSslCertificateExtension class provides an API for accessing the extensions of an X509 certificate. More...

 #include <QSslCertificateExtension>

Note: All functions in this class are reentrant.

This class was introduced in Qt 5.0.

Public Functions

QSslCertificateExtension()
QSslCertificateExtension(const QSslCertificateExtension & other)
~QSslCertificateExtension()
bool isCritical() const
bool isSupported() const
QString name() const
QString oid() const
QVariant value() const
QSslCertificateExtension & operator=(const QSslCertificateExtension & other)

Detailed Description

The QSslCertificateExtension class provides an API for accessing the extensions of an X509 certificate.

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:

PropertyDescription
nameThe human readable name of the extension, eg. 'basicConstraints'.
criticalityThis is a boolean value indicating if the extension is critical to correctly interpreting the certificate.
oidThe ASN.1 object identifier that specifies which extension this is.
supportedIf this is true the structure of the extension's value will not change between Qt versions.
valueA QVariant with a structure dependent on the type of extension.

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:

NameOIDDetails
basicConstraints2.5.29.19Returned as a QVariantMap. The key 'ca' contains a boolean value, the optional key 'pathLenConstraint' contains an integer.
authorityInfoAccess1.3.6.1.5.5.7.1.1Returned as a QVariantMap. There is a key for each access method, with the value being a URI.
subjectKeyIdentifier2.5.29.14Returned as a QVariant containing a QString. The string is the key identifier.
authorityKeyIdentifier2.5.29.35Returned as a QVariantMap. The optional key 'keyid' contains the key identifier as a hex string stored in a QByteArray. The optional key 'serial' contains the authority key serial number as a qlonglong. Currently there is no support for the general names field of this extension.

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.

See also QSslCertificate::extensions().

Member Function Documentation

QSslCertificateExtension::QSslCertificateExtension()

Constructs a QSslCertificateExtension.

QSslCertificateExtension::QSslCertificateExtension(const QSslCertificateExtension & other)

Constructs a copy of other.

QSslCertificateExtension::~QSslCertificateExtension()

Destroys the extension.

bool QSslCertificateExtension::isCritical() const

Returns the criticality of the extension.

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.

QString QSslCertificateExtension::name() const

Returns the name of the extension. If no name is known for the extension then the OID will be returned.

QString QSslCertificateExtension::oid() const

Returns the ASN.1 OID of this extension.

QVariant QSslCertificateExtension::value() const

Returns the value of the extension. The structure of the value returned depends on the extension type.

QSslCertificateExtension & QSslCertificateExtension::operator=(const QSslCertificateExtension & other)

Assigns other to this extension and returns a reference to this extension.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web