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

KIO

  • kio
  • kssl
ksslcertificatehome.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2000-2003 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#ifndef _KSSLCERTIFICATEHOME_H
22#define _KSSLCERTIFICATEHOME_H
23
24class KSSLCertificate;
25class KSSLPKCS12;
26#include <QtCore/QString>
27#include <QtCore/QStringList>
28
29#include <kio/kio_export.h>
30
31class KIO_EXPORT KSSLCertificateHome {
32
33public:
34
35 // AuthNone means there is no policy. AuthDont means _don't_ _send_!!
36 enum KSSLAuthAction {AuthNone, AuthSend, AuthPrompt, AuthDont};
37 /*
38 * These methods might dynamically allocate an object for you. Be sure
39 * to delete them when you are done.
40 */
41 static KSSLPKCS12* getCertificateByHost(const QString &host, const QString &password, KSSLAuthAction* aa);
42 static KSSLPKCS12* getCertificateByName(const QString &name, const QString &password);
43 static KSSLPKCS12* getCertificateByName(const QString &name);
44 static QString getDefaultCertificateName(const QString &host, KSSLAuthAction *aa = NULL);
45 static QString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
46 static KSSLPKCS12* getDefaultCertificate(const QString &password, KSSLAuthAction *aa = NULL);
47 static KSSLPKCS12* getDefaultCertificate(KSSLAuthAction *aa = NULL);
48 static bool hasCertificateByName(const QString &name);
49
50
51 /*
52 * These set the default certificate for hosts without a policy.
53 */
54 static void setDefaultCertificate(const QString &name, bool send = true, bool prompt = false);
55 static void setDefaultCertificate(KSSLPKCS12 *cert, bool send = true, bool prompt = false);
56
57
58 /*
59 * These set the default certificate for a host.
60 */
61 static void setDefaultCertificate(const QString &name, const QString &host, bool send = true, bool prompt = false);
62 static void setDefaultCertificate(KSSLPKCS12 *cert, const QString &host, bool send = true, bool prompt = false);
63
64 /*
65 * These add a certificate to the repository.
66 * Returns: true on success, false error
67 */
68 static bool addCertificate(const QString &filename, const QString &password, bool storePass = false);
69 static bool addCertificate(KSSLPKCS12 *cert, const QString &passToStore = QString());
70
71 /*
72 * These deletes a certificate from the repository.
73 * Returns: true on success, false error
74 */
75 static bool deleteCertificate(const QString &filename, const QString &password);
76 static bool deleteCertificate(KSSLPKCS12 *cert);
77 static bool deleteCertificateByName(const QString &name);
78
79 /*
80 * Returns the list of certificates available
81 */
82 static QStringList getCertificateList();
83
84private:
85 class KSSLCertificateHomePrivate;
86 KSSLCertificateHomePrivate* d;
87};
88
89#endif
90
KSSLCertificateHome
Definition: ksslcertificatehome.h:31
KSSLCertificateHome::KSSLAuthAction
KSSLAuthAction
Definition: ksslcertificatehome.h:36
KSSLCertificate
KDE X.509 Certificate.
Definition: ksslcertificate.h:75
KSSLPKCS12
KDE PKCS#12 Certificate.
Definition: ksslpkcs12.h:63
kio_export.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