#include <kssl.h>

Public Member Functions

 KSSL (bool init=true)
 ~KSSL ()
void close ()
bool initialize ()
bool reconfig ()
bool reInitialize ()
int seedWithEGD ()
void setAutoReconfig (bool ar)
bool setSession (const KSSLSession *session)
bool setSettings (KSSLSettings *settings)
KSSLSettingssettings ()
bool TLSInit ()

Static Public Member Functions

static bool doesSSLWork ()

Detailed Description

KDE SSL Wrapper Class.

This class implements KDE's SSL support by wrapping OpenSSL.

George Staikos staik[email protected][email protected][email protected]de.or[email protected]g
See also
KExtendedSocket, TCPSlaveBase KDE SSL Class

Definition at line 40 of file kssl.h.

Constructor & Destructor Documentation

KSSL::KSSL ( bool  init = true)

Construct a KSSL object.

initSet this to false if you do not want this class to immediately initialize OpenSSL.

Definition at line 67 of file kssl.cpp.


Destroy this KSSL object.

Does not close any socket.

Definition at line 82 of file kssl.cpp.

Member Function Documentation

void KSSL::close ( )

Close the SSL session.

Definition at line 146 of file kssl.cpp.

bool KSSL::doesSSLWork ( )

Determine if SSL is available and works.

true is SSL is available and usable

Definition at line 206 of file kssl.cpp.

bool KSSL::initialize ( )

Initialize OpenSSL.

true on success

This will do nothing if it is already initialized.

See also

Definition at line 112 of file kssl.cpp.

bool KSSL::reconfig ( )

Trigger a reread of KSSL configuration and reInitialize() KSSL.

true on successful reinitalizations

If you setAutoReconfig() to false, then this will simply reInitialize() and not read in the new configuration.

See also

Definition at line 178 of file kssl.cpp.

bool KSSL::reInitialize ( )

Reinitialize OpenSSL.

true on success

This is not generally needed unless you are reusing the KSSL object for a new session.

See also

Definition at line 169 of file kssl.cpp.

int KSSL::seedWithEGD ( )

This will reseed the pseudo-random number generator with the EGD (entropy gathering daemon) if the EGD is configured and enabled.

You don't need to call this yourself normally.

0 on success

Definition at line 89 of file kssl.cpp.

void KSSL::setAutoReconfig ( bool  ar)

Enable or disable automatic reconfiguration on initialize().

arSet to false in order to disable auto-reloading of the KSSL configuration during initialize().

By default, KSSL will read its configuration on initialize(). You might want to disable this for performance reasons.

Definition at line 183 of file kssl.cpp.

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().

sessionA valid session to reuse. If 0L, it will clear the session ID in memory.
true on success
bool KSSL::setSettings ( KSSLSettings settings)

Set a new KSSLSettings instance as the settings.

This deletes the current instance of KSSLSettings.

settingsA new, valid settings object.
true on success

Definition at line 188 of file kssl.cpp.

KSSLSettings * KSSL::settings ( )

One is built by the constructor, so this will only return a NULL pointer if you set one with setSettings().

the current settings instance

Definition at line 195 of file kssl.cpp.

bool KSSL::TLSInit ( )

This is used for applicationss which do STARTTLS or something similar.

It creates a TLS method regardless of the user's settings.

true if TLS is successfully initialized

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 23:02:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.