1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
/*____________________________________________________________________________
pgpOptionList.h
Copyright (C) 1997 Network Associates Inc. and affiliated companies.
All rights reserved.
This file contains the types and prototypes for functions which manipulate
PGPOptionList data structures.
$Id: pgpOptionList.h,v 1.35 1999/05/07 23:47:46 hal Exp $
____________________________________________________________________________*/
#ifndef Included_pgpOptionList_h /* [ */
#define Included_pgpOptionList_h
#include <stdarg.h>
#include "pgpPubTypes.h"
#if PGP_MACINTOSH
#include <Files.h>
#endif
/* Standard event callback declaration */
struct PGPEvent;
typedef PGPError (*PGPEventHandlerProcPtr)(PGPContextRef context,
struct PGPEvent *event, PGPUserValue userValue);
/* Export formats for exporting functions */
enum PGPExportFormat_
{
kPGPExportFormat_Basic = 1,
kPGPExportFormat_Complete = 255,
kPGPExportFormat_X509Cert = 10000,
kPGPExportFormat_X509CertReq = 11000,
kPGPExportFormat_NetToolsCAV1_CertReq,
kPGPExportFormat_VerisignV1_CertReq,
kPGPExportFormat_EntrustV1_CertReq,
/* Deprecated aliases for three above */
/* kPGPExportFormat_NetToolsCAV1 = 11001,
kPGPExportFormat_VerisignV1,
kPGPExportFormat_EntrustV1,
*/
kPGPExportFormat_X509GetCertInitial = 11010,
kPGPExportFormat_NetToolsCAV1_GetCertInitial,
kPGPExportFormat_VerisignV1_GetCertInitial,
kPGPExportFormat_EntrustV1_GetCertInitial,
kPGPExportFormat_X509GetCRL = 11020,
kPGPExportFormat_NetToolsCAV1_GetCRL,
kPGPExportFormat_VerisignV1_GetCRL,
kPGPExportFormat_EntrustV1_GetCRL,
PGP_ENUM_FORCE( PGPExportFormat_ )
} ;
PGPENUM_TYPEDEF( PGPExportFormat_, PGPExportFormat );
/* Input formats for PGPOInputFormat */
enum PGPInputFormat_
{
kPGPInputFormat_Unknown = 0,
kPGPInputFormat_PGP = 1,
kPGPInputFormat_X509DataInPKCS7 = 10000,
kPGPInputFormat_NetToolsCAV1_DataInPKCS7,
kPGPInputFormat_VerisignV1_DataInPKCS7,
kPGPInputFormat_EntrustV1_DataInPKCS7,
/* Deprecated aliases for three above */
/* kPGPInputFormat_NetToolsCAV1 = 10001,
kPGPInputFormat_VerisignV1,
kPGPInputFormat_EntrustV1,
*/
kPGPInputFormat_PEMEncodedX509Cert,
kPGPInputFormat_NetToolsCAV1_PEMEncoded,
kPGPInputFormat_VerisignV1_PEMEncoded,
kPGPInputFormat_EntrustV1_PEMEncoded,
/* Input formats for X.509 private keys */
kPGPInputFormat_PrivateKeyInfo,
kPGPInputFormat_PKCS12,
PGP_ENUM_FORCE( PGPInputFormat_ )
} ;
PGPENUM_TYPEDEF( PGPInputFormat_, PGPInputFormat );
/* Output formats for PGPOOutputFormat */
enum PGPOutputFormat_
{
kPGPOutputFormat_Unknown = 0,
kPGPOutputFormat_PGP = 1,
kPGPOutputFormat_X509CertReqInPKCS7 = 10000,
kPGPOutputFormat_NetToolsCAV1_CertReqInPKCS7,
kPGPOutputFormat_VerisignV1_CertReqInPKCS7,
kPGPOutputFormat_EntrustV1_CertReqInPKCS7,
/* Deprecated aliases for above three */
/* kPGPOutputFormat_NetToolsCAV1 = 10001,
kPGPOutputFormat_VerisignV1,
kPGPOutputFormat_EntrustV1,
*/
kPGPOutputFormat_X509GetCertInitialInPKCS7 = 10010,
kPGPOutputFormat_NetToolsCAV1_GetCertInitialInPKCS7,
kPGPOutputFormat_VerisignV1_GetCertInitialInPKCS7,
kPGPOutputFormat_EntrustV1_GetCertInitialInPKCS7,
kPGPOutputFormat_X509GetCRLInPKCS7 = 10020,
kPGPOutputFormat_NetToolsCAV1_GetCRLInPKCS7,
kPGPOutputFormat_VerisignV1_GetCRLInPKCS7,
kPGPOutputFormat_EntrustV1_GetCRLInPKCS7,
PGP_ENUM_FORCE( PGPOutputFormat_ )
} ;
PGPENUM_TYPEDEF( PGPOutputFormat_, PGPOutputFormat );
/* Attribute-Value structure for PGPOAttributeValue */
enum PGPAVAttribute_
{
/* Pointer properties */
kPGPAVAttributeFirstPointer = 0,
kPGPAVAttribute_CommonName = kPGPAVAttributeFirstPointer,
kPGPAVAttribute_Email,
kPGPAVAttribute_OrganizationName,
kPGPAVAttribute_OrganizationalUnitName,
kPGPAVAttribute_SurName,
kPGPAVAttribute_SerialNumber,
kPGPAVAttribute_Country,
kPGPAVAttribute_Locality,
kPGPAVAttribute_State,
kPGPAVAttribute_StreetAddress,
kPGPAVAttribute_Title,
kPGPAVAttribute_Description,
kPGPAVAttribute_PostalCode,
kPGPAVAttribute_POBOX,
kPGPAVAttribute_PhysicalDeliveryOfficeName,
kPGPAVAttribute_TelephoneNumber,
kPGPAVAttribute_X121Address,
kPGPAVAttribute_ISDN,
kPGPAVAttribute_DestinationIndicator,
kPGPAVAttribute_Name,
kPGPAVAttribute_GivenName,
kPGPAVAttribute_Initials,
kPGPAVAttribute_HouseIdentifier,
kPGPAVAttribute_DirectoryManagementDomain,
kPGPAVAttribute_DomainComponent,
kPGPAVAttribute_UnstructuredName,
kPGPAVAttribute_UnstructuredAddress,
kPGPAVAttribute_RFC822Name,
kPGPAVAttribute_DNSName,
kPGPAVAttribute_AnotherName,
kPGPAVAttribute_IPAddress,
kPGPAVAttribute_CertificateExtension,
/* Verisign specific */
kPGPAVAttribute_Challenge,
kPGPAVAttribute_CertType,
kPGPAVAttribute_MailFirstName,
kPGPAVAttribute_MailMiddleName,
kPGPAVAttribute_MailLastName,
kPGPAVAttribute_EmployeeID,
kPGPAVAttribute_MailStop,
kPGPAVAttribute_AdditionalField4,
kPGPAVAttribute_AdditionalField5,
kPGPAVAttribute_AdditionalField6,
kPGPAVAttribute_Authenticate,
/* Boolean properties */
kPGPAVAttributeFirstBoolean = 1000,
/* Verisign specific */
kPGPAVAttribute_EmbedEmail,
/* Numeric (PGPUInt32) properties */
kPGPAVAttributeFirstNumber = 2000,
PGP_ENUM_FORCE( PGPAVAttribute_ )
} ;
PGPENUM_TYPEDEF( PGPAVAttribute_, PGPAVAttribute );
typedef struct PGPAttributeValue {
PGPAVAttribute attribute;
PGPSize size;
union {
PGPBoolean booleanvalue;
PGPUInt32 longvalue;
void *pointervalue;
} value;
PGPUInt32 unused;
} PGPAttributeValue ;
PGP_BEGIN_C_DECLARATIONS
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
PGPError PGPNewOptionList(PGPContextRef context,
PGPOptionListRef *outList);
PGPError PGPAppendOptionList(PGPOptionListRef optionList,
PGPOptionListRef firstOption, ...);
PGPError PGPBuildOptionList( PGPContextRef context,
PGPOptionListRef *outList,
PGPOptionListRef firstOption, ...);
PGPError PGPCopyOptionList(PGPOptionListRef optionList,
PGPOptionListRef *outList );
PGPError PGPFreeOptionList(PGPOptionListRef optionList);
/*
** The following functions are used to create PGPOptionListRef's for
** specifying the various options to several SDK functions. The
** functions can be used as inline parameters in a temporary manner or
** used with PGPBuildOptionList() to create persistent lists.
*/
/*
** Special PGPOptionListRef to mark last option passed to those functions
** which take variable lists of PGPOptionListRef's:
*/
PGPOptionListRef PGPOLastOption( PGPContextRef context );
/*
** Special PGPOptionListRef which is always ignored:
*/
PGPOptionListRef PGPONullOption( PGPContextRef context);
/* Data input (required): */
PGPOptionListRef PGPOInputFile( PGPContextRef context,
PGPFileSpecRef fileRef);
PGPOptionListRef PGPOInputBuffer( PGPContextRef context,
void const *buffer, PGPSize bufferSize);
#if PGP_MACINTOSH
PGPOptionListRef PGPOInputFileFSSpec( PGPContextRef context,
const FSSpec *fileSpec);
#endif
/* Data output (optional, generates event if missing): */
PGPOptionListRef PGPOOutputFile( PGPContextRef context,
PGPFileSpecRef fileRef);
PGPOptionListRef PGPOOutputBuffer( PGPContextRef context,
void *buffer, PGPSize bufferSize,
PGPSize *outputDataLength);
#if PGP_MACINTOSH
PGPOptionListRef PGPOOutputFileFSSpec( PGPContextRef context,
const FSSpec *fileSpec);
#endif
/* '*buffer' must be disposed of via PGPFreeData() */
/* maximum memory usage will be no more than maximumBufferSize */
PGPOptionListRef PGPOAllocatedOutputBuffer(PGPContextRef context,
void **buffer,
PGPSize maximumBufferSize,
PGPSize *actualBufferSize);
PGPOptionListRef PGPOAppendOutput( PGPContextRef context,
PGPBoolean appendOutput );
PGPOptionListRef PGPODiscardOutput( PGPContextRef context,
PGPBoolean discardOutput );
/* Encrypting and signing */
PGPOptionListRef PGPOEncryptToKey( PGPContextRef context,
PGPKeyRef keyRef);
PGPOptionListRef PGPOEncryptToKeySet( PGPContextRef context,
PGPKeySetRef keySetRef);
PGPOptionListRef PGPOEncryptToUserID( PGPContextRef context,
PGPUserIDRef userIDRef);
PGPOptionListRef PGPOSignWithKey( PGPContextRef context,
PGPKeyRef keyRef,
PGPOptionListRef firstOption, ...);
PGPOptionListRef PGPOConventionalEncrypt( PGPContextRef context,
PGPOptionListRef firstOption,
...);
PGPOptionListRef PGPOPassphraseBuffer( PGPContextRef context,
const void *passphrase, PGPSize passphraseLength);
PGPOptionListRef PGPOPassphrase( PGPContextRef context,
const char *passphrase);
PGPOptionListRef PGPOPasskeyBuffer( PGPContextRef context,
const void *passkey, PGPSize passkeyLength);
PGPOptionListRef PGPOSessionKey( PGPContextRef context,
const void *sessionKey, PGPSize sessionKeyLength);
PGPOptionListRef PGPOAskUserForEntropy( PGPContextRef context,
PGPBoolean askUserForEntropy );
PGPOptionListRef PGPORawPGPInput( PGPContextRef context,
PGPBoolean rawPGPInput );
PGPOptionListRef PGPOCompression( PGPContextRef context,
PGPBoolean compression );
PGPOptionListRef PGPOLocalEncoding( PGPContextRef context,
PGPLocalEncodingFlags localEncode);
PGPOptionListRef PGPOOutputLineEndType(PGPContextRef context,
PGPLineEndType lineEnd);
PGPOptionListRef PGPOPGPMIMEEncoding(PGPContextRef context,
PGPBoolean mimeEncoding, PGPSize *mimeBodyOffset,
char mimeSeparator[ kPGPMimeSeparatorSize ]);
PGPOptionListRef PGPOOmitMIMEVersion( PGPContextRef context,
PGPBoolean omitVersion);
PGPOptionListRef PGPOX509Encoding( PGPContextRef context,
PGPBoolean x509Encoding);
PGPOptionListRef PGPODetachedSig( PGPContextRef context,
PGPOptionListRef firstOption,
...);
PGPOptionListRef PGPOCipherAlgorithm( PGPContextRef context,
PGPCipherAlgorithm algorithm);
PGPOptionListRef PGPOHashAlgorithm( PGPContextRef context,
PGPHashAlgorithm algorithm);
PGPOptionListRef PGPOFailBelowValidity( PGPContextRef context,
PGPValidity minValidity);
PGPOptionListRef PGPOWarnBelowValidity( PGPContextRef context,
PGPValidity minValidity);
PGPOptionListRef PGPOEventHandler( PGPContextRef context,
PGPEventHandlerProcPtr eventHandler,
PGPUserValue eventHandlerData);
PGPOptionListRef PGPOSendNullEvents( PGPContextRef context,
PGPTimeInterval approxInterval);
PGPOptionListRef PGPOArmorOutput( PGPContextRef context,
PGPBoolean armorOutput );
PGPOptionListRef PGPODataIsASCII( PGPContextRef context,
PGPBoolean dataIsASCII );
PGPOptionListRef PGPOClearSign( PGPContextRef context,
PGPBoolean clearSign );
PGPOptionListRef PGPOForYourEyesOnly( PGPContextRef context,
PGPBoolean forYourEyesOnly );
PGPOptionListRef PGPOKeySetRef( PGPContextRef context,
PGPKeySetRef keysetRef);
PGPOptionListRef PGPOExportKeySet( PGPContextRef context,
PGPKeySetRef keysetRef);
PGPOptionListRef PGPOExportKey( PGPContextRef context,
PGPKeyRef keyRef);
PGPOptionListRef PGPOExportUserID( PGPContextRef context,
PGPUserIDRef useridRef);
PGPOptionListRef PGPOExportSig( PGPContextRef context,
PGPSigRef sigRef);
PGPOptionListRef PGPOImportKeysTo( PGPContextRef context,
PGPKeySetRef keysetRef);
PGPOptionListRef PGPOSendEventIfKeyFound( PGPContextRef context,
PGPBoolean sendEventIfKeyFound );
PGPOptionListRef PGPOPassThroughIfUnrecognized( PGPContextRef context,
PGPBoolean passThroughIfUnrecognized );
PGPOptionListRef PGPOPassThroughClearSigned( PGPContextRef context,
PGPBoolean passThroughClearSigned );
PGPOptionListRef PGPOPassThroughKeys( PGPContextRef context,
PGPBoolean passThroughKeys );
PGPOptionListRef PGPORecursivelyDecode( PGPContextRef context,
PGPBoolean recurse );
PGPOptionListRef PGPOKeyGenParams( PGPContextRef context,
PGPPublicKeyAlgorithm pubKeyAlg,
PGPUInt32 bits);
PGPOptionListRef PGPOKeyGenName( PGPContextRef context,
const void *name, PGPSize nameLength);
PGPOptionListRef PGPOCreationDate( PGPContextRef context,
PGPTime creationDate);
PGPOptionListRef PGPOExpiration( PGPContextRef context,
PGPUInt32 expirationDays);
PGPOptionListRef PGPOAdditionalRecipientRequestKeySet(
PGPContextRef context,
PGPKeySetRef arKeySetRef, PGPByte arkClass);
PGPOptionListRef PGPORevocationKeySet(PGPContextRef context,
PGPKeySetRef raKeySetRef);
PGPOptionListRef PGPOKeyGenMasterKey( PGPContextRef context,
PGPKeyRef masterKeyRef);
PGPOptionListRef PGPOPreferredAlgorithms(
PGPContextRef context,
PGPCipherAlgorithm const *prefAlg,
PGPUInt32 numAlgs);
PGPOptionListRef PGPOKeyGenFast( PGPContextRef context,
PGPBoolean fastGen);
PGPOptionListRef PGPOKeyGenUseExistingEntropy( PGPContextRef context,
PGPBoolean useExistingEntropy);
PGPOptionListRef PGPOCommentString( PGPContextRef context,
char const *comment);
PGPOptionListRef PGPOVersionString( PGPContextRef context,
char const *version);
PGPOptionListRef PGPOFileNameString( PGPContextRef context,
char const *fileName);
PGPOptionListRef PGPOSigRegularExpression(PGPContextRef context,
char const *regularExpression);
PGPOptionListRef PGPOExportPrivateKeys( PGPContextRef context,
PGPBoolean exportKeys);
PGPOptionListRef PGPOExportPrivateSubkeys( PGPContextRef context,
PGPBoolean exportSubkeys);
PGPOptionListRef PGPOExportFormat(PGPContextRef context,
PGPExportFormat exportFormat);
PGPOptionListRef PGPOExportable( PGPContextRef context,
PGPBoolean exportable);
PGPOptionListRef PGPOSigTrust( PGPContextRef context,
PGPUInt32 trustLevel,
PGPUInt32 trustValue);
PGPOptionListRef PGPOInputFormat( PGPContextRef context,
PGPInputFormat inputFormat );
PGPOptionListRef PGPOOutputFormat( PGPContextRef context,
PGPOutputFormat outputFormat );
PGPOptionListRef PGPOAttributeValue( PGPContextRef context,
PGPAttributeValue *attributeValue,
PGPUInt32 attributeValueCount);
#if PRAGMA_IMPORT_SUPPORTED
#pragma import reset
#endif
PGP_END_C_DECLARATIONS
#endif /* ] Included_pgpOptionList_h */
/*__Editor_settings____
Local Variables:
tab-width: 4
End:
vi: ts=4 sw=4
vim: si
_____________________*/
|