KSSLCertificate Class Reference
KDE X.509 Certificate KDE X.509 Certificate. More...
#include <ksslcertificate.h>
Public Types | |
typedef QValueList< KSSLValidation > | KSSLValidationList |
enum | KSSLValidation { Unknown, Ok, NoCARoot, InvalidPurpose, PathLengthExceeded, InvalidCA, Expired, SelfSigned, ErrorReadingRoot, NoSSL, Revoked, Untrusted, SignatureFailed, Rejected, PrivateKeyFailed, InvalidHost, Irrelevant } |
enum | KSSLPurpose { None = 0, SSLServer = 1, SSLClient = 2, SMIMESign = 3, SMIMEEncrypt = 4, Any = 5 } |
Public Member Functions | |
~KSSLCertificate () | |
QString | toString () |
QString | getSubject () const |
QString | getIssuer () const |
QString | getNotBefore () const |
QString | getNotAfter () const |
QDateTime | getQDTNotBefore () const |
QDateTime | getQDTNotAfter () const |
QByteArray | toDer () |
QByteArray | toPem () |
QByteArray | toNetscape () |
QString | toText () |
QString | getSerialNumber () const |
QString | getKeyType () const |
QString | getPublicKeyText () const |
QString | getMD5DigestText () const |
QString | getSignatureText () const |
bool | isValid () |
bool | isValid (KSSLPurpose p) |
KSSLValidation | validate () |
KSSLValidation | validate (KSSLPurpose p) |
KSSLValidationList | validateVerbose (KSSLPurpose p) |
KSSLValidationList | validateVerbose (KSSLPurpose p, KSSLCertificate *ca) |
KSSLValidation | revalidate () |
KSSLValidation | revalidate (KSSLPurpose p) |
KSSLCertChain & | chain () |
KSSLCertificate * | replicate () |
KSSLCertificate (const KSSLCertificate &x) | |
bool | setCert (QString &cert) |
KSSLX509V3 & | x509V3Extensions () |
bool | isSigner () |
void | getEmails (QStringList &to) const |
QString | getKDEKey () const |
Static Public Member Functions | |
KSSLCertificate * | fromString (QCString cert) |
KSSLCertificate * | fromX509 (X509 *x5) |
QString | verifyText (KSSLValidation x) |
QString | getMD5DigestFromKDEKey (const QString &k) |
Protected Member Functions | |
void | setCert (X509 *c) |
void | setChain (void *c) |
X509 * | getCert () |
KSSLValidation | processError (int ec) |
Friends | |
int | operator== (KSSLCertificate &x, KSSLCertificate &y) |
int | operator!= (KSSLCertificate &x, KSSLCertificate &y) |
Detailed Description
KDE X.509 Certificate KDE X.509 Certificate.This class represents an X.509 (SSL) certificate. Note: this object is VERY HEAVY TO COPY. Please try to use reference or pointer whenever possible
- Author:
- George Staikos <staikos@kde.org>
- See also:
- KSSL
Definition at line 69 of file ksslcertificate.h.
Member Enumeration Documentation
|
A CA certificate can be validated as Irrelevant when it was not used to sign any other relevant certificate. Definition at line 107 of file ksslcertificate.h. Referenced by revalidate(), validate(), and validateVerbose(). |
Constructor & Destructor Documentation
|
Destroy this X.509 certificate. Definition at line 118 of file ksslcertificate.cc. |
|
Copy constructor. Beware, this is very expensive.
References KStandardDirs::addResourceType(), KGlobal::dirs(), KSSLCertChain::rawChain(), and setCert(). Referenced by replicate(). |
Member Function Documentation
|
Create an X.509 certificate from a base64 encoded string.
References KCodecs::base64Decode(), and setCert(). Referenced by Observer::messageBox(), and KSSLCertChain::setCertChain(). |
|
Create an X.509 certificate from the internal representation. This one duplicates the X509 object for itself.
References setCert(). |
|
Convert this certificate to a string.
References KCodecs::base64Encode(), and toDer(). Referenced by KSSLSigners::addCA(), and toPem(). |
|
Get the subject of the certificate (X.509 map).
Referenced by KSSLPeerInfo::certMatchesAddress(), getKDEKey(), KSSLPKCS7::name(), KSSLPKCS12::name(), KSSLSigners::remove(), KSSLInfoDlg::setup(), KSSLSigners::useForCode(), KSSLSigners::useForEmail(), and KSSLSigners::useForSSL(). |
|
Get the issuer of the certificate (X.509 map).
Referenced by KSSLInfoDlg::setup(). |
|
Get the date that the certificate becomes valid on.
|
|
Get the date that the certificate is valid until.
|
|
Get the date that the certificate becomes valid on.
|
|
Get the date that the certificate is valid until.
|
|
Convert the certificate to DER (ASN.1) format.
Referenced by toString(). |
|
Convert the certificate to PEM (base64) format.
References toString(). |
|
Convert the certificate to Netscape format.
References KTempFile::close(), KTempFile::fstream(), KTempFile::name(), and KTempFile::unlink(). |
|
Convert the certificate to OpenSSL plain text format.
References KTempFile::close(), KTempFile::fstream(), KTempFile::name(), and KTempFile::unlink(). |
|
Get the serial number of the certificate.
|
|
Get the key type (RSA, DSA, etc).
|
|
Get the public key.
|
|
Get the MD5 digest of the certificate.
Referenced by getKDEKey(). |
|
Get the signature.
|
|
Check if this is a valid certificate. Will use cached data.
|
|
Check if this is a valid certificate. Will use cached data.
References validate(). |
|
Check if this is a valid certificate. Will use cached data.
References KSSLValidation. Referenced by isValid(), revalidate(), KSSLInfoDlg::setup(), KSSLPKCS7::validate(), and KSSLPKCS12::validate(). |
|
Check if this is a valid certificate. Will use cached data.
References KSSLValidation, and validateVerbose(). |
|
Check if this is a valid certificate. Will use cached data.
Referenced by validate(). |
|
Check if the certificate ca is a proper CA for this certificate.
References d, KGlobal::dirs(), endl(), kdDebug(), KSSLValidation, and KStandardDirs::resourceDirs(). |
|
Check if this is a valid certificate. Will NOT use cached data.
References KSSLValidation. Referenced by KSSLPKCS7::revalidate(), and KSSLPKCS12::revalidate(). |
|
Check if this is a valid certificate. Will NOT use cached data.
References KSSLValidation, and validate(). |
|
Get a reference to the certificate chain.
Referenced by Observer::messageBox(), and KSSLInfoDlg::setup(). |
|
Obtain the localized message that corresponds to a validation result.
|
|
Explicitly make a copy of this certificate.
References KSSLCertificate(), KSSLCertChain::rawChain(), setCert(), and setChain(). |
|
Re-set the certificate from a base64 string.
References KCodecs::base64Decode(). Referenced by fromString(), fromX509(), KSSLCertChain::getChain(), KSSLCertificate(), and replicate(). |
|
Access the X.509v3 parameters.
Referenced by KSSL::setClientCertificate(). |
|
Check if this is a signer certificate.
|
|
FIXME: document. Definition at line 222 of file ksslcertificate.cc. |
|
KDEKey is a concatenation "Subject (MD5)", mostly needed for SMIME. The result of getKDEKey might change and should not be used for persistant storage.Definition at line 239 of file ksslcertificate.cc. References getMD5DigestText(), and getSubject(). |
|
Aegypten semantics force us to search by MD5Digest only. Definition at line 244 of file ksslcertificate.cc. |
Friends And Related Function Documentation
|
Compare two certificate to determine if they are the same. Definition at line 863 of file ksslcertificate.cc. |
|
Compare two certificate to determine if they are not the same. Definition at line 303 of file ksslcertificate.h. |
The documentation for this class was generated from the following files: