dsapi_bindparams.h
Go to the documentation of this file.
1 /* Emacs mode: -*- C -*- */
2 
3 /*
4  * Copyright (c) 2009-2021, 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 
329 LIBDSAPI_CDECL
331  DS_BindParams *params,
332  const char *sasl_realm);
333 
334 
350 LIBDSAPI_CDECL
352  DS_SASLProps **props_p);
353 
360 LIBDSAPI_CDECL
362  DS_SASLProps *props);
363 
377 LIBDSAPI_CDECL
379  const DS_SASLProps *in,
380  DS_SASLProps **copy_p);
381 
382 
413 LIBDSAPI_CDECL
415  DS_SASLProps *props,
416  int min_ssf,
417  int max_ssf);
418 
432 LIBDSAPI_CDECL
434  const DS_SASLProps *props,
435  int *min_ssf_p,
436  int *max_ssf_p);
437 
453 LIBDSAPI_CDECL
455  DS_SASLProps *props,
456  int maxbufsize
457 );
458 
471 LIBDSAPI_CDECL
473  DS_SASLProps *props,
474  int noplain
475 );
476 
491 LIBDSAPI_CDECL
493  DS_SASLProps *props,
494  int noactive
495 );
496 
511 LIBDSAPI_CDECL
513  DS_SASLProps *props,
514  int nodict
515 );
516 
531 LIBDSAPI_CDECL
533  DS_SASLProps *props,
534  int forwardsec
535 );
536 
549 LIBDSAPI_CDECL
551  DS_SASLProps *props,
552  int noanonymous
553 );
554 
568 LIBDSAPI_CDECL
570  DS_SASLProps *props,
571  int passcred
572 );
573 
611 LIBDSAPI_CDECL
613  DS_SASLProps *props,
614  int enable);
615 
616 #endif /* !SWIG */
617 
622 #endif /* ISODE_DSAPI_BINDPARAMS_H */
void DS_BindParams_Delete(DS_BindParams *params)
Delete a bind parameters object.
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.
@ DSSimple
DS_Status DS_SASLProps_SetNoDictionary(DS_SASLProps *props, int nodict)
Set the "NoDictionary" flag associated with with this SASLProps.
DS_Status DS_SASLProps_SetPassCredentials(DS_SASLProps *props, int passcred)
Set the "PassCredentials" flag associated with with this SASLProps.
struct DS_DN DS_DN
Definition: dsapi_types.h:103
DS_Status
Definition: dsapi_const.h:66
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_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_SetIdentity(DS_BindParams *params, const DS_Identity *id)
Set or clear the identity for this bind params.
DS_Status DS_SASLProps_Copy(const DS_SASLProps *in, DS_SASLProps **copy_p)
Copy a DS_SASLProps structure.
void DS_SASLProps_Delete(DS_SASLProps *props)
Delete a DS_SASLProps structure.
DS_Status DS_BindParams_SetAnonymous(DS_BindParams *params)
Mark this set of bind parameters as being for an anonymous bind.
DSBindType
DS_Status DS_BindParams_SetSASLRealm(DS_BindParams *params, const char *sasl_realm)
Set the SASL realm for this set of (SASL) bind parameters. It only makes sense to do this for an obje...
DS_Status DS_SASLProps_SetNoPlaintext(DS_SASLProps *props, int noplain)
Set the "NoPlaintext" flag associated with with this SASLProps.
@ DSSASL
DS_Status DS_BindParams_New(DS_BindParams **params_p)
Create a bind parameters structure.
struct DS_SASLProps DS_SASLProps
Definition: dsapi_types.h:63
@ DSStrong
DS_Status DS_SASLProps_SetMaxBufferSize(DS_SASLProps *props, int maxbufsize)
Set the security layer maximum buffer size associated with with this SASLProps.
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_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_GetBindType(const DS_BindParams *params, DSBindType *bind_type)
Get the bind type for this bind params.
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_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.
struct DS_Identity DS_Identity
Definition: dsapi_types.h:57
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_BindParams_Copy(const DS_BindParams *in, DS_BindParams **copy_p)
Copy a DS_BindParams structure.
DS_Status DS_SASLProps_SetNoActive(DS_SASLProps *props, int noactive)
Set the "NoActive" flag associated with with this SASLProps.
Directory API type definitions and forward declarations of private types.
DS_Status DS_SASLProps_New(DS_SASLProps **props_p)
Allocate a new DS_SASLProps structure.
DS_Status DS_SASLProps_SetNoAnonymous(DS_SASLProps *props, int noanonymous)
Set the "NoAnonymous" flag associated with with this SASLProps.
DS_Status DS_SASLProps_SetForwardSecrecy(DS_SASLProps *props, int forwardsec)
Set the "ForwardSecrecy" flag associated with with this SASLProps.
struct DS_BindParams DS_BindParams
Definition: dsapi_types.h:51
DS_Status DS_BindParams_GetIdentity(const DS_BindParams *params, const DS_Identity **id_p)
identity for this bind params.
@ DSAnonymous

All rights reserved © 2002 - 2024 Isode Ltd.