ksslsettings.h

00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2000-2003 George Staikos <staikos@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef _KSSLSETTINGS_H
00022 #define _KSSLSETTINGS_H
00023 
00024 #include <qstring.h>
00025 #include <qvaluelist.h>
00026 #include <kconfig.h>
00027 
00028 class KSSLSettingsPrivate;
00029 
00039 class KIO_EXPORT KSSLSettings {
00040 public:
00046     KSSLSettings(bool readConfig = true);
00047 
00051     ~KSSLSettings();
00052 
00057     bool sslv2() const;
00058 
00063     bool sslv3() const;
00064 
00069     bool tlsv1() const;
00070 
00075     bool warnOnEnter() const;
00076 
00083     void setWarnOnEnter(bool x);
00084     
00090     bool warnOnUnencrypted() const;
00091 
00097     void setWarnOnUnencrypted(bool x);
00098 
00103     bool warnOnLeave() const;
00104 
00111     void setWarnOnLeave(bool x);
00112     
00117     bool warnOnMixed() const;
00118 
00123     bool warnOnSelfSigned() const KDE_DEPRECATED;
00124 
00129     bool warnOnRevoked() const KDE_DEPRECATED;
00130 
00135     bool warnOnExpired() const KDE_DEPRECATED;
00136 
00141     bool useEGD() const;
00142 
00147     bool useEFile() const;
00148   
00153     void setTLSv1(bool enabled);
00154   
00159     void setSSLv2(bool enabled);
00160   
00165     void setSSLv3(bool enabled);
00166 
00172     bool autoSendX509() const;
00173 
00179     bool promptSendX509() const;
00180 
00186     QString getCipherList();
00187 
00193     QString& getEGDPath();
00194 
00198     void load();
00199 
00203     void defaults();
00204 
00208     void save();
00209 
00210 private:
00211     KConfig *m_cfg;
00212     bool m_bUseSSLv2, m_bUseSSLv3, m_bUseTLSv1;
00213     bool m_bWarnOnEnter, m_bWarnOnUnencrypted, m_bWarnOnLeave, m_bWarnOnMixed;
00214     bool m_bWarnSelfSigned, m_bWarnRevoked, m_bWarnExpired;
00215 
00216     QValueList<QString> v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers;
00217     QValueList<int> v2bits, v3bits;
00218 
00219     KSSLSettingsPrivate *d;
00220 };
00221 
00222 
00223 #endif
00224 
KDE Home | KDE Accessibility Home | Description of Access Keys