21 #ifndef _KSSLCERTIFICATE_H
22 #define _KSSLCERTIFICATE_H
38 #include <tqcstring.h>
39 #include <tqvaluelist.h>
45 class KSSLCertificatePrivate;
50 #include <tdelibs_export.h>
53 #include "ksslconfig_win.h"
55 #include "ksslconfig.h"
59 typedef struct x509_st X509;
60 typedef struct X509_crl_st X509_CRL;
79 friend class KSSLCertificateHome;
80 friend class KSSLCertificateFactory;
81 friend class KSSLCertificateCache;
86 friend class KSMIMECryptoPrivate;
123 PathLengthExceeded, InvalidCA, Expired,
124 SelfSigned, ErrorReadingRoot, NoSSL,
125 Revoked, Untrusted, SignatureFailed,
126 Rejected, PrivateKeyFailed, InvalidHost,
127 Irrelevant, SelfSignedChain
130 enum KSSLPurpose { None=0, SSLServer=1, SSLClient=2,
131 SMIMESign=3, SMIMEEncrypt=4, Any=5 };
133 typedef TQValueList<KSSLValidation> KSSLValidationList;
145 TQString getSubject()
const;
151 TQString getIssuer()
const;
157 TQString getNotBefore()
const;
163 TQString getNotAfter()
const;
169 TQDateTime getQDTNotBefore()
const;
175 TQDateTime getQDTNotAfter()
const;
181 TQDateTime getQDTLastUpdate()
const;
187 TQDateTime getQDTNextUpdate()
const;
205 TQByteArray toNetscape();
217 TQString getSerialNumber()
const;
223 TQString getKeyType()
const;
229 TQString getPublicKeyText()
const;
236 TQString getMD5DigestText()
const;
242 TQString getMD5Digest()
const;
248 TQString getSignatureText()
const;
261 bool isValid(KSSLPurpose p);
267 TQStringList subjAltNames()
const;
273 KSSLValidation validate();
280 KSSLValidation validate(KSSLPurpose p);
287 KSSLValidationList validateVerbose(KSSLPurpose p);
296 KSSLValidationList validateVerbose(KSSLPurpose p,
KSSLCertificate *ca);
302 KSSLValidation revalidate();
309 KSSLValidation revalidate(KSSLPurpose p);
322 static TQString verifyText(KSSLValidation x);
341 bool setCert(TQString& cert);
359 void getEmails(TQStringList& to)
const;
366 TQString getKDEKey()
const;
371 static TQString getMD5DigestFromKDEKey(
const TQString& k);
377 KSSLCertificatePrivate *d;
378 int purposeToOpenSSL(KSSLPurpose p)
const;
383 void setCert(X509 *c);
384 void setCRL(X509_CRL *c);
385 void setChain(
void *c);
387 KSSLValidation processError(
int ec);
390 TDEIO_EXPORT TQDataStream& operator<<(TQDataStream& s,
const KSSLCertificate& r);
391 TDEIO_EXPORT TQDataStream& operator>>(TQDataStream& s,
KSSLCertificate& r);
395 {
return !(x == y); }
KDE Certificate Chain Representation Class.
KSSLValidation
A CA certificate can be validated as Irrelevant when it was not used to sign any other relevant certi...