kssl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KSSL_H
00022 #define _KSSL_H
00023
00024 #include <ksslsettings.h>
00025 #include <ksslpeerinfo.h>
00026 #include <ksslconnectioninfo.h>
00027
00028 class KSSLPrivate;
00029 class KSSLCertificate;
00030 class KSSLPKCS12;
00031
00032 class KSSL {
00033
00034 public:
00035 KSSL(bool init = true);
00036
00037 ~KSSL();
00038
00039 static bool doesSSLWork();
00040
00041
00042 bool initialize();
00043
00048 bool TLSInit();
00049
00050 void close();
00051 bool reInitialize();
00052
00053 bool reconfig();
00054 void setAutoReconfig(bool ar);
00055
00060 int seedWithEGD();
00061
00066 bool setSettings(KSSLSettings *settings);
00067
00072 KSSLSettings * settings() { return m_cfg; }
00073
00080 bool setClientCertificate(KSSLPKCS12 *pkcs);
00081
00088
00089 void setProxyUse(bool active, QString realIP = QString::null, int realPort = 0, QString proxy = QString::null);
00090
00091 void setPeerHost(QString realHost = QString::null);
00092
00093 int connect(int sock);
00094 int accept(int sock);
00095
00096 int read(void *buf, int len);
00097 int peek(void *buf, int len);
00098 int write(const void *buf, int len);
00099
00100 int pending();
00101
00102 KSSLConnectionInfo& connectionInfo();
00103 KSSLPeerInfo& peerInfo();
00104
00105 private:
00106 static bool m_bSSLWorks;
00107 bool m_bInit;
00108 bool m_bAutoReconfig;
00109 KSSLSettings *m_cfg;
00110 KSSLConnectionInfo m_ci;
00111 KSSLPeerInfo m_pi;
00112
00113 KSSLPrivate *d;
00114
00115 void setConnectionInfo();
00116 void setPeerInfo();
00117 bool setVerificationLogic();
00118 };
00119
00120
00121 #endif
00122
This file is part of the documentation for kdelibs Version 3.1.4.