org.kde.koala
Class KSSLPKCS7

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

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

KDE PKCS#7 Certificate This class represents a PKCS#7 certificate

Author:
George Staikos
See Also:
KSSL

Constructor Summary
  KSSLPKCS7()
           
protected KSSLPKCS7(java.lang.Class dummy)
           
 
Method Summary
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
static KSSLPKCS7 fromString(java.lang.String base64)
          Create a KSSLPKCS7 object from a Base64 in a String.
 KSSLCertificate getCertificate()
          Get the bottom level X.509 certificate.
 KSSLCertChain getChain()
          Get the certificate chain.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isValid()
          Return true if the chain is valid.
static KSSLPKCS7 loadCertFile(java.lang.String filename)
          Create a KSSLPKCS7 object by reading a PKCS#7 file.
 java.lang.String name()
          The name of this certificate.
 boolean toFile(java.lang.String filename)
          Write the PKCS#7 to a file in raw mode.
 java.lang.String toString()
          Convert to a Base64 string.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KSSLPKCS7

protected KSSLPKCS7(java.lang.Class dummy)

KSSLPKCS7

public KSSLPKCS7()
Method Detail

name

public java.lang.String name()
The name of this certificate. This can be used to refer to the certificate instead of passing the object itself.

Returns:
the name of the certificate

toString

public java.lang.String toString()
Convert to a Base64 string.

Overrides:
toString in class java.lang.Object
Returns:
the PKCS#7 object in base64 form

getCertificate

public KSSLCertificate getCertificate()
Get the bottom level X.509 certificate.

Returns:
the certificate, or NULL on failure
See Also:
KSSLCertificate

getChain

public KSSLCertChain getChain()
Get the certificate chain.

Returns:
the certificate chain
See Also:
KSSLCertChain

toFile

public boolean toFile(java.lang.String filename)
Write the PKCS#7 to a file in raw mode.

Parameters:
filename - the filename to write
Returns:
true on success

isValid

public boolean isValid()
Return true if the chain is valid.


fromString

public static KSSLPKCS7 fromString(java.lang.String base64)
Create a KSSLPKCS7 object from a Base64 in a String.

Parameters:
base64 - the base64 representation of the certificate
Returns:
a PKCS#7 object, or NULL on failure

loadCertFile

public static KSSLPKCS7 loadCertFile(java.lang.String filename)
Create a KSSLPKCS7 object by reading a PKCS#7 file.

Parameters:
filename - the filename to read the certificate from
Returns:
a PKCS#7 object, or NULL on failure

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?