|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KSSL
public class KSSL
KDE SSL Wrapper Class This class implements KDE's SSL support by wrapping OpenSSL.
KExtendedSocket
,
TCPSlaveBase
Constructor Summary | |
---|---|
|
KSSL()
|
|
KSSL(boolean init)
Construct a KSSL object |
protected |
KSSL(java.lang.Class dummy)
|
Method Summary | |
---|---|
int |
accept(int sock)
Connect the SSL session to the remote host using the provided socket descriptor. |
void |
close()
Close the SSL session. |
int |
connect(int sock)
Connect the SSL session to the remote host using the provided socket descriptor. |
KSSLConnectionInfo |
connectionInfo()
Obtain a reference to the connection information. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
static boolean |
doesSSLWork()
Determine if SSL is available and works. |
protected void |
finalize()
Deletes the wrapped C++ instance |
boolean |
initialize()
Initialize OpenSSL. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
KSSLPeerInfo |
peerInfo()
Obtain a reference to the information about the peer. |
int |
pending()
Determine if data is waiting to be read. |
boolean |
reconfig()
Trigger a reread of KSSL configuration and reInitialize() KSSL. |
boolean |
reInitialize()
Reinitialize OpenSSL. |
boolean |
reusingSession()
Determine if we are currently reusing an SSL session ID. |
int |
seedWithEGD()
This will reseed the pseudo-random number generator with the EGD (entropy gathering daemon) if the EGD is configured and enabled. |
KSSLSession |
session()
Obtain a pointer to the session information. |
void |
setAutoReconfig(boolean ar)
Enable or disable automatic reconfiguration on initialize(). |
boolean |
setClientCertificate(KSSLPKCS12 pkcs)
Use this to set the certificate to send to the server. |
void |
setPeerHost()
|
void |
setPeerHost(java.lang.String realHost)
Set the peer hostname to be used for certificate verification. |
boolean |
setSession(KSSLSession session)
Set an SSL session to use. |
boolean |
setSettings(KSSLSettings settings)
Set a new KSSLSettings instance as the settings. |
KSSLSettings |
settings()
One is built by the constructor, so this will only return a NULL pointer if you set one with setSettings(). |
boolean |
TLSInit()
This is used for applicationss which do STARTTLS or something similar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KSSL(java.lang.Class dummy)
public KSSL(boolean init)
init
- Set this to false if you do not want this class to
immediately initialize OpenSSL.public KSSL()
Method Detail |
---|
public boolean initialize()
reInitialize()
public boolean TLSInit()
public boolean setSession(KSSLSession session)
session
- A valid session to reuse. If null, it will clear the
session ID in memory.
public void close()
public boolean reInitialize()
initialize()
public boolean reconfig()
setAutoReconfig(boolean)
public void setAutoReconfig(boolean ar)
ar
- Set 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.public int seedWithEGD()
public boolean setSettings(KSSLSettings settings)
settings
- A new, valid settings object.
public KSSLSettings settings()
public boolean setClientCertificate(KSSLPKCS12 pkcs)
pkcs
- the valid PKCS#12 object to send.
public void setPeerHost(java.lang.String realHost)
realHost
- the remote hostname as the user believes to be
connecting topublic void setPeerHost()
public int connect(int sock)
sock
- the socket descriptor to connect with. This must be
an already connected socket.
public int accept(int sock)
sock
- the socket descriptor to connect with. This must be
an already connected socket.
public int pending()
public KSSLConnectionInfo connectionInfo()
KSSLConnectionInfo
public KSSLPeerInfo peerInfo()
KSSLPeerInfo
public KSSLSession session()
KSSLSession
public boolean reusingSession()
public static boolean doesSSLWork()
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |