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 SignatureData.h
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
20 * @brief SignatureData is used to storage data parsed from digsig file.
22 #ifndef _SIGNATUREDATA_H_
23 #define _SIGNATUREDATA_H_
29 #include <vcore/Certificate.h>
30 #include <vcore/CertStoreType.h>
32 namespace ValidationCore {
34 typedef std::set<std::string> ReferenceSet;
35 typedef std::list<std::string> ObjectList;
40 SignatureData(const std::string &fileName, int fileNumber);
42 virtual ~SignatureData();
44 typedef std::list<std::string> IMEIList;
45 typedef std::list<std::string> MEIDList;
47 void setReference(const ReferenceSet &referenceSet);
48 void setSortedCertificateList(const CertificateList &list);
49 void setStorageType(const CertStoreId::Set &storeIdSet);
51 const ReferenceSet& getReferenceSet() const;
52 CertificateList getCertList() const;
53 ObjectList getObjectList() const;
54 bool containObjectReference(const std::string &ref) const;
55 bool isAuthorSignature() const;
56 int getSignatureNumber() const;
57 std::string getSignatureFileName() const;
58 std::string getRoleURI() const;
59 std::string getProfileURI() const;
60 const CertStoreId::Set& getStorageType() const;
61 CertStoreId::Type getVisibilityLevel() const;
62 const IMEIList& getIMEIList() const;
63 const MEIDList& getMEIDList() const;
64 CertificatePtr getEndEntityCertificatePtr() const;
65 CertificatePtr getRootCaCertificatePtr() const;
67 friend class SignatureReader;
70 ReferenceSet m_referenceSet;
71 CertificateList m_certList;
78 * This number is taken from distributor signature file name.
79 * Author signature do not contain any number on the file name.
80 * Author signature should have signature number equal to -1.
82 int m_signatureNumber;
83 std::string m_fileName;
84 std::string m_roleURI;
85 std::string m_profileURI;
86 std::string m_identifier;
87 ObjectList m_objectList;
88 CertStoreId::Set m_storeIdSet;
89 bool m_certificateSorted;
92 typedef std::set<SignatureData> SignatureDataSet;