~ubuntu-branches/ubuntu/trusty/xulrunner/trusty

« back to all changes in this revision

Viewing changes to security/nss-fips/cmd/modutil/install-ds.h

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-25 13:04:18 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825130418-ck1i2ms384tzb9m0
Tags: 1.8.1.16+nobinonly-0ubuntu1
* New upstream release (taken from upstream CVS), LP: #254618.
* Fix MFSA 2008-35, MFSA 2008-34, MFSA 2008-33, MFSA 2008-32, MFSA 2008-31,
  MFSA 2008-30, MFSA 2008-29, MFSA 2008-28, MFSA 2008-27, MFSA 2008-25,
  MFSA 2008-24, MFSA 2008-23, MFSA 2008-22, MFSA 2008-21, MFSA 2008-26 also
  known as CVE-2008-2933, CVE-2008-2785, CVE-2008-2811, CVE-2008-2810,
  CVE-2008-2809, CVE-2008-2808, CVE-2008-2807, CVE-2008-2806, CVE-2008-2805,
  CVE-2008-2803, CVE-2008-2802, CVE-2008-2801, CVE-2008-2800, CVE-2008-2798.
* Drop 89_bz419350_attachment_306066 patch, merged upstream.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ***** BEGIN LICENSE BLOCK *****
 
2
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
3
 *
 
4
 * The contents of this file are subject to the Mozilla Public License Version
 
5
 * 1.1 (the "License"); you may not use this file except in compliance with
 
6
 * the License. You may obtain a copy of the License at
 
7
 * http://www.mozilla.org/MPL/
 
8
 *
 
9
 * Software distributed under the License is distributed on an "AS IS" basis,
 
10
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
11
 * for the specific language governing rights and limitations under the
 
12
 * License.
 
13
 *
 
14
 * The Original Code is the Netscape security libraries.
 
15
 *
 
16
 * The Initial Developer of the Original Code is
 
17
 * Netscape Communications Corporation.
 
18
 * Portions created by the Initial Developer are Copyright (C) 1994-2000
 
19
 * the Initial Developer. All Rights Reserved.
 
20
 *
 
21
 * Contributor(s):
 
22
 *
 
23
 * Alternatively, the contents of this file may be used under the terms of
 
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
27
 * of those above. If you wish to allow use of your version of this file only
 
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
29
 * use your version of this file under the terms of the MPL, indicate your
 
30
 * decision by deleting the provisions above and replace them with the notice
 
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
32
 * the provisions above, a recipient may use your version of this file under
 
33
 * the terms of any one of the MPL, the GPL or the LGPL.
 
34
 *
 
35
 * ***** END LICENSE BLOCK ***** */
 
36
 
 
37
#ifndef INSTALL_DS_H
 
38
#define INSTALL_DS_H
 
39
 
 
40
#include <stdio.h>
 
41
#include <prio.h>
 
42
#include <prmem.h>
 
43
 
 
44
extern PRFileDesc *Pk11Install_FD;
 
45
extern int Pk11Install_yylex();
 
46
extern int Pk11Install_yylinenum;
 
47
extern char *Pk11Install_yyerrstr;
 
48
 
 
49
typedef enum { STRING_VALUE, PAIR_VALUE } ValueType;
 
50
 
 
51
typedef struct Pk11Install_Pair_str Pk11Install_Pair;
 
52
typedef union Pk11Install_Pointer_str Pk11Install_Pointer;
 
53
typedef struct Pk11Install_Value_str Pk11Install_Value;
 
54
typedef struct Pk11Install_ValueList_str Pk11Install_ValueList;
 
55
typedef struct Pk11Install_ListIter_str Pk11Install_ListIter;
 
56
typedef struct Pk11Install_File_str Pk11Install_File;
 
57
typedef struct Pk11Install_PlatformName_str Pk11Install_PlatformName;
 
58
typedef struct Pk11Install_Platform_str Pk11Install_Platform;
 
59
typedef struct Pk11Install_Info_str Pk11Install_Info;
 
60
 
 
61
extern Pk11Install_Pointer Pk11Install_yylval;
 
62
extern Pk11Install_ValueList* Pk11Install_valueList;
 
63
 
 
64
/*
 
65
//////////////////////////////////////////////////////////////////////////
 
66
// Pk11Install_Pair
 
67
//////////////////////////////////////////////////////////////////////////
 
68
*/
 
69
 
 
70
struct Pk11Install_Pair_str {
 
71
        char * key;
 
72
        Pk11Install_ValueList *list;
 
73
 
 
74
};
 
75
 
 
76
Pk11Install_Pair* 
 
77
Pk11Install_Pair_new_default();
 
78
Pk11Install_Pair* 
 
79
Pk11Install_Pair_new( char* _key, Pk11Install_ValueList* _list);
 
80
void 
 
81
Pk11Install_Pair_delete(Pk11Install_Pair* _this);
 
82
void
 
83
Pk11Install_Pair_Print(Pk11Install_Pair* _this, int pad);
 
84
 
 
85
/*
 
86
//////////////////////////////////////////////////////////////////////////
 
87
// Pk11Install_Pointer
 
88
//////////////////////////////////////////////////////////////////////////
 
89
*/
 
90
union Pk11Install_Pointer_str {
 
91
        Pk11Install_ValueList *list;
 
92
        Pk11Install_Value *value;
 
93
        Pk11Install_Pair *pair;
 
94
        char *string;
 
95
};
 
96
 
 
97
/*
 
98
//////////////////////////////////////////////////////////////////////////
 
99
// Pk11Install_Value
 
100
//////////////////////////////////////////////////////////////////////////
 
101
*/
 
102
struct Pk11Install_Value_str {
 
103
 
 
104
        ValueType type;
 
105
        char *string;   
 
106
        Pk11Install_Pair *pair;
 
107
        struct Pk11Install_Value_str *next;
 
108
};
 
109
 
 
110
Pk11Install_Value* 
 
111
Pk11Install_Value_new_default();
 
112
Pk11Install_Value*
 
113
Pk11Install_Value_new(ValueType _type, Pk11Install_Pointer ptr);
 
114
void
 
115
Pk11Install_Value_delete(Pk11Install_Value* _this);
 
116
void
 
117
Pk11Install_Value_Print(Pk11Install_Value* _this, int pad);
 
118
 
 
119
/*
 
120
//////////////////////////////////////////////////////////////////////////
 
121
// Pk11Install_ValueList
 
122
//////////////////////////////////////////////////////////////////////////
 
123
*/
 
124
struct Pk11Install_ValueList_str {
 
125
        int numItems;
 
126
        int numPairs;
 
127
        int numStrings;
 
128
        Pk11Install_Value *head;
 
129
};
 
130
 
 
131
Pk11Install_ValueList* 
 
132
Pk11Install_ValueList_new();
 
133
void
 
134
Pk11Install_ValueList_delete(Pk11Install_ValueList* _this);
 
135
void
 
136
Pk11Install_ValueList_AddItem(Pk11Install_ValueList* _this,
 
137
                              Pk11Install_Value* item);
 
138
void
 
139
Pk11Install_ValueList_Print(Pk11Install_ValueList* _this, int pad);
 
140
 
 
141
 
 
142
/*
 
143
//////////////////////////////////////////////////////////////////////////
 
144
// Pk11Install_ListIter
 
145
//////////////////////////////////////////////////////////////////////////
 
146
*/
 
147
struct Pk11Install_ListIter_str {
 
148
        const Pk11Install_ValueList *list;
 
149
        Pk11Install_Value *current;
 
150
};
 
151
 
 
152
Pk11Install_ListIter* 
 
153
Pk11Install_ListIter_new_default();
 
154
void
 
155
Pk11Install_ListIter_init(Pk11Install_ListIter* _this);
 
156
Pk11Install_ListIter*
 
157
Pk11Install_ListIter_new(const Pk11Install_ValueList* _list);
 
158
void
 
159
Pk11Install_ListIter_delete(Pk11Install_ListIter* _this);
 
160
void
 
161
Pk11Install_ListIter_reset(Pk11Install_ListIter* _this);
 
162
Pk11Install_Value*
 
163
Pk11Install_ListIter_nextItem(Pk11Install_ListIter* _this);
 
164
 
 
165
/************************************************************************
 
166
 *
 
167
 * Pk11Install_File
 
168
 */
 
169
struct Pk11Install_File_str {
 
170
        char *jarPath;
 
171
        char *relativePath;
 
172
        char *absolutePath;
 
173
        PRBool executable;
 
174
        int permissions;
 
175
};
 
176
 
 
177
Pk11Install_File*
 
178
Pk11Install_File_new();
 
179
void
 
180
Pk11Install_File_init(Pk11Install_File* _this);
 
181
void
 
182
Pk11Install_file_delete(Pk11Install_File* _this);
 
183
/*// Parses a syntax tree to obtain all attributes.
 
184
// Returns NULL for success, error message if parse error.*/
 
185
char*
 
186
Pk11Install_File_Generate(Pk11Install_File* _this, 
 
187
                          const Pk11Install_Pair* pair);
 
188
void
 
189
Pk11Install_File_Print(Pk11Install_File* _this, int pad);
 
190
void
 
191
Pk11Install_File_Cleanup(Pk11Install_File* _this);
 
192
 
 
193
/************************************************************************
 
194
 *
 
195
 * Pk11Install_PlatformName
 
196
 */
 
197
struct Pk11Install_PlatformName_str {
 
198
        char *OS;
 
199
        char **verString;
 
200
        int numDigits;
 
201
        char *arch;
 
202
};
 
203
 
 
204
Pk11Install_PlatformName*
 
205
Pk11Install_PlatformName_new();
 
206
void
 
207
Pk11Install_PlatformName_init(Pk11Install_PlatformName* _this);
 
208
void
 
209
Pk11Install_PlatformName_delete(Pk11Install_PlatformName* _this);
 
210
char*
 
211
Pk11Install_PlatformName_Generate(Pk11Install_PlatformName* _this,
 
212
                                  const char* str);
 
213
char*
 
214
Pk11Install_PlatformName_GetString(Pk11Install_PlatformName* _this);
 
215
char*
 
216
Pk11Install_PlatformName_GetVerString(Pk11Install_PlatformName* _this);
 
217
void
 
218
Pk11Install_PlatformName_Print(Pk11Install_PlatformName* _this, int pad);
 
219
void
 
220
Pk11Install_PlatformName_Cleanup(Pk11Install_PlatformName* _this);
 
221
PRBool
 
222
Pk11Install_PlatformName_equal(Pk11Install_PlatformName* _this,
 
223
                               Pk11Install_PlatformName* cmp);
 
224
PRBool
 
225
Pk11Install_PlatformName_lteq(Pk11Install_PlatformName* _this,
 
226
                              Pk11Install_PlatformName* cmp);
 
227
PRBool
 
228
Pk11Install_PlatformName_lt(Pk11Install_PlatformName* _this,
 
229
                            Pk11Install_PlatformName* cmp);
 
230
 
 
231
/************************************************************************
 
232
 *
 
233
 * Pk11Install_Platform
 
234
 */
 
235
struct Pk11Install_Platform_str {
 
236
        Pk11Install_PlatformName name;
 
237
        Pk11Install_PlatformName equivName;
 
238
        struct Pk11Install_Platform_str *equiv;
 
239
        PRBool usesEquiv;
 
240
        char *moduleFile;
 
241
        char *moduleName;
 
242
        int modFile;
 
243
        unsigned long mechFlags;
 
244
        unsigned long cipherFlags;
 
245
        Pk11Install_File *files;
 
246
        int numFiles;
 
247
};
 
248
 
 
249
Pk11Install_Platform*
 
250
Pk11Install_Platform_new();
 
251
void
 
252
Pk11Install_Platform_init(Pk11Install_Platform* _this);
 
253
void
 
254
Pk11Install_Platform_delete(Pk11Install_Platform* _this);
 
255
/*// Returns NULL for success, error message if parse error.*/
 
256
char* 
 
257
Pk11Install_Platform_Generate(Pk11Install_Platform* _this,
 
258
                              const Pk11Install_Pair *pair);
 
259
void 
 
260
Pk11Install_Platform_Print(Pk11Install_Platform* _this, int pad);
 
261
void 
 
262
Pk11Install_Platform_Cleanup(Pk11Install_Platform* _this);
 
263
 
 
264
/************************************************************************
 
265
 *
 
266
 * Pk11Install_Info
 
267
 */
 
268
struct Pk11Install_Info_str {
 
269
        Pk11Install_Platform *platforms;
 
270
        int numPlatforms;
 
271
        Pk11Install_PlatformName *forwardCompatible;
 
272
        int numForwardCompatible;
 
273
};
 
274
 
 
275
Pk11Install_Info*
 
276
Pk11Install_Info_new();
 
277
void
 
278
Pk11Install_Info_init();
 
279
void
 
280
Pk11Install_Info_delete(Pk11Install_Info* _this);
 
281
/*// Returns NULL for success, error message if parse error.*/
 
282
char* 
 
283
Pk11Install_Info_Generate(Pk11Install_Info* _this, 
 
284
                          const Pk11Install_ValueList *list);
 
285
        /*// Returns NULL if there is no matching platform*/
 
286
Pk11Install_Platform* 
 
287
Pk11Install_Info_GetBestPlatform(Pk11Install_Info* _this, char* myPlatform);
 
288
void 
 
289
Pk11Install_Info_Print(Pk11Install_Info* _this, int pad);
 
290
void 
 
291
Pk11Install_Info_Cleanup(Pk11Install_Info* _this);
 
292
 
 
293
#endif /* INSTALL_DS_H */