KIO
ksslcertificatehome.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KSSLCERTIFICATEHOME_H
00022 #define _KSSLCERTIFICATEHOME_H
00023
00024 class KSSLCertificate;
00025 class KSSLPKCS12;
00026 #include <QtCore/QString>
00027 #include <QtCore/QStringList>
00028
00029 #include <kio/kio_export.h>
00030
00031 class KIO_EXPORT KSSLCertificateHome {
00032
00033 public:
00034
00035
00036 enum KSSLAuthAction {AuthNone, AuthSend, AuthPrompt, AuthDont};
00037
00038
00039
00040
00041 static KSSLPKCS12* getCertificateByHost(const QString &host, const QString &password, KSSLAuthAction* aa);
00042 static KSSLPKCS12* getCertificateByName(const QString &name, const QString &password);
00043 static KSSLPKCS12* getCertificateByName(const QString &name);
00044 static QString getDefaultCertificateName(const QString &host, KSSLAuthAction *aa = NULL);
00045 static QString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
00046 static KSSLPKCS12* getDefaultCertificate(const QString &password, KSSLAuthAction *aa = NULL);
00047 static KSSLPKCS12* getDefaultCertificate(KSSLAuthAction *aa = NULL);
00048 static bool hasCertificateByName(const QString &name);
00049
00050
00051
00052
00053
00054 static void setDefaultCertificate(const QString &name, bool send = true, bool prompt = false);
00055 static void setDefaultCertificate(KSSLPKCS12 *cert, bool send = true, bool prompt = false);
00056
00057
00058
00059
00060
00061 static void setDefaultCertificate(const QString &name, const QString &host, bool send = true, bool prompt = false);
00062 static void setDefaultCertificate(KSSLPKCS12 *cert, const QString &host, bool send = true, bool prompt = false);
00063
00064
00065
00066
00067
00068 static bool addCertificate(const QString &filename, const QString &password, bool storePass = false);
00069 static bool addCertificate(KSSLPKCS12 *cert, const QString &passToStore = QString());
00070
00071
00072
00073
00074
00075 static bool deleteCertificate(const QString &filename, const QString &password);
00076 static bool deleteCertificate(KSSLPKCS12 *cert);
00077 static bool deleteCertificateByName(const QString &name);
00078
00079
00080
00081
00082 static QStringList getCertificateList();
00083
00084 private:
00085 class KSSLCertificateHomePrivate;
00086 KSSLCertificateHomePrivate* d;
00087 };
00088
00089 #endif
00090