kio
KSSL Class Reference
KDE SSL Wrapper Class. More...
#include <kssl.h>
Public Member Functions | |
int | accept (int sock) |
void | close () |
int | connect (int sock) |
KSSLConnectionInfo & | connectionInfo () |
bool | initialize () |
KSSL (bool init=true) | |
int | peek (void *buf, int len) |
KSSLPeerInfo & | peerInfo () |
int | pending () |
int | read (void *buf, int len) |
bool | reconfig () |
bool | reInitialize () |
bool | reusingSession () const |
int | seedWithEGD () |
const KSSLSession * | session () const |
void | setAutoReconfig (bool ar) |
bool | setClientCertificate (KSSLPKCS12 *pkcs) |
void | setPeerHost (QString realHost=QString::null) |
void | setProxyUse (bool active, QString realIP=QString::null, int realPort=0, QString proxy=QString::null) KDE_DEPRECATED |
bool | setSession (const KSSLSession *session) |
bool | setSettings (KSSLSettings *settings) |
KSSLSettings * | settings () |
bool | TLSInit () |
int | write (const void *buf, int len) |
~KSSL () | |
Static Public Member Functions | |
static bool | doesSSLWork () |
Detailed Description
KDE SSL Wrapper Class.This class implements KDE's SSL support by wrapping OpenSSL.
- See also:
- KExtendedSocket, TCPSlaveBase KDE SSL Class
Definition at line 42 of file kssl.h.
Constructor & Destructor Documentation
KSSL::KSSL | ( | bool | init = true |
) |
KSSL::~KSSL | ( | ) |
Member Function Documentation
int KSSL::accept | ( | int | sock | ) |
Connect the SSL session to the remote host using the provided socket descriptor.
This is for use with an SSL server application.
- Parameters:
-
sock the socket descriptor to connect with. This must be an already connected socket.
- Returns:
- 1 on success, 0 on error setting the file descriptor, -1 on other error.
int KSSL::connect | ( | int | sock | ) |
KSSLConnectionInfo & KSSL::connectionInfo | ( | ) |
Obtain a reference to the connection information.
- Returns:
- a reference to the connection information, valid after connected
- See also:
- KSSLConnectionInfo
bool KSSL::doesSSLWork | ( | ) | [static] |
bool KSSL::initialize | ( | ) |
Initialize OpenSSL.
- Returns:
- true on success
- See also:
- reInitialize
int KSSL::peek | ( | void * | buf, | |
int | len | |||
) |
KSSLPeerInfo & KSSL::peerInfo | ( | ) |
Obtain a reference to the information about the peer.
- Returns:
- a reference to the peer information, valid after connected
- See also:
- KSSLPeerInfo
int KSSL::pending | ( | ) |
int KSSL::read | ( | void * | buf, | |
int | len | |||
) |
bool KSSL::reconfig | ( | ) |
Trigger a reread of KSSL configuration and reInitialize() KSSL.
- Returns:
- true on successful reinitalizations
- See also:
- setAutoReconfig
bool KSSL::reInitialize | ( | ) |
Reinitialize OpenSSL.
- Returns:
- true on success
- See also:
- initialize
bool KSSL::reusingSession | ( | ) | const |
int KSSL::seedWithEGD | ( | ) |
const KSSLSession * KSSL::session | ( | ) | const |
Obtain a pointer to the session information.
- Returns:
- a pointer to the session information. This is valid after connected, while connected. It is deleted by the KSSL object which returns it. May return 0L if no valid session exists.
- See also:
- KSSLSession
void KSSL::setAutoReconfig | ( | bool | ar | ) |
Enable or disable automatic reconfiguration on initialize().
- Parameters:
-
ar Set to false in order to disable auto-reloading of the KSSL configuration during initialize().
bool KSSL::setClientCertificate | ( | KSSLPKCS12 * | pkcs | ) |
Use this to set the certificate to send to the server.
Do NOT delete the KSSLPKCS12 object until you are done with the session. It is not defined when KSSL will be done with this.
- Parameters:
-
pkcs the valid PKCS#12 object to send.
- Returns:
- true if the certificate was properly set to the session.
void KSSL::setPeerHost | ( | QString | realHost = QString::null |
) |
void KSSL::setProxyUse | ( | bool | active, | |
QString | realIP = QString::null , |
|||
int | realPort = 0 , |
|||
QString | proxy = QString::null | |||
) |
Set the status of the connection with respect to proxies.
- Parameters:
-
active is not used realIP is the IP address of the host you're connecting to realPort is the port of the host you're connecting to proxy is the IP or hostname of the proxy server
bool KSSL::setSession | ( | const KSSLSession * | session | ) |
Set an SSL session to use.
This deep copies the session so it doesn't have to remain valid. You need to call it after calling initialize or reInitialize. The ID is cleared in close().
- Parameters:
-
session A valid session to reuse. If 0L, it will clear the session ID in memory.
- Returns:
- true on success
bool KSSL::setSettings | ( | KSSLSettings * | settings | ) |
Set a new KSSLSettings instance as the settings.
This deletes the current instance of KSSLSettings.
- Parameters:
-
settings A new, valid settings object.
- Returns:
- true on success
KSSLSettings* KSSL::settings | ( | ) | [inline] |
One is built by the constructor, so this will only return a NULL pointer if you set one with setSettings().
- Returns:
- the current settings instance
bool KSSL::TLSInit | ( | ) |
int KSSL::write | ( | const void * | buf, | |
int | len | |||
) |
The documentation for this class was generated from the following files: