KIO
kssl.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 _KSSL_H
00022 #define _KSSL_H
00023
00024 #include <ksslsettings.h>
00025 #include <ksslpeerinfo.h>
00026 #include <ksslconnectioninfo.h>
00027
00028 class QIODevice;
00029 class KSSLPrivate;
00030 class KSSLPKCS12;
00031 class KSSLSession;
00032
00042 class KIO_EXPORT KSSL {
00043 public:
00050 KSSL(bool init = true);
00051
00057 ~KSSL();
00058
00064 static bool doesSSLWork();
00065
00074 bool initialize();
00075
00082 bool TLSInit();
00083
00094 bool setSession(const KSSLSession *session);
00095
00099 void close();
00100
00110 bool reInitialize();
00111
00121 bool reconfig();
00122
00132 void setAutoReconfig(bool ar);
00133
00141 int seedWithEGD();
00142
00151 bool setSettings(KSSLSettings *settings);
00152
00159 KSSLSettings * settings();
00160
00170 bool setClientCertificate(KSSLPKCS12 *pkcs);
00171
00178 void setPeerHost(const QString& realHost = QString());
00179
00189 int connect(int sock);
00190 int connect(QIODevice* sock);
00191
00201 int accept(int sock);
00202 int accept(QIODevice* sock);
00203
00211 int read(char *buf, int len);
00212
00220 int peek(char *buf, int len);
00221
00230 int write(const char *buf, int len);
00231
00237 int pending();
00238
00246 KSSLConnectionInfo& connectionInfo();
00247
00255 KSSLPeerInfo& peerInfo();
00256
00266 const KSSLSession* session() const;
00267
00273 bool reusingSession() const;
00274
00275 private:
00276 static bool m_bSSLWorks;
00277 bool m_bInit;
00278 bool m_bAutoReconfig;
00279 KSSLSettings *m_cfg;
00280 KSSLConnectionInfo m_ci;
00281 KSSLPeerInfo m_pi;
00282
00283 KSSLPrivate *d;
00284
00285 void setConnectionInfo();
00286 void setPeerInfo();
00287 };
00288
00289
00290 #endif
00291