2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file wac_security.h
18 * @author Krzysztof Jackiewicz(k.jackiewicz@samsung.com)
23 #ifndef WACSECURITY_H_
24 #define WACSECURITY_H_
26 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
27 #include <vcore/Certificate.h>
28 #include <vcore/CertificateCollection.h>
31 namespace WidgetInstall {
33 class WacSecurity : public WrtDB::IWacSecurity
38 mDistributorSigned(false),
44 virtual const WrtDB::WidgetCertificateDataList& getCertificateList() const
46 return mCertificateList;
49 virtual bool isRecognized() const { return mRecognized; }
51 virtual bool isDistributorSigned() const { return mDistributorSigned; }
53 virtual bool isWacSigned() const { return mWacSigned; }
55 virtual void getCertificateChainList(
56 WrtDB::CertificateChainList& list) const;
58 void setRecognized(bool recognized) { mRecognized = recognized; }
59 void setDistributorSigned(bool distributorSigned)
61 mDistributorSigned = distributorSigned;
63 void setWacSigned(bool wacSigned) { mWacSigned = wacSigned; }
65 ValidationCore::CertificatePtr getAuthorCertificatePtr() const { return mAuthorCertificate;}
66 ValidationCore::CertificateCollectionList& getCertificateChainListRef()
68 return mCertificateChainList;
71 WrtDB::WidgetCertificateDataList& getCertificateListRef()
73 return mCertificateList;
77 // This data are used to evaluate policy
78 WrtDB::WidgetCertificateDataList mCertificateList;
80 // author signature verified
83 bool mDistributorSigned;
86 // Author end entity certificate.
87 // Information from this certificate are shown to user
88 // during installation process.
89 ValidationCore::CertificatePtr mAuthorCertificate;
90 // This certificates are used by OCSP/CRL
91 ValidationCore::CertificateCollectionList mCertificateChainList;
94 } // namespace WidgetInstall
97 #endif /* WACSECURITY_H_ */