diff options
author | Richard Moore <rich@kde.org> | 2011-11-02 15:07:43 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-06 21:00:39 +0100 |
commit | 6248b869d0e8ae7e0fe566c09f2393278142b547 (patch) | |
tree | f1d8419968a810c0336a74c8539eadefd25b1501 /src/network/ssl/qsslcertificateextension.h | |
parent | efe02f9673dc948ef4b48b2abfeb15c978d2b438 (diff) |
SSL certificates: add functionality to read extensions
... by adding a new class QSslCertificateExtension and methods in
QSslCertificate to support extensions. This is needed e.g. for OCSP
(checking revocation status of a certificate) or Extended Validation
certificates.
Change-Id: I5c5d9513fa640cd487786bb9a5af734afebd0828
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/ssl/qsslcertificateextension.h')
-rw-r--r-- | src/network/ssl/qsslcertificateextension.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h new file mode 100644 index 0000000000..200ae3e091 --- /dev/null +++ b/src/network/ssl/qsslcertificateextension.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Richard J. Moore <rich@kde.org> +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSSLCERTIFICATEEXTENSION_H +#define QSSLCERTIFICATEEXTENSION_H + +#include <QtCore/qnamespace.h> +#include <QtCore/qshareddata.h> +#include <QtCore/qstring.h> +#include <QtCore/qvariant.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Network) + +#ifndef QT_NO_OPENSSL + +class QSslCertificateExtensionPrivate; + +class Q_NETWORK_EXPORT QSslCertificateExtension +{ +public: + QSslCertificateExtension(); + QSslCertificateExtension(const QSslCertificateExtension &other); + ~QSslCertificateExtension(); + + QSslCertificateExtension &operator=(const QSslCertificateExtension &other); + + QString oid() const; + QString name() const; + QVariant value() const; + bool isCritical() const; + + bool isSupported() const; + +private: + friend class QSslCertificatePrivate; + QSharedDataPointer<QSslCertificateExtensionPrivate> d; +}; + +#endif // QT_NO_OPENSSL + +QT_END_NAMESPACE + +QT_END_HEADER + + +#endif // QSSLCERTIFICATEEXTENSION_H + + |