/************************************************* * EAC SIGNED Object Header File * * (C) 2007 FlexSecure GmbH * * 2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_EAC_SIGNED_OBJECT_H__ #define BOTAN_EAC_SIGNED_OBJECT_H__ #include #include #include #include #include namespace Botan { /************************************************* * EAC SIGNED Object * *************************************************/ class BOTAN_DLL EAC_Signed_Object { public: virtual SecureVector tbs_data() const = 0; virtual SecureVector get_concat_sig() const = 0; // NOTE: this is here // only because abstract // signature objects have // not yet been introduced /** * Get the signature algorithm identifier used to sign this object. * @result the signature algorithm identifier */ AlgorithmIdentifier signature_algorithm() const; virtual bool check_signature(class Public_Key&) const = 0; virtual void encode(Pipe&, X509_Encoding = PEM) const = 0; SecureVector BER_encode() const; std::string PEM_encode() const; EAC_Signed_Object(SharedPtrConverter, const std::string&); EAC_Signed_Object(const std::string&, const std::string&); virtual ~EAC_Signed_Object() {} protected: void do_decode(); EAC_Signed_Object() {} AlgorithmIdentifier sig_algo; SecureVector tbs_bits; std::string PEM_label_pref; std::vector PEM_labels_allowed; private: virtual void force_decode() = 0; }; } #endif