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
|
/*____________________________________________________________________________
Copyright (C) 1997 Network Associates Inc. and affiliated companies.
All rights reserved.
This file contains the prototypes for functions which use UI to interact
with the user.
$Id: pgpUserInterface.h,v 1.40 1999/03/10 02:59:37 heller Exp $
____________________________________________________________________________*/
#ifndef Included_pgpUserInterface_h /* [ */
#define Included_pgpUserInterface_h
#include "pgpPubTypes.h"
#include "pgpGroups.h"
#if PGP_WIN32
#include "windows.h"
#endif
PGP_BEGIN_C_DECLARATIONS
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
enum PGPAdditionalRecipientRequestEnforcement_
{
kPGPARREnforcement_Invalid = 0,
kPGPARREnforcement_None = 1,
kPGPARREnforcement_Warn = 2,
kPGPARREnforcement_Strict = 3,
PGP_ENUM_FORCE( PGPAdditionalRecipientRequestEnforcement_ )
};
PGPENUM_TYPEDEF( PGPAdditionalRecipientRequestEnforcement_,
PGPAdditionalRecipientRequestEnforcement );
enum PGPRecipientSpecType_
{
kPGPRecipientSpecType_Invalid = 0,
kPGPRecipientSpecType_Key = 1,
kPGPRecipientSpecType_UserID = 2,
kPGPRecipientSpecType_KeyID = 3,
PGP_ENUM_FORCE( PGPRecipientSpecType_ )
};
PGPENUM_TYPEDEF( PGPRecipientSpecType_, PGPRecipientSpecType );
typedef struct PGPRecipientSpec
{
PGPRecipientSpecType type;
PGPBoolean locked;
PGPBoolean reserved8[3]; /* Must be zero */
PGPUInt32 reserved32[3]; /* Must be zero */
union
{
PGPKeyRef key;
char userIDStr[256]; /* Null terminated string */
struct
{
PGPKeyID keyID;
PGPPublicKeyAlgorithm algorithm;
} id;
} u;
} PGPRecipientSpec;
typedef struct PGPKeyServerSpec
{
PGPKeyServerRef server;
const char *serverName; /* Optional */
PGPUInt32 reserved[5]; /* Must be zero */
} PGPKeyServerSpec;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
PGPError PGPRecipientDialog(
PGPContextRef context,
PGPKeySetRef allKeys,
PGPBoolean alwaysDisplayDialog,
PGPKeySetRef *recipientKeys,
PGPOptionListRef firstOption, ... );
PGPError PGPPassphraseDialog(
PGPContextRef context,
PGPOptionListRef firstOption, ... );
PGPError PGPConfirmationPassphraseDialog(
PGPContextRef context,
PGPOptionListRef firstOption, ... );
PGPError PGPKeyPassphraseDialog(
PGPContextRef context,
PGPKeyRef theKey,
PGPOptionListRef firstOption, ... );
PGPError PGPSigningPassphraseDialog(
PGPContextRef context,
PGPKeySetRef allKeys,
PGPKeyRef *signingKey,
PGPOptionListRef firstOption, ... );
PGPError PGPDecryptionPassphraseDialog(
PGPContextRef context,
PGPKeySetRef recipientKeys,
PGPUInt32 keyIDCount,
const PGPKeyID keyIDList[],
PGPKeyRef *decryptionKey,
PGPOptionListRef firstOption, ... );
PGPError PGPConventionalEncryptionPassphraseDialog(
PGPContextRef context,
PGPOptionListRef firstOption, ... );
PGPError PGPConventionalDecryptionPassphraseDialog(
PGPContextRef context,
PGPOptionListRef firstOption, ... );
PGPError PGPOptionsDialog(
PGPContextRef context,
PGPOptionListRef firstOption, ... );
PGPError PGPCollectRandomDataDialog(
PGPContextRef context,
PGPUInt32 neededEntropyBits,
PGPOptionListRef firstOption, ... );
PGPError PGPSearchKeyServerDialog(
PGPContextRef context,
PGPUInt32 serverCount,
const PGPKeyServerSpec serverList[],
PGPtlsContextRef tlsContext,
PGPBoolean searchAllServers,
PGPKeySetRef *foundKeys,
PGPOptionListRef firstOption, ... );
PGPError PGPSendToKeyServerDialog(
PGPContextRef context,
const PGPKeyServerSpec *server,
PGPtlsContextRef tlsContext,
PGPKeySetRef keysToSend,
PGPKeySetRef *failedKeys,
PGPOptionListRef firstOption, ... );
/*
** Returns a value in the range 0-100 which crudely estimates
** the "quality" of a passphrase.
*/
PGPUInt32 PGPEstimatePassphraseQuality(const char *passphrase);
/* General dialog options */
PGPOptionListRef PGPOUIDialogPrompt(PGPContextRef context,
const char *prompt);
PGPOptionListRef PGPOUIWindowTitle(PGPContextRef context,
const char *title);
PGPOptionListRef PGPOUIDialogOptions(PGPContextRef context,
PGPOptionListRef firstOption, ...);
#if PGP_WIN32
PGPOptionListRef PGPOUIParentWindowHandle(PGPContextRef context,
HWND hwndParent);
#endif
/* All passphrase dialogs */
/* Caller should free passphrase with PGPFreeData() */
PGPOptionListRef PGPOUIOutputPassphrase(PGPContextRef context,
char **passphrase);
PGPOptionListRef PGPOUIMinimumPassphraseQuality(PGPContextRef context,
PGPUInt32 minimumPassphraseQuality);
PGPOptionListRef PGPOUIMinimumPassphraseLength(PGPContextRef context,
PGPUInt32 minimumPassphraseLength);
/* PGPConfirmationPassphraseDialog() options */
PGPOptionListRef PGPOUIShowPassphraseQuality(PGPContextRef context,
PGPBoolean showPassphraseQuality);
/* PGPSigningPassphraseDialog() and PGPDecryptionPassphraseDialog() options */
PGPOptionListRef PGPOUIDefaultKey(PGPContextRef context,
PGPKeyRef defaultKey);
PGPOptionListRef PGPOUIVerifyPassphrase(PGPContextRef context,
PGPBoolean verifyPassphrase);
PGPOptionListRef PGPOUIFindMatchingKey(PGPContextRef context,
PGPBoolean findMatchingKey);
PGPOptionListRef PGPOUITextUI(PGPContextRef context, PGPBoolean textUI);
/* PGPRecipientDialog() options: */
PGPOptionListRef PGPOUIRecipientList(PGPContextRef context,
PGPUInt32 *recipientCount,
PGPRecipientSpec **recipientList);
PGPOptionListRef PGPOUIDefaultRecipients(PGPContextRef context,
PGPUInt32 recipientCount,
const PGPRecipientSpec recipientList[]);
PGPOptionListRef PGPOUIDisplayMarginalValidity(PGPContextRef context,
PGPBoolean displayMarginalValidity);
PGPOptionListRef PGPOUIIgnoreMarginalValidity(PGPContextRef context,
PGPBoolean ignoreMarginalValidity);
PGPOptionListRef PGPOUIRecipientGroups(PGPContextRef context,
PGPGroupSetRef groupSet);
PGPOptionListRef PGPOUIEnforceAdditionalRecipientRequests(
PGPContextRef context,
PGPAdditionalRecipientRequestEnforcement enforcement,
PGPBoolean alwaysDisplayDialogWithARRs);
/* PGPDecryptionPassphraseDialog() and PGPRecipientDialog() only: */
PGPOptionListRef PGPOUIKeyServerUpdateParams(PGPContextRef context,
PGPUInt32 serverCount,
const PGPKeyServerSpec serverList[],
PGPtlsContextRef tlsContext,
PGPBoolean searchBeforeDisplay,
PGPKeySetRef *foundKeys,
PGPOptionListRef firstOption, ...);
/* Key server search dialog options */
PGPOptionListRef PGPOUIKeyServerSearchFilter(PGPContextRef context,
PGPFilterRef filter);
PGPOptionListRef PGPOUIKeyServerSearchKey(PGPContextRef context,
PGPKeyRef key);
PGPOptionListRef PGPOUIKeyServerSearchKeySet(PGPContextRef context,
PGPKeySetRef keySet);
PGPOptionListRef PGPOUIKeyServerSearchKeyIDList(PGPContextRef context,
PGPUInt32 keyIDCount, const PGPKeyID keyIDList[] );
/*
** These options are used to build the options dialog and are only
** applicable for the PGPOptionsDialog() and PGPOUIDialogOptions() calls.
** The "description" parameters are optional.
*/
PGPOptionListRef PGPOUICheckbox(PGPContextRef context, PGPUInt32 itemID,
const char *title, const char *description,
PGPUInt32 initialValue, PGPUInt32 *resultPtr,
PGPOptionListRef firstOption, ...);
PGPOptionListRef PGPOUIPopupList(PGPContextRef context, PGPUInt32 itemID,
const char *title, const char *description,
PGPUInt32 listItemCount, const char *listItems[],
PGPUInt32 initialValue, PGPUInt32 *resultPtr,
PGPOptionListRef firstOption, ...);
#if PRAGMA_IMPORT_SUPPORTED
#pragma import reset
#endif
PGP_END_C_DECLARATIONS
#endif /* ] Included_pgpUserInterface_h */
/*__Editor_settings____
Local Variables:
tab-width: 4
End:
vi: ts=4 sw=4
vim: si
_____________________*/
|