Merge "Beautified source code of appfw/src/base/utility" into tizen_2.2
[platform/framework/native/appfw.git] / src / security / cert / FSecCert_CertExtension.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16
17 /**
18  * @file        FSecCert_CertExtension.h
19  * @brief       This header file contains the declarations of Certificate Extensions.
20  *
21  * This header file contains the declarations of Certificate Extensions.
22  */
23
24 #ifndef _FSEC_CERT_INTERNAL_CERT_EXTENSION_H_
25 #define _FSEC_CERT_INTERNAL_CERT_EXTENSION_H_
26
27 #include "FSecCert_CertTypes.h"
28
29 namespace Tizen { namespace Security { namespace Cert
30 {
31
32 class _CertExtension
33 {
34 public:
35         _CertExtension(void);
36
37         virtual ~_CertExtension(void);
38
39         void AddExt(byte* pOid, bool critical, byte* pValue, int len);
40
41         _CertExtensionInfo* GetExt(byte* pOid);
42
43         _CertExtensionInfo* GetExt(_CertExt type);
44
45         _CertExtensionInfo* GetExtEntry(short getId);
46
47         short GetExtNum(void);
48
49 private:
50         _CertExtension(const _CertExtension& rhs);
51
52         _CertExtension& operator =(const _CertExtension& rhs);
53
54         _CertExt GetExtType(byte* pOid);
55
56         byte* GetExtOid(_CertExt type);
57
58
59 private:
60         _CertExtensionInfo* __pExts;
61
62 }; //_CertExtension
63
64 } } } //Tizen::Security::Cert
65
66 #endif // _FSEC_CERT_INTERNAL_CERT_EXTENSION_H_