KIO
Go to the documentation of this file.
24 #include <ksslconfig.h>
26 #include <sys/types.h>
33 #include <QtCore/QFile>
43 #define crypt _openssl_crypt
44 #include <openssl/ssl.h>
51 #define sk_new d->kossl->sk_new
52 #define sk_push d->kossl->sk_push
53 #define sk_free d->kossl->sk_free
54 #define sk_value d->kossl->sk_value
55 #define sk_num d->kossl->sk_num
56 #define sk_dup d->kossl->sk_dup
57 #define sk_pop d->kossl->sk_pop
62 CipherNode(
const char *_name,
int _keylen) :
63 name(_name), keylen(_keylen) {}
67 {
return ((x.keylen == keylen) && (x.name == name)); }
68 inline int operator< (CipherNode &x) {
return keylen < x.keylen; }
69 inline int operator<=(CipherNode &x) {
return keylen <= x.keylen; }
70 inline int operator> (CipherNode &x) {
return keylen > x.keylen; }
71 inline int operator>=(CipherNode &x) {
return keylen >= x.keylen; }
75 class KSSLSettingsPrivate {
77 KSSLSettingsPrivate() {
80 ~KSSLSettingsPrivate() {
99 :d(new KSSLSettingsPrivate)
103 if (!
KGlobal::dirs()->addResourceType(
"kssl",
"data",
"kssl")) {
129 m_bWarnOnEnter = cfg.
readEntry(
"OnEnter",
false);
130 m_bWarnOnLeave = cfg.
readEntry(
"OnLeave",
true);
131 m_bWarnOnUnencrypted = cfg.
readEntry(
"OnUnencrypted",
false);
132 m_bWarnOnMixed = cfg.
readEntry(
"OnMixed",
true);
135 m_bWarnSelfSigned = cfg.
readEntry(
"WarnSelfSigned",
true);
136 m_bWarnExpired = cfg.
readEntry(
"WarnExpired",
true);
137 m_bWarnRevoked = cfg.
readEntry(
"WarnRevoked",
true);
140 d->m_bUseEGD = cfg.
readEntry(
"UseEGD",
false);
141 d->m_bUseEFile = cfg.
readEntry(
"UseEFile",
false);
145 d->m_bSendX509 = (
"send" == cfg.
readEntry(
"AuthMethod",
""));
146 d->m_bPromptX509 = (
"prompt" == cfg.
readEntry(
"AuthMethod",
""));
157 m_bWarnOnEnter =
false;
158 m_bWarnOnLeave =
true;
159 m_bWarnOnUnencrypted =
true;
160 m_bWarnOnMixed =
true;
161 m_bWarnSelfSigned =
true;
162 m_bWarnExpired =
true;
163 m_bWarnRevoked =
true;
164 d->m_bUseEGD =
false;
165 d->m_bUseEFile =
false;
174 cfg.
writeEntry(
"OnUnencrypted", m_bWarnOnUnencrypted);
178 cfg.
writeEntry(
"WarnSelfSigned", m_bWarnSelfSigned);
179 cfg.
writeEntry(
"WarnExpired", m_bWarnExpired);
180 cfg.
writeEntry(
"WarnRevoked", m_bWarnRevoked);
191 cfg.setGroup(
"SSLv3");
192 for (
unsigned int i = 0; i < v3ciphers.count(); i++) {
194 ciphername.sprintf(
"cipher_%s", v3ciphers[i].ascii());
195 if (v3selectedciphers.contains(v3ciphers[i])) {
203 QString cfgName(
KGlobal::dirs()->findResource(
"config",
"cryptodefaults"));
204 if (!cfgName.isEmpty())
bool warnOnMixed() const
Does the user want to be warned during mixed SSL/non-SSL mode.
bool warnOnEnter() const
Does the user want to be warned on entering SSL mode.
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString getCipherList()
Get the OpenSSL cipher list for selecting the list of ciphers to use in a connection.
bool autoSendX509() const
Does the user want X.509 client certificates to always be sent when possible?
void writePathEntry(const char *pKey, const QString &path, WriteConfigFlags pFlags=Normal)
TsConfig readConfig(const QString &fname)
QString & getEGDPath()
Get the configured path to the entropy gathering daemon or entropy file.
void reparseConfiguration()
int chmod(const QString &path, mode_t mode)
void setWarnOnEnter(bool x)
Change the user's warnOnEnter() setting.
bool warnOnUnencrypted() const
Does the user want to be warned on sending unencrypted data.
void defaults()
Revert to default settings.
bool useEFile() const
Does the user want to use an entropy file?
~KSSLSettings()
Destroy this KSSL Settings object.
void setWarnOnUnencrypted(bool x)
Change the user's warnOnUnencrypted() setting.
bool useEGD() const
Does the user want to use the Entropy Gathering Daemon?
bool warnOnLeave() const
Does the user want to be warned on leaving SSL mode.
bool promptSendX509() const
Does the user want to be prompted to send X.509 client certificates when possible?
void setWarnOnLeave(bool x)
Change the user's warnOnLeave() setting.
const char * name(StandardAction id)
QString readPathEntry(const char *key, const QString &aDefault) const
void save()
Save the current settings.
int operator==(KSSLCertificate &x, KSSLCertificate &y)
KSSLSettings(bool readConfig=true)
Construct a KSSL Settings object.
QString readEntry(const char *key, const char *aDefault=0) const
void load()
Load the user's settings.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by
doxygen 1.8.20 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.