Summary: Isode provides a number of APIs which allow integrators and product developers to build components that allow client programs to connect to, query and modify data in the directory.
dsapi_bindparams.h
Go to the documentation of this file.
1 /* Emacs mode: -*- C -*- */
2 
3 /*
4  * Copyright (c) 2009-2013, Isode Limited, London, England.
5  * All rights reserved.
6  *
7  * Acquisition and use of this software and related materials for any
8  * purpose requires a written licence agreement from Isode
9  * Limited, or a written licence from an organisation licenced by Isode
10  * Limited to grant such a licence.
11  */
12 
13 /*
14  * dsapi_bindparams.h
15  *
16  * Isode-internal API methods for handling a structure used to hold
17  * bind parameters.
18  */
19 
20 #ifndef ISODE_DSAPI_BINDPARAMS_H
21 #define ISODE_DSAPI_BINDPARAMS_H
22 
23 #include <stddef.h>
24 #include <sys/stat.h>
25 #include <isode/ds/dsapi/dsapi_cdecl.h>
27 #include <openssl/evp.h>
28 #include <isode/crypto/x509.h>
29 
54 typedef enum {
56  DSSimple = 1,
57  DSStrong = 2,
58  DSSASL = 3
59 } DSBindType;
60 
61 #define DS_SASL_BEST_SSF (65535)
62 
67 #ifndef SWIG
68 
76 LIBDSAPI_CDECL
78  DS_BindParams **params_p);
79 
85 LIBDSAPI_CDECL
87  DS_BindParams *params);
88 
103 LIBDSAPI_CDECL
105  const DS_BindParams *in,
106  DS_BindParams **copy_p);
107 
108 
120 LIBDSAPI_CDECL
122  const DS_BindParams *params,
123  DSBindType *bind_type);
124 
142 LIBDSAPI_CDECL
144  DS_BindParams *params,
145  const DS_Identity *id);
146 
167 LIBDSAPI_CDECL
169  DS_BindParams *params,
170  const char *ldap_host,
171  long ldap_port,
172  int check_crls);
173 
188 LIBDSAPI_CDECL
190  const DS_BindParams *params,
191  const DS_Identity **id_p);
192 
193 
214 LIBDSAPI_CDECL
216  const DS_BindParams *params,
217  const char **ldap_host,
218  long *ldap_port,
219  int *check_crls);
220 
221 
222 
232 LIBDSAPI_CDECL
234  DS_BindParams *params);
235 
249 LIBDSAPI_CDECL
251  DS_BindParams *params,
252  const DS_DN *bind_dn,
253  const char *password);
254 
255 
273 LIBDSAPI_CDECL
275  DS_BindParams *params,
276  const DS_Identity *id,
277  const DS_DN *dsa_dn);
278 
304 LIBDSAPI_CDECL
306  DS_BindParams *params,
307  const char *sasl_mechs,
308  const DS_SASLProps *sasl_props,
309  const char *sasl_authentication,
310  const char *sasl_secret);
311 
327 LIBDSAPI_CDECL
329  DS_SASLProps **props_p);
330 
337 LIBDSAPI_CDECL
339  DS_SASLProps *props);
340 
354 LIBDSAPI_CDECL
356  const DS_SASLProps *in,
357  DS_SASLProps **copy_p);
358 
359 
390 LIBDSAPI_CDECL
392  DS_SASLProps *props,
393  int min_ssf,
394  int max_ssf);
395 
409 LIBDSAPI_CDECL
411  const DS_SASLProps *props,
412  int *min_ssf_p,
413  int *max_ssf_p);
414 
430 LIBDSAPI_CDECL
432  DS_SASLProps *props,
433  int maxbufsize
434 );
435 
448 LIBDSAPI_CDECL
450  DS_SASLProps *props,
451  int noplain
452 );
453 
468 LIBDSAPI_CDECL
470  DS_SASLProps *props,
471  int noactive
472 );
473 
488 LIBDSAPI_CDECL
490  DS_SASLProps *props,
491  int nodict
492 );
493 
508 LIBDSAPI_CDECL
510  DS_SASLProps *props,
511  int forwardsec
512 );
513 
526 LIBDSAPI_CDECL
528  DS_SASLProps *props,
529  int noanonymous
530 );
531 
545 LIBDSAPI_CDECL
547  DS_SASLProps *props,
548  int passcred
549 );
550 
588 LIBDSAPI_CDECL
590  DS_SASLProps *props,
591  int enable);
592 
593 #endif /* !SWIG */
594 
599 #endif /* ISODE_DSAPI_BINDPARAMS_H */
DS_Status DS_SASLProps_SetMaxBufferSize(DS_SASLProps *props, int maxbufsize)
Set the security layer maximum buffer size associated with with this SASLProps.
struct DS_DN DS_DN
Definition: dsapi_types.h:103
struct DS_Identity DS_Identity
Definition: dsapi_types.h:57
DSBindType
DS_Status DS_SASLProps_SetPassCredentials(DS_SASLProps *props, int passcred)
Set the "PassCredentials" flag associated with with this SASLProps.
DS_Status DS_SASLProps_GetSSF(const DS_SASLProps *props, int *min_ssf_p, int *max_ssf_p)
Determine the security strength factor (SSF) associated with this SASLProps.
DS_Status DS_SASLProps_SetSSF(DS_SASLProps *props, int min_ssf, int max_ssf)
Set or clear the security strength factor (SSF) associated with this SASLProps.
DS_Status DS_BindParams_SetIdentity(DS_BindParams *params, const DS_Identity *id)
Set or clear the identity for this bind params.
struct DS_BindParams DS_BindParams
Definition: dsapi_types.h:51
DS_Status DS_BindParams_SetCertificateServer(DS_BindParams *params, const char *ldap_host, long ldap_port, int check_crls)
Set or clear the details for the LDAP server that holds certificates and/or CRLs. ...
DS_Status DS_BindParams_SetSASL(DS_BindParams *params, const char *sasl_mechs, const DS_SASLProps *sasl_props, const char *sasl_authentication, const char *sasl_secret)
Mark this set of bind parameters as being for a SASL bind. It only makes sense to do SASL binds on an...
DS_Status DS_SASLProps_SetNoPlaintext(DS_SASLProps *props, int noplain)
Set the "NoPlaintext" flag associated with with this SASLProps.
DS_Status DS_BindParams_SetStrong(DS_BindParams *params, const DS_Identity *id, const DS_DN *dsa_dn)
Mark this set of bind parameters as being for a strong bind.
void DS_SASLProps_Delete(DS_SASLProps *props)
Delete a DS_SASLProps structure.
void DS_BindParams_Delete(DS_BindParams *params)
Delete a bind parameters object.
DS_Status DS_SASLProps_New(DS_SASLProps **props_p)
Allocate a new DS_SASLProps structure.
DS_Status DS_SASLProps_SetADcompat(DS_SASLProps *props, int enable)
Set or clear the "Active Directory compatibility" flag associated with this SASLProps.
DS_Status DS_BindParams_New(DS_BindParams **params_p)
Create a bind parameters structure.
Directory API type definitions and forward declarations of private types.
DS_Status DS_SASLProps_SetNoActive(DS_SASLProps *props, int noactive)
Set the "NoActive" flag associated with with this SASLProps.
DS_Status DS_BindParams_GetBindType(const DS_BindParams *params, DSBindType *bind_type)
Get the bind type for this bind params.
DS_Status DS_SASLProps_SetNoDictionary(DS_SASLProps *props, int nodict)
Set the "NoDictionary" flag associated with with this SASLProps.
DS_Status DS_BindParams_SetSimple(DS_BindParams *params, const DS_DN *bind_dn, const char *password)
Mark this set of bind parameters as being for a simple bind.
DS_Status DS_BindParams_SetAnonymous(DS_BindParams *params)
Mark this set of bind parameters as being for an anonymous bind.
DS_Status DS_SASLProps_SetForwardSecrecy(DS_SASLProps *props, int forwardsec)
Set the "ForwardSecrecy" flag associated with with this SASLProps.
DS_Status DS_BindParams_GetIdentity(const DS_BindParams *params, const DS_Identity **id_p)
identity for this bind params.
DS_Status DS_SASLProps_Copy(const DS_SASLProps *in, DS_SASLProps **copy_p)
Copy a DS_SASLProps structure.
DS_Status
Definition: dsapi_const.h:66
DS_Status DS_BindParams_GetCertificateServer(const DS_BindParams *params, const char **ldap_host, long *ldap_port, int *check_crls)
Get the details of the LDAP server used to locate certificates and/or CRLs.
DS_Status DS_BindParams_Copy(const DS_BindParams *in, DS_BindParams **copy_p)
Copy a DS_BindParams structure.
DS_Status DS_SASLProps_SetNoAnonymous(DS_SASLProps *props, int noanonymous)
Set the "NoAnonymous" flag associated with with this SASLProps.
struct DS_SASLProps DS_SASLProps
Definition: dsapi_types.h:63