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, SelfSignedChain } |
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) |
QStringList | subjAltNames () const |
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 | |
static KSSLCertificate * | fromString (QCString cert) |
static KSSLCertificate * | fromX509 (X509 *x5) |
static QString | verifyText (KSSLValidation x) |
static QString | getMD5DigestFromKDEKey (const QString &k) |
Protected Member Functions | |
void | setCert (X509 *c) |
void | setChain (void *c) |
X509 * | getCert () |
KSSLValidation | processError (int ec) |
Friends | |
class | KSSL |
class | KSSLCertificateHome |
class | KSSLCertificateFactory |
class | KSSLCertificateCache |
class | KSSLCertChain |
class | KSSLPeerInfo |
class | KSSLPKCS12 |
class | KSSLD |
class | KSMIMECryptoPrivate |
KIO_EXPORT friend int | operator!= (KSSLCertificate &x, KSSLCertificate &y) |
KIO_EXPORT friend 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 75 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 113 of file ksslcertificate.h. |
Constructor & Destructor Documentation
|
Destroy this X.509 certificate.
Definition at line 118 of file ksslcertificate.cc. |
|
Copy constructor. Beware, this is very expensive.
Definition at line 103 of file ksslcertificate.cc. 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.
Definition at line 144 of file ksslcertificate.cc. 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.
Definition at line 132 of file ksslcertificate.cc. References setCert(). |
|
Convert this certificate to a string.
Definition at line 889 of file ksslcertificate.cc. References KCodecs::base64Encode(), and toDer(). Referenced by toPem(). |
|
Get the subject of the certificate (X.509 map).
Definition at line 166 of file ksslcertificate.cc. Referenced by KSSLPeerInfo::certMatchesAddress(), getKDEKey(), and KSSLPKCS7::name(). |
|
Get the issuer of the certificate (X.509 map).
Definition at line 402 of file ksslcertificate.cc. |
|
Get the date that the certificate becomes valid on.
Definition at line 829 of file ksslcertificate.cc. |
|
Get the date that the certificate is valid until.
Definition at line 838 of file ksslcertificate.cc. |
|
Get the date that the certificate becomes valid on.
Definition at line 847 of file ksslcertificate.cc. |
|
Get the date that the certificate is valid until.
Definition at line 856 of file ksslcertificate.cc. |
|
Convert the certificate to DER (ASN.1) format.
Definition at line 934 of file ksslcertificate.cc. Referenced by toString(). |
|
Convert the certificate to PEM (base64) format.
Definition at line 954 of file ksslcertificate.cc. References toString(). |
|
Convert the certificate to Netscape format.
Definition at line 982 of file ksslcertificate.cc. References KTempFile::close(), KTempFile::fstream(), KTempFile::name(), and KTempFile::unlink(). |
|
Convert the certificate to OpenSSL plain text format.
Definition at line 1015 of file ksslcertificate.cc. References KTempFile::close(), KTempFile::fstream(), KTempFile::name(), and KTempFile::unlink(). |
|
Get the serial number of the certificate.
Definition at line 180 of file ksslcertificate.cc. |
|
Get the key type (RSA, DSA, etc).
Definition at line 282 of file ksslcertificate.cc. |
|
Get the public key.
Definition at line 308 of file ksslcertificate.cc. |
|
Get the MD5 digest of the certificate.
Definition at line 257 of file ksslcertificate.cc. Referenced by getKDEKey(). |
|
Get the signature.
Definition at line 194 of file ksslcertificate.cc. |
|
Check if this is a valid certificate. Will use cached data.
Definition at line 542 of file ksslcertificate.cc. |
|
Check if this is a valid certificate. Will use cached data.
Definition at line 537 of file ksslcertificate.cc. References validate(). |
|
The alternate subject name.
Definition at line 1062 of file ksslcertificate.cc. Referenced by KSSLPeerInfo::certMatchesAddress(). |
|
Check if this is a valid certificate. Will use cached data.
Definition at line 567 of file ksslcertificate.cc. Referenced by isValid(), revalidate(), and KSSLPKCS7::validate(). |
|
Check if this is a valid certificate. Will use cached data.
Definition at line 571 of file ksslcertificate.cc. References validateVerbose(). |
|
Check if this is a valid certificate. Will use cached data.
Definition at line 585 of file ksslcertificate.cc. Referenced by validate(). |
|
Check if the certificate ca is a proper CA for this certificate.
Definition at line 590 of file ksslcertificate.cc. References KGlobal::dirs(), endl(), kdDebug(), and KStandardDirs::resourceDirs(). |
|
Check if this is a valid certificate. Will NOT use cached data.
Definition at line 730 of file ksslcertificate.cc. Referenced by KSSLPKCS7::revalidate(). |
|
Check if this is a valid certificate. Will NOT use cached data.
Definition at line 735 of file ksslcertificate.cc. References validate(). |
|
Get a reference to the certificate chain.
Definition at line 127 of file ksslcertificate.cc. References KSSLCertChain::_chain. Referenced by Observer::messageBox(). |
|
Obtain the localized message that corresponds to a validation result.
Definition at line 894 of file ksslcertificate.cc. |
|
Explicitly make a copy of this certificate.
Definition at line 875 of file ksslcertificate.cc. References KSSLCertificate(), KSSLCertChain::rawChain(), setCert(), and setChain(). |
|
Re-set the certificate from a base64 string.
Definition at line 1037 of file ksslcertificate.cc. References KCodecs::base64Decode(). Referenced by fromString(), fromX509(), KSSLCertChain::getChain(), KSSLCertificate(), and replicate(). |
|
Access the X.509v3 parameters.
Definition at line 1052 of file ksslcertificate.cc. |
|
Check if this is a signer certificate.
Definition at line 1057 of file ksslcertificate.cc. References KSSLX509V3::certTypeCA(). |
|
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. |
The documentation for this class was generated from the following files: