// // Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file SignatureManager.h * @brief This is the header file for the %SignatureManager class. * * This header file contains the declarations of the %SignatureManager class. */ #ifndef _SIGNATURE_MANAGER_H_ #define _SIGNATURE_MANAGER_H_ #include #include "InstallationContext.h" #include "SignatureHandler.h" /** * @class SignatureManager * @brief This class represents the class of SignatureManager. * @since 1.0 * * This class represents the class of SignatureManager. * */ class SignatureManager { public: SignatureManager(void); virtual ~SignatureManager(void); bool Construct(InstallationContext *pConext); bool SetSignature(); bool AddCert(); bool VerifyChain(); //bool VerifySignature(); private: SignatureManager(const SignatureManager& value); SignatureManager& operator =(const SignatureManager& source); bool Validate(Tizen::Security::Cert::X509CertificatePath* pCertPath); bool AddCertificate(Tizen::Security::Cert::X509CertificatePath* pCertPath, Tizen::Base::Collection::IList* pCertChain); bool AddDistributorRootCert(Tizen::Security::Cert::X509CertificatePath* pCertPath); bool AddAuthorRootCert(Tizen::Security::Cert::X509CertificatePath* pCertPath); private: InstallationContext* __pContext; SignatureHandler* __pAuthorSignature; SignatureHandler* __pDistributorSignature; Tizen::Security::Cert::X509CertificatePath* __pAuthorCertPath; Tizen::Security::Cert::X509CertificatePath* __pDistributorCertPath; }; // SignatureManager #endif // _SIGNATURE_MANAGER_H_