fileformat/DataTypes/EncryptedCertificate.h
Go to the documentation of this file.
00001 #ifndef ENCRYPTEDCERTIFICATE_H
00002 #define ENCRYPTEDCERTIFICATE_H
00003 #include "RawEncryptedCertificate.h"
00004 
00005 #include "config.h"
00006 #ifdef HAVE_CRYPTO
00007 
00008 #include "DecryptedCertificate.h"
00009 #include "RsaPublicKey.h"
00010 #include "PlainCertificate.h"
00011 
00012 class EncryptedCertificate : public RawEncryptedCertificate {
00013         Q_DECLARE_TR_FUNCTIONS(EncryptedCertificate)
00014 protected:
00015         bool attemptVerification(const RsaPublicKey& key);
00016         QSharedPointer<DecryptedCertificate> decryptedCertificate;
00017 public:
00018         bool attemptVerificationFrom(const PlainCertificate& certificate);
00019         bool attemptVerificationFrom(const EncryptedCertificate& certificate);
00020         bool checkSignature(const RawData& signedData, const RawData& signature) const;
00021         EncryptedCertificate(const DataPointer& filewalker);
00022         virtual void printOn(Reporter& report) const;
00023         bool isVerified() const;
00024 };
00025 
00026 #else
00027 
00028 class EncryptedCertificate : public RawEncryptedCertificate {
00029 public:
00030         EncryptedCertificate(const DataPointer& filewalker) : RawEncryptedCertificate(filewalker){}
00031 };
00032 
00033 #endif
00034 
00035 #endif