• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

ksslcertificatemanager.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2007, 2008 Andreas Hartmetz <ahartmetz@gmail.com>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef _INCLUDE_KSSLCERTIFICATEMANAGER_H
00022 #define _INCLUDE_KSSLCERTIFICATEMANAGER_H
00023 
00024 #include "ktcpsocket.h"
00025 
00026 #include <QtNetwork/QSslCertificate>
00027 #include <QtNetwork/QSslError>
00028 #include <QtCore/QString>
00029 #include <QtCore/QStringList>
00030 #include <QtCore/QDate>
00031 
00032 class QSslCertificate;
00033 class KSslCertificateRulePrivate;
00034 class KSslCertificateManagerPrivate;
00035 
00036 class KDECORE_EXPORT KSslCertificateRule
00037 {
00038 public:
00039     KSslCertificateRule(const QSslCertificate &cert = QSslCertificate(),
00040                         const QString &hostName = QString());
00041     KSslCertificateRule(const KSslCertificateRule &other);
00042     ~KSslCertificateRule();
00043     KSslCertificateRule &operator=(const KSslCertificateRule &other);
00044 
00045     QSslCertificate certificate() const;
00046     QString hostName() const;
00047     void setExpiryDateTime(const QDateTime &dateTime);
00048     QDateTime expiryDateTime() const;
00049     void setRejected(bool rejected);
00050     bool isRejected() const;
00051     bool isErrorIgnored(KSslError::Error error) const;
00052     void setIgnoredErrors(const QList<KSslError::Error> &errors);
00053     void setIgnoredErrors(const QList<KSslError> &errors);
00054     QList<KSslError::Error> ignoredErrors() const;
00055     QList<KSslError::Error> filterErrors(const QList<KSslError::Error> &errors) const;
00056     QList<KSslError> filterErrors(const QList<KSslError> &errors) const;
00057 private:
00058     KSslCertificateRulePrivate *const d;
00059 };
00060 
00061 
00062 class KDECORE_EXPORT KSslCertificateManager
00063 {
00064 public:
00065     static KSslCertificateManager *self();
00066     void setRule(const KSslCertificateRule &rule);
00067     void clearRule(const KSslCertificateRule &rule);
00068     void clearRule(const QSslCertificate &cert, const QString &hostName);
00069     KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName) const;
00070 
00071     void setRootCertificates(const QList<QSslCertificate> &rootCertificates);
00072     QList<QSslCertificate> rootCertificates() const;    // TODO on monday: rename to caCertificates()
00073 
00074     static QList<KSslError> nonIgnorableErrors(const QList<KSslError> &);
00075     static QList<KSslError::Error> nonIgnorableErrors(const QList<KSslError::Error> &);
00076 
00077 private:
00078     friend class KSslCertificateManagerContainer;
00079     KSslCertificateManager();
00080     ~KSslCertificateManager();
00081 
00082     KSslCertificateManagerPrivate *const d;
00083 };
00084 
00085 
00086 #endif

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal