kio Library API Documentation

KSSLPKCS7 Class Reference

KDE PKCS#7 Certificate KDE PKCS#7 Certificate. More...

#include <ksslpkcs7.h>

Collaboration diagram for KSSLPKCS7:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~KSSLPKCS7 ()
QString name ()
QString toString ()
void setCert (PKCS7 *c)
KSSLCertificategetCertificate ()
KSSLCertChaingetChain ()
bool toFile (QString filename)
KSSLCertificate::KSSLValidation validate ()
KSSLCertificate::KSSLValidation revalidate ()
bool isValid ()

Static Public Member Functions

KSSLPKCS7fromString (QString base64)
KSSLPKCS7loadCertFile (QString filename)

Detailed Description

KDE PKCS#7 Certificate KDE PKCS#7 Certificate.

This class represents a PKCS#7 certificate

Author:
George Staikos <staikos@kde.org>
See also:
KSSL

Definition at line 60 of file ksslpkcs7.h.


Constructor & Destructor Documentation

KSSLPKCS7::~KSSLPKCS7  )  [virtual]
 

Destroy this PKCS#7 certificate.

Definition at line 55 of file ksslpkcs7.cc.

References KOpenSSLProxy::PKCS7_free().


Member Function Documentation

QString KSSLPKCS7::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

Definition at line 191 of file ksslpkcs7.cc.

References KSSLCertificate::getSubject().

KSSLPKCS7 * KSSLPKCS7::fromString QString  base64  )  [static]
 

Create a KSSLPKCS7 object from a Base64 in a QString.

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

Definition at line 63 of file ksslpkcs7.cc.

References KTempFile::close(), KTempFile::file(), fromString(), QString::isEmpty(), QString::latin1(), loadCertFile(), KTempFile::name(), and KTempFile::unlink().

Referenced by fromString().

KSSLPKCS7 * KSSLPKCS7::loadCertFile QString  filename  )  [static]
 

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

Definition at line 81 of file ksslpkcs7.cc.

References QFile::handle(), loadCertFile(), QFile::open(), and setCert().

Referenced by fromString(), and loadCertFile().

QString KSSLPKCS7::toString  ) 
 

Convert to a Base64 string.

Returns:
the PKCS#7 object in base64 form

Definition at line 125 of file ksslpkcs7.cc.

References KOpenSSLProxy::i2d_PKCS7().

void KSSLPKCS7::setCert PKCS7 *  c  ) 
 

Raw set the PKCS7 object.

Parameters:
c the PKCS7 object

Definition at line 105 of file ksslpkcs7.cc.

References setCert().

Referenced by loadCertFile(), and setCert().

KSSLCertificate * KSSLPKCS7::getCertificate  ) 
 

Get the bottom level X.509 certificate.

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

Definition at line 115 of file ksslpkcs7.cc.

KSSLCertChain * KSSLPKCS7::getChain  ) 
 

Get the certificate chain.

Returns:
the certificate chain
See also:
KSSLCertChain

Definition at line 120 of file ksslpkcs7.cc.

bool KSSLPKCS7::toFile QString  filename  ) 
 

Write the PKCS#7 to a file in raw mode.

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

Definition at line 146 of file ksslpkcs7.cc.

References QFile::handle(), KOpenSSLProxy::i2d_PKCS7_fp(), QString::latin1(), QFile::open(), and toFile().

Referenced by toFile().

KSSLCertificate::KSSLValidation KSSLPKCS7::validate  ) 
 

Check the chain to make sure it's valid.

Returns:
the result of the validation procedure

Definition at line 169 of file ksslpkcs7.cc.

References KSSLCertificate::validate().

Referenced by isValid().

KSSLCertificate::KSSLValidation KSSLPKCS7::revalidate  ) 
 

Check the chain to make sure it's valid.

Ignore any cached validation result.

Returns:
the result of the validation
See also:
KSSLCertificate

Definition at line 179 of file ksslpkcs7.cc.

References KSSLCertificate::revalidate().

bool KSSLPKCS7::isValid  ) 
 

Return true if the chain is valid.

Definition at line 186 of file ksslpkcs7.cc.

References validate().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 12 23:16:25 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003