4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #ifndef __PKGMGR_PARSER_SIGNATURE_H_
24 #define __PKGMGR_PARSER_SIGNATURE_H_
28 #endif /* __cplusplus */
30 typedef struct transform_x {
31 const char *algorithm;
32 struct transform_x *prev;
33 struct transform_x *next;
36 typedef struct digestmethod_x {
37 const char *algorithm;
38 struct digestmethod_x *prev;
39 struct digestmethod_x *next;
42 typedef struct digestvalue_x {
44 struct digestvalue_x *prev;
45 struct digestvalue_x *next;
48 typedef struct transforms_x {
49 struct transform_x *transform;
50 struct transforms_x *prev;
51 struct transforms_x *next;
54 typedef struct x509certificate_x {
56 struct x509certificate_x *prev;
57 struct x509certificate_x *next;
60 typedef struct reference_x {
62 struct transforms_x *transforms;
63 struct digestmethod_x *digestmethod;
64 struct digestvalue_x *digestvalue;
65 struct reference_x *prev;
66 struct reference_x *next;
69 typedef struct cannonicalizationmethod_x {
70 const char *algorithm;
71 struct cannonicalizationmethod_x *prev;
72 struct cannonicalizationmethod_x *next;
73 } cannonicalizationmethod_x;
75 typedef struct signaturemethod_x {
76 const char *algorithm;
77 struct signaturemethod_x *prev;
78 struct signaturemethod_x *next;
81 typedef struct x509data_x {
82 x509certificate_x *x509certificate;
83 struct x509data_x *prev;
84 struct x509data_x *next;
87 typedef struct signedinfo_x {
88 struct cannonicalizationmethod_x *cannonicalizationmethod;
89 struct signaturemethod_x *signaturemethod;
90 struct reference_x *reference;
91 struct signedinfo_x *prev;
92 struct signedinfo_x *next;
95 typedef struct signaturevalue_x {
97 struct signaturevalue_x *prev;
98 struct signaturevalue_x *next;
101 typedef struct keyinfo_x {
102 struct x509data_x *x509data;
103 struct keyinfo_x *prev;
104 struct keyinfo_x *next;
107 /*This will be parsed later when requirement arises*/
108 typedef struct object_x {
110 struct object_x *prev;
111 struct object_x *next;
114 typedef struct signature_x { /*signature xml*/
115 const char *id; /* distributor or author sign*/
116 const char *xmlns; /* namespace*/
117 struct signedinfo_x *signedinfo; /*signature data*/
118 struct signaturevalue_x *signaturevalue; /* signature value*/
119 struct keyinfo_x *keyinfo; /*cert info*/
120 struct object_x *object; /*other parameters in object tag*/
124 signature_x *_ri_process_signature_xml(const char *signature_file);
125 void _ri_free_signature_xml(signature_x *sigx);
129 #endif /* __cplusplus */
130 #endif /* __PKGMGR_PARSER_SIGNATURE_H_ */