version 1.15, 2000/04/11 23:07:21
|
version 1.16, 2000/04/20 07:23:52
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.14 2000/03/14 03:08:12 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.15 2000/04/11 23:07:21 kurt Exp $ */ |
/* |
/* |
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 782 ldap_pvt_sasl_getsimple(void *context, i
|
Line 782 ldap_pvt_sasl_getsimple(void *context, i
|
return SASL_OK; |
return SASL_OK; |
} |
} |
|
|
|
int |
|
ldap_pvt_sasl_get_option( LDAP *ld, int option, void *arg ) |
|
{ |
|
sasl_ssf_t *ssf; |
|
|
|
if ( ld == NULL ) |
|
return -1; |
|
|
|
switch ( option ) { |
|
case LDAP_OPT_X_SASL_MINSSF: |
|
*(int *)arg = ld->ld_options.ldo_sasl_minssf; |
|
break; |
|
case LDAP_OPT_X_SASL_MAXSSF: |
|
*(int *)arg = ld->ld_options.ldo_sasl_maxssf; |
|
break; |
|
case LDAP_OPT_X_SASL_ACTSSF: |
|
if ( ld->ld_sasl_context == NULL ) { |
|
*(int *)arg = -1; |
|
break; |
|
} |
|
if ( sasl_getprop( ld->ld_sasl_context, SASL_SSF, &ssf ) |
|
!= SASL_OK ) |
|
return -1; |
|
*(int *)arg = *ssf; |
|
break; |
|
default: |
|
return -1; |
|
} |
|
return 0; |
|
} |
|
|
|
int |
|
ldap_pvt_sasl_set_option( LDAP *ld, int option, void *arg ) |
|
{ |
|
if ( ld == NULL ) |
|
return -1; |
|
|
|
switch ( option ) { |
|
case LDAP_OPT_X_SASL_MINSSF: |
|
ld->ld_options.ldo_sasl_minssf = *(int *)arg; |
|
break; |
|
case LDAP_OPT_X_SASL_MAXSSF: |
|
ld->ld_options.ldo_sasl_maxssf = *(int *)arg; |
|
break; |
|
case LDAP_OPT_X_SASL_ACTSSF: |
|
/* This option is read-only */ |
|
default: |
|
return -1; |
|
} |
|
return 0; |
|
} |
|
|
/* |
/* |
* ldap_negotiated_sasl_bind_s - bind to the ldap server (and X.500) |
* ldap_negotiated_sasl_bind_s - bind to the ldap server (and X.500) |
* using SASL authentication. |
* using SASL authentication. |