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

KIO

  • kio
  • kssl
ksslsigners.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2001 George Staikos <staikos@kde.org>
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 "ksslsigners.h"
22
23#include <QtCore/QString>
24#include <QtCore/QStringList>
25#include <QtDBus/QtDBus>
26#include "ksslcertificate.h"
27#include <stdlib.h>
28#include <kdebug.h>
29
30
31KSSLSigners::KSSLSigners() {
32}
33
34
35KSSLSigners::~KSSLSigners() {
36}
37
38bool KSSLSigners::addCA(KSSLCertificate& cert,
39 bool ssl,
40 bool email,
41 bool code) const {
42 return addCA(cert.toString(), ssl, email, code);
43}
44
45
46bool KSSLSigners::addCA(const QString &cert,
47 bool ssl,
48 bool email,
49 bool code) const {
50 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
51 call("caAdd", cert, ssl, email, code));
52}
53
54
55bool KSSLSigners::regenerate() {
56 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
57 call("caRegenerate"));
58}
59
60
61bool KSSLSigners::useForSSL(KSSLCertificate& cert) const {
62 return useForSSL(cert.getSubject());
63}
64
65
66bool KSSLSigners::useForSSL(const QString &subject) const{
67 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
68 call("caUseForSSL", subject));
69}
70
71
72bool KSSLSigners::useForEmail(KSSLCertificate& cert) const{
73 return useForEmail(cert.getSubject());
74}
75
76
77bool KSSLSigners::useForEmail(const QString &subject) const{
78 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
79 call("caUseForEmail", subject));
80}
81
82
83bool KSSLSigners::useForCode(KSSLCertificate& cert) const{
84 return useForCode(cert.getSubject());
85}
86
87
88bool KSSLSigners::useForCode(const QString &subject) const{
89 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
90 call("caUseForCode", subject));
91}
92
93
94bool KSSLSigners::remove(KSSLCertificate& cert) {
95 return remove(cert.getSubject());
96}
97
98
99bool KSSLSigners::remove(const QString &subject) {
100 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
101 call("caRemove", subject));
102}
103
104
105QStringList KSSLSigners::list() {
106 return QDBusReply<QStringList>(QDBusInterface("org.kde.kded", "/modules/kssld").
107 call("caList"));
108}
109
110
111QString KSSLSigners::getCert(const QString &subject) {
112 return QDBusReply<QString>(QDBusInterface("org.kde.kded", "/modules/kssld").
113 call("caGetCert", subject));
114}
115
116
117bool KSSLSigners::setUse(const QString &subject, bool ssl, bool email, bool code) {
118 return QDBusReply<bool>(QDBusInterface("org.kde.kded", "/modules/kssld").
119 call("caSetUse", subject, ssl, email, code));
120}
121
122
123
124
KSSLCertificate
KDE X.509 Certificate.
Definition: ksslcertificate.h:75
KSSLCertificate::getSubject
QString getSubject() const
Get the subject of the certificate (X.509 map).
Definition: ksslcertificate.cpp:167
KSSLCertificate::toString
QString toString()
Convert this certificate to a string.
Definition: ksslcertificate.cpp:1052
KSSLSigners::setUse
bool setUse(const QString &subject, bool ssl, bool email, bool code)
Set the use of a particular entry in the certificate signer database.
Definition: ksslsigners.cpp:117
KSSLSigners::useForCode
bool useForCode(KSSLCertificate &cert) const
Determine if a certificate can be used for code certificate signing.
Definition: ksslsigners.cpp:83
KSSLSigners::regenerate
bool regenerate()
Regenerate the signer-root file from the user's settings.
Definition: ksslsigners.cpp:55
KSSLSigners::getCert
QString getCert(const QString &subject)
Get a signer certificate from the database.
Definition: ksslsigners.cpp:111
KSSLSigners::list
QStringList list()
List the signers in the database.
Definition: ksslsigners.cpp:105
KSSLSigners::useForEmail
bool useForEmail(KSSLCertificate &cert) const
Determine if a certificate can be used for S/MIME certificate signing.
Definition: ksslsigners.cpp:72
KSSLSigners::KSSLSigners
KSSLSigners()
Construct a KSSLSigner object.
Definition: ksslsigners.cpp:31
KSSLSigners::addCA
bool addCA(KSSLCertificate &cert, bool ssl, bool email, bool code) const
Add a signer to the database.
Definition: ksslsigners.cpp:38
KSSLSigners::useForSSL
bool useForSSL(KSSLCertificate &cert) const
Determine if a certificate can be used for SSL certificate signing.
Definition: ksslsigners.cpp:61
KSSLSigners::remove
bool remove(KSSLCertificate &cert)
Remove a certificate signer from the database.
Definition: ksslsigners.cpp:94
KSSLSigners::~KSSLSigners
~KSSLSigners()
Destroy this KSSLSigner object.
Definition: ksslsigners.cpp:35
kdebug.h
ksslcertificate.h
ksslsigners.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.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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