mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Add SASL_MECHLIST option to retrieve list of known SASL mechs
This commit is contained in:
parent
6c70453ba4
commit
b2432fdbf2
@ -164,7 +164,8 @@ LDAP_BEGIN_DECL
|
||||
#define LDAP_OPT_X_SASL_SECPROPS 0x6106 /* write-only */
|
||||
#define LDAP_OPT_X_SASL_SSF_MIN 0x6107
|
||||
#define LDAP_OPT_X_SASL_SSF_MAX 0x6108
|
||||
#define LDAP_OPT_X_SASL_MAXBUFSIZE 0x6109
|
||||
#define LDAP_OPT_X_SASL_MAXBUFSIZE 0x6109
|
||||
#define LDAP_OPT_X_SASL_MECHLIST 0x610a /* read-only */
|
||||
|
||||
/* Private API Extensions -- reserved for application use */
|
||||
#define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x7000 /* Private API inclusive */
|
||||
|
@ -1123,6 +1123,13 @@ ldap_int_sasl_config( struct ldapoptions *lo, int option, const char *arg )
|
||||
int
|
||||
ldap_int_sasl_get_option( LDAP *ld, int option, void *arg )
|
||||
{
|
||||
if ( option == LDAP_OPT_X_SASL_MECHLIST ) {
|
||||
if ( ldap_int_sasl_init() )
|
||||
return -1;
|
||||
*(char ***)arg = sasl_global_listmech();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( ld == NULL )
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user