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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • 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 
32 class QSslCertificate;
33 class KSslCertificateRulePrivate;
34 class KSslCertificateManagerPrivate;
35 
36 //### document this... :/
37 class KDECORE_EXPORT KSslCertificateRule
38 {
39 public:
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;
58 private:
59  KSslCertificateRulePrivate *const d;
60 };
61 
62 
63 //### document this too... :/
64 class KDECORE_EXPORT KSslCertificateManager
65 {
66 public:
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 
89 private:
90  friend class KSslCertificateManagerContainer;
91  friend class KSslCertificateManagerPrivate;
92  KSslCertificateManager();
93  ~KSslCertificateManager();
94 
95  KSslCertificateManagerPrivate *const d;
96 };
97 
98 
99 #endif
KSslError::Error
Error
Definition: ktcpsocket.h:101
KSslCertificateManager::rootCertificates
QList< QSslCertificate > rootCertificates() const
Definition: ksslcertificatemanager.h:80
KSslCertificateManager
Definition: ksslcertificatemanager.h:64
KSslCertificateManagerPrivate
Definition: ksslcertificatemanager_p.h:62
QString
QList< KSslError::Error >
KSslCertificateRule
Definition: ksslcertificatemanager.h:37
ktcpsocket.h
QDateTime
KSslCertificateManager::setRootCertificates
void setRootCertificates(const QList< QSslCertificate > &rootCertificates)
Definition: ksslcertificatemanager.h:75
QSslCertificate
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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