kio Library API Documentation

KSSLPKCS12 Class Reference

KDE PKCS#12 Certificate KDE PKCS#12 Certificate. More...

#include <ksslpkcs12.h>

List of all members.

Public Methods

virtual ~KSSLPKCS12 ()
QString name ()
QString toString ()
void setCert (PKCS12 *c)
bool changePassword (QString pold, QString pnew)
EVP_PKEY * getPrivateKey ()
KSSLCertificategetCertificate ()
bool toFile (QString filename)
KSSLCertificate::KSSLValidation validate ()
KSSLCertificate::KSSLValidation validate (KSSLCertificate::KSSLPurpose p)
KSSLCertificate::KSSLValidation revalidate ()
KSSLCertificate::KSSLValidation revalidate (KSSLCertificate::KSSLPurpose p)
bool isValid ()
bool isValid (KSSLCertificate::KSSLPurpose p)

Static Public Methods

KSSLPKCS12 * fromString (QString base64, QString password="")
KSSLPKCS12 * loadCertFile (QString filename, QString password="")


Detailed Description

KDE PKCS#12 Certificate KDE PKCS#12 Certificate.

As of yet, this class is being defined. if you use it, let it be known that BC will break on you until this message is removed.

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

Definition at line 57 of file ksslpkcs12.h.


Constructor & Destructor Documentation

KSSLPKCS12::~KSSLPKCS12   [virtual]
 

Destroy this PKCS#12 certificate.

Definition at line 58 of file ksslpkcs12.cc.

References KOpenSSLProxy::EVP_PKEY_free(), KOpenSSLProxy::PKCS12_free(), and KOpenSSLProxy::X509_free().


Member Function Documentation

QString KSSLPKCS12::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 279 of file ksslpkcs12.cc.

References KSSLCertificate::getSubject().

KSSLPKCS12 * KSSLPKCS12::fromString QString    base64,
QString    password = ""
[static]
 

Create a KSSLPKCS12 object from a Base64 in a QString.

Parameters:
base64  the base64 encoded certificate
password  a password for the certificate if encrypted
Returns:
the PKCS#12 object, or NULL on failure.

Definition at line 75 of file ksslpkcs12.cc.

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

KSSLPKCS12 * KSSLPKCS12::loadCertFile QString    filename,
QString    password = ""
[static]
 

Create a KSSLPKCS12 object by reading a PKCS#12 file.

Parameters:
filename  the filename of the certificate
password  a password for the certificate if encrypted
Returns:
the PKCS#12 object, or NULL on failure.

Definition at line 93 of file ksslpkcs12.cc.

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

Referenced by fromString().

QString KSSLPKCS12::toString  
 

Convert to a Base64 string.

Returns:
the certificate in base64 form

Definition at line 196 of file ksslpkcs12.cc.

References KCodecs::base64Encode(), and KOpenSSLProxy::i2d_PKCS12().

void KSSLPKCS12::setCert PKCS12 *    c
 

Raw set the PKCS12 object.

Parameters:
c  the openssl PKCS12 object

Definition at line 126 of file ksslpkcs12.cc.

Referenced by loadCertFile().

bool KSSLPKCS12::changePassword QString    pold,
QString    pnew
 

Change the password of the PKCS#12 in memory.

Parameters:
pold  the old password
pnew  the new password
Returns:
true on success

Definition at line 133 of file ksslpkcs12.cc.

References QString::latin1(), and KOpenSSLProxy::PKCS12_newpass().

EVP_PKEY * KSSLPKCS12::getPrivateKey  
 

Get the private key.

Returns:
the internal OpenSSL private key format

Definition at line 186 of file ksslpkcs12.cc.

Referenced by KSSL::setClientCertificate().

KSSLCertificate * KSSLPKCS12::getCertificate  
 

Get the X.509 certificate.

Returns:
the X.509 certificate for the PKCS#12 object, or NULL

Definition at line 191 of file ksslpkcs12.cc.

Referenced by KSSL::setClientCertificate().

bool KSSLPKCS12::toFile QString    filename
 

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

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

Definition at line 217 of file ksslpkcs12.cc.

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

KSSLCertificate::KSSLValidation KSSLPKCS12::validate  
 

Check the X.509 and private key to make sure they're valid.

Returns:
the result of the validation
See also:
KSSLCertificate

Definition at line 240 of file ksslpkcs12.cc.

Referenced by isValid().

KSSLCertificate::KSSLValidation KSSLPKCS12::validate KSSLCertificate::KSSLPurpose    p
 

Check the X.509 and private key to make sure they're valid.

Parameters:
p  the purpose to validate for
Returns:
the result of the validation
See also:
KSSLCertificate

Definition at line 245 of file ksslpkcs12.cc.

References KSSLCertificate::getCert(), KSSLCertificate::validate(), and KOpenSSLProxy::X509_check_private_key().

KSSLCertificate::KSSLValidation KSSLPKCS12::revalidate  
 

Check the X.509 and private key to make sure they're valid.

Ignore any cached validation result.

Returns:
the result of the validation
See also:
KSSLCertificate

Definition at line 259 of file ksslpkcs12.cc.

KSSLCertificate::KSSLValidation KSSLPKCS12::revalidate KSSLCertificate::KSSLPurpose    p
 

Check the X.509 and private key to make sure they're valid.

Ignore any cached validation result.

Parameters:
p  the purpose to validate for
Returns:
the result of the validation
See also:
KSSLCertificate

Definition at line 264 of file ksslpkcs12.cc.

References KSSLCertificate::revalidate().

bool KSSLPKCS12::isValid  
 

Check if the X.509 and private key are valid.

Returns:
true if valid

Definition at line 269 of file ksslpkcs12.cc.

bool KSSLPKCS12::isValid KSSLCertificate::KSSLPurpose    p
 

Check if the X.509 and private key are valid.

Parameters:
p  the purpose to validate for
Returns:
true if valid

Definition at line 274 of file ksslpkcs12.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.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 22 14:24:20 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003