org.kde.koala
Class KSSLSigners

java.lang.Object
  extended by org.kde.koala.KSSLSigners
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KSSLSigners
extends java.lang.Object
implements org.kde.qt.QtSupport

KDE SSL Signer Database This class is used to manipulate the KDE SSL signer database. It communicates to the KDE SSL daemon via dcop for backend integration.

Author:
George Staikos
See Also:
KSSL, KSSLCertificate

Constructor Summary
  KSSLSigners()
          Construct a KSSLSigner object.
protected KSSLSigners(java.lang.Class dummy)
           
 
Method Summary
 boolean addCA(KSSLCertificate cert, boolean ssl, boolean email, boolean code)
          Add a signer to the database.
 boolean addCA(java.lang.String cert, boolean ssl, boolean email, boolean code)
          Add a signer to the database.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 java.lang.String getCert(java.lang.String subject)
          Get a signer certificate from the database.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 java.util.ArrayList list()
          List the signers in the database.
 boolean regenerate()
          Regenerate the signer-root file from the user's settings.
 boolean remove(KSSLCertificate cert)
          Remove a certificate signer from the database
 boolean remove(java.lang.String subject)
          Remove a certificate signer from the database
 boolean setUse(java.lang.String subject, boolean ssl, boolean email, boolean code)
          Set the use of a particular entry in the certificate signer database.
 boolean useForCode(KSSLCertificate cert)
          Determine if a certificate can be used for code certificate signing
 boolean useForCode(java.lang.String subject)
          Determine if a certificate can be used for code certificate signing
 boolean useForEmail(KSSLCertificate cert)
          Determine if a certificate can be used for S/MIME certificate signing
 boolean useForEmail(java.lang.String subject)
          Determine if a certificate can be used for S/MIME certificate signing
 boolean useForSSL(KSSLCertificate cert)
          Determine if a certificate can be used for SSL certificate signing
 boolean useForSSL(java.lang.String subject)
          Determine if a certificate can be used for SSL certificate signing
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KSSLSigners

protected KSSLSigners(java.lang.Class dummy)

KSSLSigners

public KSSLSigners()
Construct a KSSLSigner object.

Method Detail

addCA

public boolean addCA(KSSLCertificate cert,
                     boolean ssl,
                     boolean email,
                     boolean code)
Add a signer to the database.

Parameters:
cert - the signer's certificate
ssl - allow it to sign for SSL
email - allow it to sign for S/MIME
code - allow it to sign for code signing
Returns:
true on success

addCA

public boolean addCA(java.lang.String cert,
                     boolean ssl,
                     boolean email,
                     boolean code)
Add a signer to the database.

Parameters:
cert - the signer's certificate in base64 form
ssl - allow it to sign for SSL
email - allow it to sign for S/MIME
code - allow it to sign for code signing
Returns:
true on success

regenerate

public boolean regenerate()
Regenerate the signer-root file from the user's settings.

Returns:
true on success

useForSSL

public boolean useForSSL(KSSLCertificate cert)
Determine if a certificate can be used for SSL certificate signing

Parameters:
cert - the certificate
Returns:
true if it can be used for SSL

useForSSL

public boolean useForSSL(java.lang.String subject)
Determine if a certificate can be used for SSL certificate signing

Parameters:
subject - the certificate subject
Returns:
true if it can be used for SSL

useForEmail

public boolean useForEmail(KSSLCertificate cert)
Determine if a certificate can be used for S/MIME certificate signing

Parameters:
cert - the certificate
Returns:
true if it can be used for S/MIME

useForEmail

public boolean useForEmail(java.lang.String subject)
Determine if a certificate can be used for S/MIME certificate signing

Parameters:
subject - the certificate subject
Returns:
true if it can be used for S/MIME

useForCode

public boolean useForCode(KSSLCertificate cert)
Determine if a certificate can be used for code certificate signing

Parameters:
cert - the certificate
Returns:
true if it can be used for code

useForCode

public boolean useForCode(java.lang.String subject)
Determine if a certificate can be used for code certificate signing

Parameters:
subject - the certificate subject
Returns:
true if it can be used for code

remove

public boolean remove(KSSLCertificate cert)
Remove a certificate signer from the database

Parameters:
cert - the certificate to remove
Returns:
true on success

remove

public boolean remove(java.lang.String subject)
Remove a certificate signer from the database

Parameters:
subject - the subject of the certificate to remove
Returns:
true on success

list

public java.util.ArrayList list()
List the signers in the database.

Returns:
the list of subjects in the database
See Also:
getCert(java.lang.String)

getCert

public java.lang.String getCert(java.lang.String subject)
Get a signer certificate from the database.

Parameters:
subject - the subject of the certificate desired
Returns:
the base64 encoded certificate

setUse

public boolean setUse(java.lang.String subject,
                      boolean ssl,
                      boolean email,
                      boolean code)
Set the use of a particular entry in the certificate signer database.

Parameters:
subject - the subject of the certificate in question
ssl - allow this for SSL certificate signing
email - allow this for S/MIME certificate signing
code - allow this for code certificate signing
Returns:
true on success

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?