summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/PGPw/sdk8/include/pgpLDAP.h
blob: 1cdce41630207f840e4cd1d3c89ee159559ba982 (plain)
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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpLDAP.h,v 1.24 2004/01/23 08:12:49 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_pgpLDAP_h	/* [ */
#define Included_pgpLDAP_h

#include "pgpBase.h"
#include "pgpPubTypes.h"
#include "pgpMemoryMgr.h"
#include "pgpSockets.h"
#include "pgpBER.h"

PGP_BEGIN_C_DECLARATIONS

/* LDAP parameters and constants */
#define kPGPldap_DefaultPort		389
#define kPGPldap_DefaultSecurePort  636
#define kPGPldap_DefaultVersion		2

#define kPGPldapScopeString_Base		PGPTXT_MACHINE8("base")
#define kPGPldapScopeString_OneLevel	PGPTXT_MACHINE8("one")
#define kPGPldapScopeString_Subtree		PGPTXT_MACHINE8("sub")

#define kPGPldap_DefaultFilterString	PGPTXT_MACHINE8("(objectclass=*)")



/* Session options */
#define kPGPldapOpt_Deref			1
#define kPGPldapOpt_Sizelimit		2
#define kPGPldapOpt_Timelimit		3
#define kPGPldapOpt_Desc			4

#define kPGPldapOpt_ON				((void *) 1)
#define kPGPldapOpt_OFF 			((void *) 0)

enum PGPldapResult_
{
	kPGPldapResult_Success						= 0x00,
	kPGPldapResult_OperationsError				= 0x01,
	kPGPldapResult_ProtocolError				= 0x02,
	kPGPldapResult_TimelimitExceeded			= 0x03,
	kPGPldapResult_SizelimitExceeded			= 0x04,
	kPGPldapResult_CompareFalse 				= 0x05,
	kPGPldapResult_CompareTrue					= 0x06,
	kPGPldapResult_StrongAuthNotSupported		= 0x07,
	kPGPldapResult_StrongAuthRequired			= 0x08,
	kPGPldapResult_PartialResults				= 0x09,
	kPGPldapResult_NoSuchAttribute				= 0x10,
	kPGPldapResult_UndefinedType				= 0x11,
	kPGPldapResult_InappropriateMatching		= 0x12,
	kPGPldapResult_ConstraintViolation			= 0x13,
	kPGPldapResult_TypeOrValueExists			= 0x14,
	kPGPldapResult_InvalidSyntax				= 0x15,
	kPGPldapResult_NoSuchObject 				= 0x20,
	kPGPldapResult_AliasProblem 				= 0x21,
	kPGPldapResult_InvalidDNSyntax				= 0x22,
	kPGPldapResult_IsLeaf						= 0x23,
	kPGPldapResult_AliasDerefProblem			= 0x24,
	kPGPldapResult_InappropriateAuth			= 0x30,
	kPGPldapResult_InvalidCredentials			= 0x31,
	kPGPldapResult_InsufficientAccess			= 0x32,
	kPGPldapResult_Busy 						= 0x33,
	kPGPldapResult_Unavailable					= 0x34,
	kPGPldapResult_UnwillingToPerform			= 0x35,
	kPGPldapResult_LoopDetect					= 0x36,
	kPGPldapResult_NamingViolation				= 0x40,
	kPGPldapResult_ObjectClassViolation 		= 0x41,
	kPGPldapResult_NotAllowedOnNonleaf			= 0x42,
	kPGPldapResult_NotAllowedOnRDN				= 0x43,
	kPGPldapResult_AlreadyExists				= 0x44,
	kPGPldapResult_NoObjectClassMods			= 0x45,
	kPGPldapResult_ResultsTooLarge				= 0x46,
	kPGPldapResult_Other						= 0x50,
	kPGPldapResult_ServerDown					= 0x51,
	kPGPldapResult_LocalError					= 0x52,
	kPGPldapResult_EncodingError				= 0x53,
	kPGPldapResult_DecodingError				= 0x54,
	kPGPldapResult_Timeout						= 0x55,
	kPGPldapResult_AuthUnknown					= 0x56,
	kPGPldapResult_FilterError					= 0x57,
	kPGPldapResult_UserCancelled				= 0x58,
	kPGPldapResult_ParamError					= 0x59,
	kPGPldapResult_NoMemory 					= 0x5a,
	kPGPldapResult_ConnectError 				= 0x5b,
	
	kPGPldapResult_None							= 0xFFFFFFFF
};
PGPENUM_TYPEDEF (PGPldapResult_, PGPldapResult);

enum PGPldapType_
{
	kPGPldapType_None				= 0,

	kPGPldapRequest_Bind			= 0x60, /* application + constructed */
	kPGPldapRequest_Unbind			= 0x42, /* application + primitive	 */
	kPGPldapRequest_Search			= 0x63, /* application + constructed */
	kPGPldapRequest_Modify			= 0x66, /* application + constructed */
	kPGPldapRequest_Add 			= 0x68, /* application + constructed */
	kPGPldapRequest_Delete			= 0x4A, /* application + primitive	 */
	kPGPldapRequest_ModifyRDN		= 0x6C, /* application + constructed */
	kPGPldapRequest_Compare 		= 0x6E, /* application + constructed */
	kPGPldapRequest_Abandon 		= 0x50, /* application + primitive	 */

	kPGPldapResponse_Bind			= 0x61, /* application + constructed */
	kPGPldapResponse_SearchEntry	= 0x64, /* application + constructed */
	kPGPldapResponse_SearchResult	= 0x65, /* application + constructed */
	kPGPldapResponse_Modify 		= 0x67, /* application + constructed */
	kPGPldapResponse_Add			= 0x69, /* application + constructed */
	kPGPldapResponse_Delete 		= 0x6B, /* application + constructed */
	kPGPldapResponse_ModifyRDN		= 0x6D, /* application + constructed */
	kPGPldapResponse_Compare		= 0x6F, /* application + constructed */

	kPGPldapResponse_Any			= 0xFFFFFFFF
};
PGPENUM_TYPEDEF (PGPldapType_, PGPldapType);

enum PGPldapScope_
{
	kPGPldapScope_Base			= 0,
	kPGPldapScope_OneLevel		= 1,
	kPGPldapScope_Subtree		= 2,

	kPGPldapScope_None			= -1
};
PGPENUM_TYPEDEF (PGPldapScope_, PGPldapScope);

enum PGPldapDeref_
{
	kPGPldapDeref_Never 		= 0,
	kPGPldapDeref_Searching 	= 1,
	kPGPldapDeref_Finding		= 2,
	kPGPldapDeref_Always		= 3
};
PGPENUM_TYPEDEF (PGPldapDeref_, PGPldapDeref);

enum PGPldapAuth_
{
	kPGPldapAuth_Simple 		= 0x80	/* context-specific + primitive, tag = 0 */
	/* Not implemented -- kPGPldapAuth_Kerb41		  = 0x81, */
	/* Not implemented -- kPGPldapAuth_Kerb42		  = 0x82  */
};
PGPENUM_TYPEDEF (PGPldapAuth_, PGPldapAuth);

enum PGPldapFilter_
{
	kPGPldapFilter_And			= 0xA0,	/* context specific + constructed, tag = 0 */
	kPGPldapFilter_Or			= 0xA1,	/* context specific + constructed, tag = 1 */
	kPGPldapFilter_Not			= 0xA2,	/* context specific + constructed, tag = 2 */
	kPGPldapFilter_Equal		= 0xA3,	/* context specific + constructed, tag = 3 */
	kPGPldapFilter_Substrings	= 0xA4,	/* context specific + constructed, tag = 4 */
	kPGPldapFilter_GE			= 0xA5,	/* context specific + constructed, tag = 5 */
	kPGPldapFilter_LE			= 0xA6,	/* context specific + constructed, tag = 6 */
	kPGPldapFilter_Present		= 0x87,	/* context specific + primitive,   tag = 7 */
	kPGPldapFilter_Approx		= 0xA8,	/* context specific + constructed, tag = 8 */

	kPGPldapFilter_None			= (-1L)
};
PGPENUM_TYPEDEF( PGPldapFilter_, PGPldapFilter );

enum PGPldapSubstring_
{
	kPGPldapSubstring_Initial	= 0x80,	/* context specific + primitive, tag = 0 */
	kPGPldapSubstring_Any		= 0x81,	/* context specific + primitive, tag = 1 */
	kPGPldapSubstring_Final		= 0x82,	/* context specific + primitive, tag = 2 */

	kPGPldapSubstring_None		= (-1L)
};
PGPENUM_TYPEDEF( PGPldapSubstring_, PGPldapSubstring );

enum PGPldapModOp_
{
	kPGPldapModOp_Add			= 0x00,
	kPGPldapModOp_Delete		= 0x01,
	kPGPldapModOp_Replace		= 0x02,

	kPGPldapModOp_None			= (-1L)
};
PGPENUM_TYPEDEF( PGPldapModOp_, PGPldapModOp );

#define kPGPldapModOpMask_UseBERValues	0x10


/* LDAP Data types: typedefs, structs, and whatnot */

typedef PGPUInt32 PGPldapMessageID;

#define kPGPldapMessageID_Any		( (PGPldapMessageID) -1 )
#define kInvalidPGPldapMessageID	( (PGPldapMessageID)  0 )
#define PGPldapMessageIDIsValid(messageID) \
			( (messageID) != kInvalidPGPldapMessageID )
#define PGPValidateLDAPMessageID(messageID) \
			PGPValidateParam( PGPldapMessageIDIsValid( messageID ) )

typedef struct PGPldapContext *	PGPldapContextRef;

#define kInvalidPGPldapContextRef		( (PGPldapContextRef) NULL )
#define PGPldapContextRefIsValid(pgpLDAP)	\
			( (pgpLDAP) != kInvalidPGPldapContextRef )
#define PGPValidateLDAPContextRef(context) \
			PGPValidateParam( PGPldapContextRefIsValid( context ) )

typedef struct PGPldapMessage *	PGPldapMessageRef;

#define kInvalidPGPldapMessageRef		( (PGPldapMessageRef) NULL)
#define PGPldapMessageRefIsValid(message)	\
			( (message) != kInvalidPGPldapMessageRef )
#define PGPValidateLDAPMessageRef(message) \
			PGPValidateParam( PGPldapMessageRefIsValid( message ) )


#define IsPGPldapError(err) \
			( ( (err) >= kPGPError_LDAPMIN ) && ( (err) <= kPGPError_LDAPMAX ) )


/* Callbacks for using LDAP functions in multithreaded apps */
typedef struct PGPldapThreadFns
{
	void *		(*pgpLDAPThread_MutexAlloc) 	(void);
	void		(*pgpLDAPThread_MutexFree)		(void *);
	PGPError	(*pgpLDAPThread_MutexLock)		(void *);
	PGPError	(*pgpLDAPThread_MutexUnlock)	(void *);
	void		(*pgpLDAPThread_SetErrno)		(int);
	PGPError	(*pgpLDAPThread_GetErrno)		(void);
	void		(*pgpLDAPThread_SetLDAPErrno)	(PGPInt32, PGPChar8 *, PGPChar8 *);
	PGPInt32	(*pgpLDAPThread_GetLDAPErrno)	(PGPChar8 **, PGPChar8 **);
} PGPldapThreadFns;

typedef struct PGPldapMod
{
	PGPldapModOp	op;
	PGPChar8 *		type;

    PGPChar8 **		value;
    PGPberValue **	bvalue;
} PGPldapMod;

typedef struct PGPldapURLDesc
{
	PGPChar8 *		host;
	PGPUInt16		port;

	PGPChar8 *		dn;
	PGPChar8 **		attrs;

	PGPldapScope	scope;
	PGPChar8 *		filter;

} PGPldapURLDesc;

typedef PGPError (* PGPldapRebindProcPtr )(
						PGPldapContextRef	pgpLDAP,
						PGPChar8 **			dnp,
						PGPChar8 **			pwp,
						PGPInt32 *			method,
						PGPBoolean			freeIt,
						PGPChar8 *			arg );


/* LDAP function prototypes */
/*
 * Above each function is the name of the analogous function
 * in the UMich or Netscape LDAP SDK.  While there are some subtle
 * differences, for the most part, each function works basically
 * the same as it's UMich/Netscape SDK counterpart.
 */

/* Memory management functions */
	PGPError
PGPNewLDAPContext(
	PGPContextRef		context,
	PGPldapContextRef	*pgpLDAP );

	PGPError
PGPNewLDAPMessage(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef *	message );

	PGPError
PGPFreeLDAPContext(
	PGPldapContextRef	pgpLDAP );

	PGPError
PGPFreeLDAPMessage(
	PGPldapMessageRef	message );

	/* ldap_value_free */
	PGPError
PGPFreeLDAPValues(
	PGPChar8 **			vals );

	/* ldap_value_free_len */
	PGPError
PGPFreeLDAPValuesLen( 
	PGPberValue **		bvals );

	PGPError
PGPFreeLDAPURLDesc(
	PGPldapURLDesc *	lud );


/* Result-handling functions */
	/* ldap_get_lderrno */
	PGPError 
PGPldapGetErrno(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 **			matched,
	PGPChar8 **			message,
	PGPldapResult *		result );

	PGPError
PGPldapResultToError(
	PGPldapContextRef	pgpLDAP,
	PGPldapResult		result );

/* LDAP option functions */
	/* ldap_set_option */
	PGPError
PGPldapSetOption(
	PGPldapContextRef	pgpLDAP, 
	PGPUInt32			option,
	void *				value );

	/* ldap_get_option */
	PGPError
PGPldapGetOption(
	PGPldapContextRef	pgpLDAP,
	PGPUInt32			option,
	void *				value );


/* Connection starting and stopping functions */
	/* ldap_open */
	PGPError
PGPldapOpen(
	PGPldapContextRef		pgpLDAP,
	PGPChar8 *				host, 
	PGPUInt16				port );

	PGPError
PGPldapOpenTimeout(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			host,
	PGPUInt16			port,
	PGPSocketsTimeValue	*tv );

	/* ldap_simple_bind_s */
	PGPError 
PGPldapSimpleBindSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			password );

	/* ldap_simple_bind_st (extension) */
	PGPError
PGPldapSimpleBindSyncTimeout(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			password,
	PGPSocketsTimeValue *tv);

	/* ldap_simple_bind */
	PGPError
PGPldapSimpleBind(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			password,
	PGPldapMessageID *	messageID );

	/* ldap_bind_s */
	PGPError
PGPldapBindSync(
	PGPldapContextRef	pgpLDAP, 
	PGPChar8 *			dn,
	PGPChar8 *			password,
	PGPldapAuth			method );

	/* ldap_bind */
	PGPError
PGPldapBind(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			password,
	PGPldapAuth			method,
	PGPldapMessageID *	messageID );

	/* ldap_unbind */
	PGPError
PGPldapUnbind(
	PGPldapContextRef	pgpLDAP );


/* Searching functions */
	/* ldap_search_s */
	PGPError 
PGPldapSearchSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			base,
	PGPldapScope		scope,
	PGPChar8 *			filter,
	PGPChar8 *			attrs[],
	PGPBoolean			attrsOnly,
	PGPldapMessageRef	resultMessage );

	/* ldap_search_st */
	PGPError
PGPldapSearchSyncTimeout(
	PGPldapContextRef		pgpLDAP,
	PGPChar8 *				base,
	PGPldapScope			scope,
	PGPChar8 *				filter,
	PGPChar8 *				attrs[],
	PGPBoolean				attrsOnly,
	PGPSocketsTimeValue *	tv,
	PGPldapMessageRef		resultMessage );

	/* ldap_search */
	PGPError 
PGPldapSearch(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			base,
	PGPldapScope		scope,
	PGPChar8 *			filter,
	PGPChar8 *			attrs[],
	PGPBoolean			attrsOnly,
	PGPldapMessageID *	messageID );

	/* ldap_count_entries */
	PGPError
PGPldapCountEntries(
	PGPldapContextRef	pgpLDAP, 
	PGPldapMessageRef	result,
	PGPInt32 *			num );

	/* ldap_first_entry */
	PGPError
PGPldapFirstEntry(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	result,
	PGPldapMessageRef *	outMessage );

	/* ldap_next_entry */
	PGPError
PGPldapNextEntry(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	prevEntry,
	PGPldapMessageRef *	outMessage );

	/* ldap_get_dn */
	PGPError
PGPldapGetDN(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	entry,
	PGPChar8 **			dn );	/* Should be freed by PGPFreeData */

	/* ldap_first_attribute */
	PGPError
PGPldapFirstAttribute( 
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	entry,
	PGPberElementRef *	ber,
	PGPChar8 **				attr );	/* Should be freed by PGPFreeData */

	/* ldap_next_attribute */
	PGPError
PGPldapNextAttribute(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	entry,
	PGPberElementRef	ber,
	PGPChar8 **				attr );	/* Should be freed by PGPFreeData */

	/* ldap_get_values */
	PGPError
PGPldapGetValues(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	entry,
	PGPChar8 *			attr,
	PGPChar8 ***		values );	/* Should be freed by PGPFreeLDAPValues */

	/* ldap_get_values_len */
	PGPError
PGPldapGetValuesLen(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	entry,
	PGPChar8 *			attr,
	PGPberValue ***		values );	/* Should be freed by PGPFreeLDAPValuesLen */

	/* ldap_count_values */
	PGPError
PGPldapCountValues(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 **			values,
	PGPSize *			num );

	/* ldap_count_values_len */
	PGPError
PGPldapCountValuesLen(
	PGPldapContextRef	pgpLDAP,
	PGPberValue **		values,
	PGPSize *			num );


/* Update functions */

	/* ldap_modify */
	PGPError
PGPldapModify(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[],
	PGPldapMessageID *	messageID );

	/* ldap_modify_s */
	PGPError
PGPldapModifySync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[] );

	/* ldap_modify_st (extension) */
	PGPError
PGPldapModifySyncTimeout(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[],
	PGPSocketsTimeValue *tv);

	/* ldap_add */
	PGPError
PGPldapAdd(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[],
	PGPldapMessageID *	messageID );

	/* ldap_add_s */
	PGPError
PGPldapAddSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[] );

	/* ldap_add_st (extension) */
	PGPError
PGPldapAddSyncTimeout(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMod *		mod[],
	PGPSocketsTimeValue	*tv );

	/* ldap_delete */
	PGPError
PGPldapDelete(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPldapMessageID *	messageID );

	/* ldap_delete_s */
	PGPError
PGPldapDeleteSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn );

	/* ldap_delete_st (extension) */
	PGPError
PGPldapDeleteSyncTimeout(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPSocketsTimeValue *tv);

	/* ldap_modrdn2 */
	PGPError
PGPldapModifyRDN(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			newRDN,
	PGPBoolean			deleteOldRDN,
	PGPldapMessageID *	messageID );

	/* ldap_modrdn2_s */
	PGPError
PGPldapModifyRDNSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			newRDN,
	PGPBoolean			deleteOldRDN );

	/* ldap_compare */
	PGPError
PGPldapCompare(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			type,
	PGPChar8 *			value,
	PGPldapMessageID *	messageID );

	/* ldap_compare_s */
	PGPError
PGPldapCompareSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPChar8 *			type,
	PGPChar8 *			value,
	PGPBoolean *		equal );

	PGPError
PGPldapGetCompareResult(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageID	messageID,
	PGPBoolean *		equal );


/* Other functions */
	/* ldap_result */
	PGPError
PGPldapGetResult(
	PGPldapContextRef		pgpLDAP,
	PGPldapMessageID		messageID,
	PGPBoolean				all,
	PGPSocketsTimeValue *	timeout,
	PGPldapMessageRef		result,
	PGPldapType *			messageType );

	/* ldap_abandon */
	PGPError
PGPldapAbandon(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageID	messageID );

	/* ldap_msgid */
	PGPError
PGPldapGetMessageID(
	PGPldapContextRef	pgpLDAP, 
	PGPldapMessageRef	result,
	PGPldapMessageID *	messageID );

	/* ldap_is_ldap_url */
	PGPError
PGPldapIsLDAPURL(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			url,
	PGPBoolean *		isURL );

	/* ldap_url_parse */
	PGPError
PGPldapURLParse( 
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			url,
	PGPldapURLDesc **	outLDAPDesc );	/* Should be freed by PGPFreeLDAPURLDesc */

	/* ldap_url_search */
	PGPError
PGPldapURLSearch(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			url,
	PGPBoolean			attrsOnly,
	PGPldapMessageID *	messageID );

	/* ldap_url_search */
	PGPError
PGPldapURLSearchSync(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			url,
	PGPBoolean			attrsOnly,
	PGPldapMessageRef	resultMessage );

	/* ldap_url_search */
	PGPError
PGPldapURLSearchSyncTimeout(
	PGPldapContextRef		pgpLDAP,
	PGPChar8 *				url,
	PGPBoolean				attrsOnly,
	PGPSocketsTimeValue *	tv,
	PGPldapMessageRef		resultMessage );

	/* ldap_explode_dn */
	PGPError
PGPldapExplodeDN(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 *			dn,
	PGPBoolean			noTypes,
	PGPChar8 ***		components );	/* Should be freed by PGPFreeLDAPValues */

	/* ldap_sort_entries */
	PGPError
PGPldapSortEntries(
	PGPldapContextRef	pgpLDAP,
	PGPldapMessageRef	chain,
	PGPChar8 *			attr,
	PGPInt32			(*compare)( PGPChar8 ** a, PGPChar8 ** b ),
	PGPldapMessageRef	sortedChain );

	/* ldap_sort_values */
	PGPError
PGPldapSortValues(
	PGPldapContextRef	pgpLDAP,
	PGPChar8 **			vals,
	PGPInt32			(*compare)( PGPChar8 ** a, PGPChar8 ** b ),
	PGPChar8 ***		sortedVals );

	/* ldap_sort_strcasecmp */
	PGPInt32
PGPldapCompareStringsIgnoreCase(
	PGPChar8 **			s1,
	PGPChar8 **			s2 );

PGP_END_C_DECLARATIONS

#endif /* ] Included_pgpLDAP_h */


/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/