KIO
ksslpkcs7.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KSSLPKCS7_H
00022 #define _KSSLPKCS7_H
00023
00024 #include <ksslconfig.h>
00025
00026 #ifdef KSSL_HAVE_SSL
00027 #define crypt _openssl_crypt
00028 #include <openssl/pkcs7.h>
00029 #undef crypt
00030 #else
00031 class PKCS7;
00032 #endif
00033
00034
00035 #include <ksslcertificate.h>
00036 #include <ksslcertchain.h>
00037
00038 #ifndef STACK_OF
00039 #define STACK_OF(x) void
00040 #endif
00041
00042 class KSSL;
00043 class KSSLPKCS7Private;
00044 class KOpenSSLProxy;
00045
00055 class KIO_EXPORT KSSLPKCS7 {
00056 friend class KSSL;
00057
00058 public:
00062 virtual ~KSSLPKCS7();
00063
00069 QString name() const;
00070
00076 static KSSLPKCS7* fromString(const QString &base64);
00077
00083 static KSSLPKCS7* loadCertFile(const QString &filename);
00084
00089 QString toString() const;
00090
00096 void setCert(PKCS7 *c);
00097
00103 KSSLCertificate *getCertificate();
00104
00110 KSSLCertChain *getChain();
00111
00117 bool toFile(const QString &filename);
00118
00123 KSSLCertificate::KSSLValidation validate() const;
00124
00131 KSSLCertificate::KSSLValidation revalidate();
00132
00136 bool isValid() const;
00137
00138 protected:
00139 KSSLPKCS7();
00140
00141 private:
00142 KSSLPKCS7Private *d;
00143 PKCS7 *_pkcs;
00144 KOpenSSLProxy *kossl;
00145 KSSLCertificate *_cert;
00146 KSSLCertChain *_chain;
00147 };
00148
00149
00150 #endif
00151