• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • network
ksslcertificatemanager.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2007, 2008, 2010 Andreas Hartmetz <ahartmetz@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef _INCLUDE_KSSLCERTIFICATEMANAGER_H
22#define _INCLUDE_KSSLCERTIFICATEMANAGER_H
23
24#include "ktcpsocket.h"
25
26#include <QtNetwork/QSslCertificate>
27#include <QtNetwork/QSslError>
28#include <QtCore/QString>
29#include <QtCore/QStringList>
30#include <QtCore/QDate>
31
32class QSslCertificate;
33class KSslCertificateRulePrivate;
34class KSslCertificateManagerPrivate;
35
36//### document this... :/
37class KDECORE_EXPORT KSslCertificateRule
38{
39public:
40 KSslCertificateRule(const QSslCertificate &cert = QSslCertificate(),
41 const QString &hostName = QString());
42 KSslCertificateRule(const KSslCertificateRule &other);
43 ~KSslCertificateRule();
44 KSslCertificateRule &operator=(const KSslCertificateRule &other);
45
46 QSslCertificate certificate() const;
47 QString hostName() const;
48 void setExpiryDateTime(const QDateTime &dateTime);
49 QDateTime expiryDateTime() const;
50 void setRejected(bool rejected);
51 bool isRejected() const;
52 bool isErrorIgnored(KSslError::Error error) const;
53 void setIgnoredErrors(const QList<KSslError::Error> &errors);
54 void setIgnoredErrors(const QList<KSslError> &errors);
55 QList<KSslError::Error> ignoredErrors() const;
56 QList<KSslError::Error> filterErrors(const QList<KSslError::Error> &errors) const;
57 QList<KSslError> filterErrors(const QList<KSslError> &errors) const;
58private:
59 KSslCertificateRulePrivate *const d;
60};
61
62
63//### document this too... :/
64class KDECORE_EXPORT KSslCertificateManager
65{
66public:
67 static KSslCertificateManager *self();
68 void setRule(const KSslCertificateRule &rule);
69 void clearRule(const KSslCertificateRule &rule);
70 void clearRule(const QSslCertificate &cert, const QString &hostName);
71 KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName) const;
72
73 // do not use, it does nothing!
74#ifndef KDE_NO_DEPRECATED
75 KDE_DEPRECATED void setRootCertificates(const QList<QSslCertificate> &rootCertificates)
76 { Q_UNUSED(rootCertificates) }
77#endif
78 // use caCertificates() instead
79#ifndef KDE_NO_DEPRECATED
80 KDE_DEPRECATED QList<QSslCertificate> rootCertificates() const
81 { return caCertificates(); }
82#endif
83
84 QList<QSslCertificate> caCertificates() const;
85
86 static QList<KSslError> nonIgnorableErrors(const QList<KSslError> &);
87 static QList<KSslError::Error> nonIgnorableErrors(const QList<KSslError::Error> &);
88
89private:
90 friend class KSslCertificateManagerContainer;
91 friend class KSslCertificateManagerPrivate;
92 KSslCertificateManager();
93 ~KSslCertificateManager();
94
95 KSslCertificateManagerPrivate *const d;
96};
97
98
99#endif
KSslCertificateManagerPrivate
Definition: ksslcertificatemanager_p.h:63
KSslCertificateManager
Definition: ksslcertificatemanager.h:65
KSslCertificateManager::setRootCertificates
void setRootCertificates(const QList< QSslCertificate > &rootCertificates)
Definition: ksslcertificatemanager.h:75
KSslCertificateManager::rootCertificates
QList< QSslCertificate > rootCertificates() const
Definition: ksslcertificatemanager.h:80
KSslCertificateRule
Definition: ksslcertificatemanager.h:38
KSslError::Error
Error
Definition: ktcpsocket.h:101
QDateTime
QList
Definition: kaboutdata.h:33
QString
ktcpsocket.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal