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

KDECore

  • kdecore
  • network
ksslcertificatemanager.cpp
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#include "ksslcertificatemanager.h"
22#include "ksslcertificatemanager_p.h"
23
24#include "ktcpsocket.h"
25#include "ktcpsocket_p.h"
26#include <kconfig.h>
27#include <kconfiggroup.h>
28#include <kdebug.h>
29#include <kglobal.h>
30#include <klocale.h>
31#include <kstandarddirs.h>
32#include <ktoolinvocation.h>
33
34#include <QtDBus/QtDBus>
35
36#include "kssld/kssld_interface.h"
37
38/*
39 Config file format:
40[<MD5-Digest>]
41<Host> = <Date> <List of ignored errors>
42#for example
43#mail.kdab.net = ExpireUTC 2008-08-20T18:22:14, SelfSigned, Expired
44#very.old.com = ExpireUTC 2008-08-20T18:22:14, TooWeakEncryption <- not actually planned to implement
45#clueless.admin.com = ExpireUTC 2008-08-20T18:22:14, HostNameMismatch
46#
47#Wildcard syntax
48#* = ExpireUTC 2008-08-20T18:22:14, SelfSigned
49#*.kdab.net = ExpireUTC 2008-08-20T18:22:14, SelfSigned
50#mail.kdab.net = ExpireUTC 2008-08-20T18:22:14, All <- not implemented
51#* = ExpireUTC 9999-12-31T23:59:59, Reject #we know that something is wrong with that certificate
52CertificatePEM = <PEM-encoded certificate> #host entries are all lowercase, thus no clashes
53
54 */
55
56// TODO GUI for managing exception rules
57
58class KSslCertificateRulePrivate
59{
60public:
61 QSslCertificate certificate;
62 QString hostName;
63 bool isRejected;
64 QDateTime expiryDateTime;
65 QList<KSslError::Error> ignoredErrors;
66};
67
68
69KSslCertificateRule::KSslCertificateRule(const QSslCertificate &cert, const QString &hostName)
70 : d(new KSslCertificateRulePrivate())
71{
72 d->certificate = cert;
73 d->hostName = hostName;
74 d->isRejected = false;
75}
76
77
78KSslCertificateRule::KSslCertificateRule(const KSslCertificateRule &other)
79 : d(new KSslCertificateRulePrivate())
80{
81 *d = *other.d;
82}
83
84
85KSslCertificateRule::~KSslCertificateRule()
86{
87 delete d;
88}
89
90
91KSslCertificateRule &KSslCertificateRule::operator=(const KSslCertificateRule &other)
92{
93 *d = *other.d;
94 return *this;
95}
96
97
98QSslCertificate KSslCertificateRule::certificate() const
99{
100 return d->certificate;
101}
102
103
104QString KSslCertificateRule::hostName() const
105{
106 return d->hostName;
107}
108
109
110void KSslCertificateRule::setExpiryDateTime(const QDateTime &dateTime)
111{
112 d->expiryDateTime = dateTime;
113}
114
115
116QDateTime KSslCertificateRule::expiryDateTime() const
117{
118 return d->expiryDateTime;
119}
120
121
122void KSslCertificateRule::setRejected(bool rejected)
123{
124 d->isRejected = rejected;
125}
126
127
128bool KSslCertificateRule::isRejected() const
129{
130 return d->isRejected;
131}
132
133
134bool KSslCertificateRule::isErrorIgnored(KSslError::Error error) const
135{
136 foreach (KSslError::Error ignoredError, d->ignoredErrors)
137 if (error == ignoredError)
138 return true;
139
140 return false;
141}
142
143
144void KSslCertificateRule::setIgnoredErrors(const QList<KSslError::Error> &errors)
145{
146 d->ignoredErrors.clear();
147 //### Quadratic runtime, woohoo! Use a QSet if that should ever be an issue.
148 foreach(KSslError::Error e, errors)
149 if (!isErrorIgnored(e))
150 d->ignoredErrors.append(e);
151}
152
153
154void KSslCertificateRule::setIgnoredErrors(const QList<KSslError> &errors)
155{
156 QList<KSslError::Error> el;
157 foreach(const KSslError &e, errors)
158 el.append(e.error());
159 setIgnoredErrors(el);
160}
161
162
163QList<KSslError::Error> KSslCertificateRule::ignoredErrors() const
164{
165 return d->ignoredErrors;
166}
167
168
169QList<KSslError::Error> KSslCertificateRule::filterErrors(const QList<KSslError::Error> &errors) const
170{
171 QList<KSslError::Error> ret;
172 foreach (KSslError::Error error, errors) {
173 if (!isErrorIgnored(error))
174 ret.append(error);
175 }
176 return ret;
177}
178
179
180QList<KSslError> KSslCertificateRule::filterErrors(const QList<KSslError> &errors) const
181{
182 QList<KSslError> ret;
183 foreach (const KSslError &error, errors) {
184 if (!isErrorIgnored(error.error()))
185 ret.append(error);
186 }
187 return ret;
188}
189
190
192
193static QList<QSslCertificate> deduplicate(const QList<QSslCertificate> &certs)
194{
195 QSet<QByteArray> digests;
196 QList<QSslCertificate> ret;
197 foreach (const QSslCertificate &cert, certs) {
198 QByteArray digest = cert.digest();
199 if (!digests.contains(digest)) {
200 digests.insert(digest);
201 ret.append(cert);
202 }
203 }
204 return ret;
205}
206
207KSslCertificateManagerPrivate::KSslCertificateManagerPrivate()
208 : config(QString::fromLatin1("ksslcertificatemanager"), KConfig::SimpleConfig),
209 iface(new org::kde::KSSLDInterface(QString::fromLatin1("org.kde.kded"),
210 QString::fromLatin1("/modules/kssld"),
211 QDBusConnection::sessionBus())),
212 isCertListLoaded(false),
213 userCertDir(KGlobal::dirs()->saveLocation("data", QString::fromLatin1("kssl/userCaCertificates/")))
214{
215 // set Qt's set to empty; this is protected by the lock in K_GLOBAL_STATIC.
216 QSslSocket::setDefaultCaCertificates(QList<QSslCertificate>());
217}
218
219KSslCertificateManagerPrivate::~KSslCertificateManagerPrivate()
220{
221 delete iface;
222 iface = 0;
223}
224
225void KSslCertificateManagerPrivate::loadDefaultCaCertificates()
226{
227 defaultCaCertificates.clear();
228
229 if (!KGlobal::hasMainComponent()) {
230 Q_ASSERT(false);
231 return; // we need KGlobal::dirs() available
232 }
233
234 QList<QSslCertificate> certs = deduplicate(QSslSocket::systemCaCertificates());
235
236 KConfig config(QString::fromLatin1("ksslcablacklist"), KConfig::SimpleConfig);
237 KConfigGroup group = config.group("Blacklist of CA Certificates");
238
239 certs.append(QSslCertificate::fromPath(userCertDir + QLatin1String("*"), QSsl::Pem,
240 QRegExp::Wildcard));
241 foreach (const QSslCertificate &cert, certs) {
242 const QByteArray digest = cert.digest().toHex();
243 if (!group.hasKey(digest.constData())) {
244 defaultCaCertificates += cert;
245 }
246 }
247
248 isCertListLoaded = true;
249}
250
251
252bool KSslCertificateManagerPrivate::addCertificate(const KSslCaCertificate &in)
253{
254 kDebug(7029);
255 // cannot add a certificate to the system store
256 if (in.store == KSslCaCertificate::SystemStore) {
257 Q_ASSERT(false);
258 return false;
259 }
260 if (knownCerts.contains(in.certHash)) {
261 Q_ASSERT(false);
262 return false;
263 }
264
265 QString certFilename = userCertDir + QString::fromLatin1(in.certHash);
266 kDebug(7029) << certFilename;
267 QFile certFile(certFilename);
268 if (certFile.open(QIODevice::ReadOnly)) {
269 return false;
270 }
271 if (!certFile.open(QIODevice::WriteOnly)) {
272 return false;
273 }
274 if (certFile.write(in.cert.toPem()) < 1) {
275 return false;
276 }
277 knownCerts.insert(in.certHash);
278
279 updateCertificateBlacklisted(in);
280
281 return true;
282}
283
284
285bool KSslCertificateManagerPrivate::removeCertificate(const KSslCaCertificate &old)
286{
287 kDebug(7029);
288 // cannot remove a certificate from the system store
289 if (old.store == KSslCaCertificate::SystemStore) {
290 Q_ASSERT(false);
291 return false;
292 }
293
294 if (!QFile::remove(userCertDir + QString::fromLatin1(old.certHash))) {
295
296 // suppose somebody copied a certificate file into userCertDir without changing the
297 // filename to the digest.
298 // the rest of the code will work fine because it loads all certificate files from
299 // userCertDir without asking for the name, we just can't remove the certificate using
300 // its digest as filename - so search the whole directory.
301 // if the certificate was added with the digest as name *and* with a different name, we
302 // still fail to remove it completely at first try - BAD USER! BAD!
303
304 bool removed = false;
305 QDir dir(userCertDir);
306 foreach (const QString &certFilename, dir.entryList(QDir::Files)) {
307 const QString certPath = userCertDir + certFilename;
308 QList<QSslCertificate> certs = QSslCertificate::fromPath(certPath);
309
310 if (!certs.isEmpty() && certs.at(0).digest().toHex() == old.certHash) {
311 if (QFile::remove(certPath)) {
312 removed = true;
313 } else {
314 // maybe the file is readable but not writable
315 return false;
316 }
317 }
318 }
319 if (!removed) {
320 // looks like the file is not there
321 return false;
322 }
323 }
324
325 // note that knownCerts *should* need no updating due to the way setAllCertificates() works -
326 // it should never call addCertificate and removeCertificate for the same cert in one run
327
328 // clean up the blacklist
329 setCertificateBlacklisted(old.certHash, false);
330
331 return true;
332}
333
334static bool certLessThan(const KSslCaCertificate &cacert1, const KSslCaCertificate &cacert2)
335{
336 if (cacert1.store != cacert2.store) {
337 // SystemStore is numerically smaller so the system certs come first; this is important
338 // so that system certificates come first in case the user added an already-present
339 // certificate as a user certificate.
340 return cacert1.store < cacert2.store;
341 }
342 return cacert1.certHash < cacert2.certHash;
343}
344
345void KSslCertificateManagerPrivate::setAllCertificates(const QList<KSslCaCertificate> &certsIn)
346{
347 Q_ASSERT(knownCerts.isEmpty());
348 QList<KSslCaCertificate> in = certsIn;
349 QList<KSslCaCertificate> old = allCertificates();
350 qSort(in.begin(), in.end(), certLessThan);
351 qSort(old.begin(), old.end(), certLessThan);
352
353 for (int ii = 0, oi = 0; ii < in.size() || oi < old.size(); ++ii, ++oi) {
354 // look at all elements in both lists, even if we reach the end of one early.
355 if (ii >= in.size()) {
356 removeCertificate(old.at(oi));
357 continue;
358 } else if (oi >= old.size()) {
359 addCertificate(in.at(ii));
360 continue;
361 }
362
363 if (certLessThan (old.at(oi), in.at(ii))) {
364 // the certificate in "old" is not in "in". only advance the index of "old".
365 removeCertificate(old.at(oi));
366 ii--;
367 } else if (certLessThan(in.at(ii), old.at(oi))) {
368 // the certificate in "in" is not in "old". only advance the index of "in".
369 addCertificate(in.at(ii));
370 oi--;
371 } else { // in.at(ii) "==" old.at(oi)
372 if (in.at(ii).cert != old.at(oi).cert) {
373 // hash collision, be prudent(?) and don't do anything.
374 } else {
375 knownCerts.insert(old.at(oi).certHash);
376 if (in.at(ii).isBlacklisted != old.at(oi).isBlacklisted) {
377 updateCertificateBlacklisted(in.at(ii));
378 }
379 }
380 }
381 }
382 knownCerts.clear();
383 QMutexLocker certListLocker(&certListMutex);
384 isCertListLoaded = false;
385 loadDefaultCaCertificates();
386}
387
388QList<KSslCaCertificate> KSslCertificateManagerPrivate::allCertificates() const
389{
390 kDebug(7029);
391 QList<KSslCaCertificate> ret;
392 foreach (const QSslCertificate &cert, deduplicate(QSslSocket::systemCaCertificates())) {
393 ret += KSslCaCertificate(cert, KSslCaCertificate::SystemStore, false);
394 }
395
396 foreach (const QSslCertificate &cert, QSslCertificate::fromPath(userCertDir + QLatin1String("*"),
397 QSsl::Pem, QRegExp::Wildcard)) {
398 ret += KSslCaCertificate(cert, KSslCaCertificate::UserStore, false);
399 }
400
401 KConfig config(QString::fromLatin1("ksslcablacklist"), KConfig::SimpleConfig);
402 KConfigGroup group = config.group("Blacklist of CA Certificates");
403 for (int i = 0; i < ret.size(); i++) {
404 if (group.hasKey(ret[i].certHash.constData())) {
405 ret[i].isBlacklisted = true;
406 kDebug(7029) << "is blacklisted";
407 }
408 }
409
410 return ret;
411}
412
413
414bool KSslCertificateManagerPrivate::updateCertificateBlacklisted(const KSslCaCertificate &cert)
415{
416 return setCertificateBlacklisted(cert.certHash, cert.isBlacklisted);
417}
418
419
420bool KSslCertificateManagerPrivate::setCertificateBlacklisted(const QByteArray &certHash,
421 bool isBlacklisted)
422{
423 kDebug(7029) << isBlacklisted;
424 KConfig config(QString::fromLatin1("ksslcablacklist"), KConfig::SimpleConfig);
425 KConfigGroup group = config.group("Blacklist of CA Certificates");
426 if (isBlacklisted) {
427 // TODO check against certificate list ?
428 group.writeEntry(certHash.constData(), QString());
429 } else {
430 if (!group.hasKey(certHash.constData())) {
431 return false;
432 }
433 group.deleteEntry(certHash.constData());
434 }
435
436 return true;
437}
438
439
440class KSslCertificateManagerContainer
441{
442public:
443 KSslCertificateManager sslCertificateManager;
444};
445
446K_GLOBAL_STATIC(KSslCertificateManagerContainer, g_instance)
447
448
449KSslCertificateManager::KSslCertificateManager()
450 : d(new KSslCertificateManagerPrivate())
451{
452 // Make sure kded is running
453 if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(QString::fromLatin1("org.kde.kded"))) {
454 KToolInvocation::klauncher(); // this calls startKdeinit
455 }
456}
457
458
459KSslCertificateManager::~KSslCertificateManager()
460{
461 delete d;
462}
463
464
465//static
466KSslCertificateManager *KSslCertificateManager::self()
467{
468 return &g_instance->sslCertificateManager;
469}
470
471
472void KSslCertificateManager::setRule(const KSslCertificateRule &rule)
473{
474 d->iface->setRule(rule);
475}
476
477
478void KSslCertificateManager::clearRule(const KSslCertificateRule &rule)
479{
480 d->iface->clearRule(rule);
481}
482
483
484void KSslCertificateManager::clearRule(const QSslCertificate &cert, const QString &hostName)
485{
486 d->iface->clearRule(cert, hostName);
487}
488
489
490KSslCertificateRule KSslCertificateManager::rule(const QSslCertificate &cert,
491 const QString &hostName) const
492{
493 return d->iface->rule(cert, hostName);
494}
495
496
497QList<QSslCertificate> KSslCertificateManager::caCertificates() const
498{
499 QMutexLocker certLocker(&d->certListMutex);
500 if (!d->isCertListLoaded) {
501 d->loadDefaultCaCertificates();
502 }
503 return d->defaultCaCertificates;
504}
505
506
507//static
508QList<KSslError> KSslCertificateManager::nonIgnorableErrors(const QList<KSslError> &/*e*/)
509{
510 QList<KSslError> ret;
511 // ### add filtering here...
512 return ret;
513}
514
515//static
516QList<KSslError::Error> KSslCertificateManager::nonIgnorableErrors(const QList<KSslError::Error> &/*e*/)
517{
518 QList<KSslError::Error> ret;
519 // ### add filtering here...
520 return ret;
521}
522
523QList<KSslCaCertificate> _allKsslCaCertificates(KSslCertificateManager *cm)
524{
525 return KSslCertificateManagerPrivate::get(cm)->allCertificates();
526}
527
528void _setAllKsslCaCertificates(KSslCertificateManager *cm, const QList<KSslCaCertificate> &certsIn)
529{
530 KSslCertificateManagerPrivate::get(cm)->setAllCertificates(certsIn);
531}
532
533#include "kssld/kssld_interface.moc"
KConfigBase::group
KConfigGroup group(const QByteArray &group)
Returns an object for the named subgroup.
Definition: kconfigbase.cpp:44
KConfigGroup
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:54
KConfig
The central class of the KDE configuration data system.
Definition: kconfig.h:71
KConfig::SimpleConfig
@ SimpleConfig
Just a single config file.
Definition: kconfig.h:96
KSslCertificateManagerPrivate
Definition: ksslcertificatemanager_p.h:63
KSslCertificateManagerPrivate::setCertificateBlacklisted
bool setCertificateBlacklisted(const QByteArray &certHash, bool isBlacklisted)
Definition: ksslcertificatemanager.cpp:420
KSslCertificateManagerPrivate::updateCertificateBlacklisted
bool updateCertificateBlacklisted(const KSslCaCertificate &cert)
Definition: ksslcertificatemanager.cpp:414
KSslCertificateManagerPrivate::loadDefaultCaCertificates
void loadDefaultCaCertificates()
Definition: ksslcertificatemanager.cpp:225
KSslCertificateManagerPrivate::certListMutex
QMutex certListMutex
Definition: ksslcertificatemanager_p.h:91
KSslCertificateManagerPrivate::setAllCertificates
void setAllCertificates(const QList< KSslCaCertificate > &certsIn)
Definition: ksslcertificatemanager.cpp:345
KSslCertificateManagerPrivate::config
KConfig config
Definition: ksslcertificatemanager_p.h:82
KSslCertificateManagerPrivate::addCertificate
bool addCertificate(const KSslCaCertificate &in)
Definition: ksslcertificatemanager.cpp:252
KSslCertificateManagerPrivate::userCertDir
QString userCertDir
Definition: ksslcertificatemanager_p.h:93
KSslCertificateManagerPrivate::removeCertificate
bool removeCertificate(const KSslCaCertificate &old)
Definition: ksslcertificatemanager.cpp:285
KSslCertificateManagerPrivate::get
static KSslCertificateManagerPrivate * get(KSslCertificateManager *q)
Definition: ksslcertificatemanager_p.h:68
KSslCertificateManagerPrivate::allCertificates
QList< KSslCaCertificate > allCertificates() const
Definition: ksslcertificatemanager.cpp:388
KSslCertificateManagerPrivate::~KSslCertificateManagerPrivate
~KSslCertificateManagerPrivate()
Definition: ksslcertificatemanager.cpp:219
KSslCertificateManagerPrivate::knownCerts
QSet< QByteArray > knownCerts
Definition: ksslcertificatemanager_p.h:90
KSslCertificateManagerPrivate::defaultCaCertificates
QList< QSslCertificate > defaultCaCertificates
Definition: ksslcertificatemanager_p.h:87
KSslCertificateManagerPrivate::iface
org::kde::KSSLDInterface * iface
Definition: ksslcertificatemanager_p.h:83
KSslCertificateManagerPrivate::KSslCertificateManagerPrivate
KSslCertificateManagerPrivate()
Definition: ksslcertificatemanager.cpp:207
KSslCertificateManagerPrivate::isCertListLoaded
bool isCertListLoaded
Definition: ksslcertificatemanager_p.h:92
KSslCertificateManager
Definition: ksslcertificatemanager.h:65
KSslCertificateManager::nonIgnorableErrors
static QList< KSslError > nonIgnorableErrors(const QList< KSslError > &)
Definition: ksslcertificatemanager.cpp:508
KSslCertificateManager::caCertificates
QList< QSslCertificate > caCertificates() const
Definition: ksslcertificatemanager.cpp:497
KSslCertificateManager::self
static KSslCertificateManager * self()
Definition: ksslcertificatemanager.cpp:466
KSslCertificateManager::rule
KSslCertificateRule rule(const QSslCertificate &cert, const QString &hostName) const
Definition: ksslcertificatemanager.cpp:490
KSslCertificateManager::setRule
void setRule(const KSslCertificateRule &rule)
Definition: ksslcertificatemanager.cpp:472
KSslCertificateManager::clearRule
void clearRule(const KSslCertificateRule &rule)
Definition: ksslcertificatemanager.cpp:478
KSslCertificateRule
Definition: ksslcertificatemanager.h:38
KSslCertificateRule::operator=
KSslCertificateRule & operator=(const KSslCertificateRule &other)
Definition: ksslcertificatemanager.cpp:91
KSslCertificateRule::expiryDateTime
QDateTime expiryDateTime() const
Definition: ksslcertificatemanager.cpp:116
KSslCertificateRule::setRejected
void setRejected(bool rejected)
Definition: ksslcertificatemanager.cpp:122
KSslCertificateRule::hostName
QString hostName() const
Definition: ksslcertificatemanager.cpp:104
KSslCertificateRule::filterErrors
QList< KSslError::Error > filterErrors(const QList< KSslError::Error > &errors) const
Definition: ksslcertificatemanager.cpp:169
KSslCertificateRule::KSslCertificateRule
KSslCertificateRule(const QSslCertificate &cert=QSslCertificate(), const QString &hostName=QString())
Definition: ksslcertificatemanager.cpp:69
KSslCertificateRule::ignoredErrors
QList< KSslError::Error > ignoredErrors() const
Definition: ksslcertificatemanager.cpp:163
KSslCertificateRule::certificate
QSslCertificate certificate() const
Definition: ksslcertificatemanager.cpp:98
KSslCertificateRule::setExpiryDateTime
void setExpiryDateTime(const QDateTime &dateTime)
Definition: ksslcertificatemanager.cpp:110
KSslCertificateRule::isRejected
bool isRejected() const
Definition: ksslcertificatemanager.cpp:128
KSslCertificateRule::isErrorIgnored
bool isErrorIgnored(KSslError::Error error) const
Definition: ksslcertificatemanager.cpp:134
KSslCertificateRule::setIgnoredErrors
void setIgnoredErrors(const QList< KSslError::Error > &errors)
Definition: ksslcertificatemanager.cpp:144
KSslCertificateRule::~KSslCertificateRule
~KSslCertificateRule()
Definition: ksslcertificatemanager.cpp:85
KSslError
Definition: ktcpsocket.h:99
KSslError::error
Error error() const
Definition: ktcpsocket.cpp:242
KSslError::Error
Error
Definition: ktcpsocket.h:101
KToolInvocation::klauncher
static OrgKdeKLauncherInterface * klauncher()
Returns the D-Bus interface of the service launcher.
OrgKdeKSSLDInterface::rule
QDBusReply< KSslCertificateRule > rule(const QSslCertificate &cert, const QString &hostName)
Definition: kssld_interface.h:83
OrgKdeKSSLDInterface::clearRule
Q_NOREPLY void clearRule(const KSslCertificateRule &rule)
Definition: kssld_interface.h:67
OrgKdeKSSLDInterface::setRule
Q_NOREPLY void setRule(const KSslCertificateRule &rule)
Definition: kssld_interface.h:59
QDateTime
QList
Definition: kaboutdata.h:33
QSet
Definition: k3resolver.h:41
QString
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
This macro makes it easy to use non-POD types as global statics.
Definition: kglobal.h:221
kDebug
#define kDebug
Definition: kdebug.h:316
kconfig.h
kconfiggroup.h
kdebug.h
kglobal.h
klocale.h
deduplicate
static QList< QSslCertificate > deduplicate(const QList< QSslCertificate > &certs)
Definition: ksslcertificatemanager.cpp:193
certLessThan
static bool certLessThan(const KSslCaCertificate &cacert1, const KSslCaCertificate &cacert2)
Definition: ksslcertificatemanager.cpp:334
_allKsslCaCertificates
QList< KSslCaCertificate > _allKsslCaCertificates(KSslCertificateManager *cm)
Definition: ksslcertificatemanager.cpp:523
_setAllKsslCaCertificates
void _setAllKsslCaCertificates(KSslCertificateManager *cm, const QList< KSslCaCertificate > &certsIn)
Definition: ksslcertificatemanager.cpp:528
ksslcertificatemanager.h
ksslcertificatemanager_p.h
kssld_interface.h
kstandarddirs.h
ktcpsocket.h
ktcpsocket_p.h
ktoolinvocation.h
KGlobal
Access to the KDE global objects.
Definition: kglobal.h:334
KGlobal::hasMainComponent
bool hasMainComponent()
Definition: kglobal.cpp:151
org
Definition: ksslcertificatemanager_p.h:58
KSslCaCertificate
Definition: ksslcertificatemanager_p.h:29
KSslCaCertificate::certHash
const QByteArray certHash
Definition: ksslcertificatemanager_p.h:43
KSslCaCertificate::store
const Store store
Definition: ksslcertificatemanager_p.h:44
KSslCaCertificate::cert
const QSslCertificate cert
Definition: ksslcertificatemanager_p.h:42
KSslCaCertificate::SystemStore
@ SystemStore
Definition: ksslcertificatemanager_p.h:31
KSslCaCertificate::UserStore
@ UserStore
Definition: ksslcertificatemanager_p.h:32
KSslCaCertificate::isBlacklisted
bool isBlacklisted
Definition: ksslcertificatemanager_p.h:45
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