X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=include%2Fsaslplug.h;h=3e0555b5ae3afc5c6509df95feb3d924a89b695d;hb=abab84efc7e7e02926e97f94074f17fe06112b18;hp=fecb7de9d01309e269434a08855be4ecae33b990;hpb=f6e4ccbcd3d146f1bd0bc7662036a2badb2754a1;p=cyrus-sasl.git diff --git a/include/saslplug.h b/include/saslplug.h index fecb7de..3e0555b 100755 --- a/include/saslplug.h +++ b/include/saslplug.h @@ -193,12 +193,12 @@ typedef struct sasl_out_params { void *client_creds; /* for additions which don't require a version upgrade; set to 0 */ - void *gss_peer_name; - void *gss_local_name; - void *spare_ptr4; + const void *gss_peer_name; + const void *gss_local_name; + const char *cbindingname; /* channel binding name from packet */ int (*spare_fptr1)(); int (*spare_fptr2)(); - int spare_int1; + unsigned int cbindingdisp; /* channel binding disposition from client */ int spare_int2; int spare_int3; int spare_int4; @@ -219,7 +219,21 @@ typedef enum { SASL_INFO_LIST_END } sasl_info_callback_stage_t; +/****************************** + * Channel binding macros ** + ******************************/ + +typedef enum { + SASL_CB_DISP_NONE = 0, /* client did not support CB */ + SASL_CB_DISP_USED, /* client supports and used CB */ + SASL_CB_DISP_WANT /* client supports CB, thinks server does not */ +} sasl_cbinding_disp_t; +/* TRUE if channel binding is non-NULL */ +#define SASL_CB_PRESENT(params) ((params)->cbinding != NULL) +/* TRUE if channel binding is marked critical */ +#define SASL_CB_CRITICAL(params) (SASL_CB_PRESENT(params) && \ + (params)->cbinding->critical) /****************************** * Client Mechanism Functions * @@ -254,8 +268,8 @@ typedef struct sasl_client_params { sasl_ssf_t external_ssf; /* external SSF active */ /* for additions which don't require a version upgrade; set to 0 */ - void *gss_creds; - void *spare_ptr2; + const void *gss_creds; /* GSS credential handle */ + const sasl_channel_binding_t *cbinding; /* client channel binding */ void *spare_ptr3; void *spare_ptr4; @@ -289,8 +303,8 @@ typedef struct sasl_client_params { int (*spare_fptr1)(); - int spare_int1; - int spare_int2; + unsigned int cbindingdisp; + unsigned int spare_int2; int spare_int3; /* flags field as passed to sasl_client_new */ @@ -329,6 +343,12 @@ typedef struct sasl_client_params { /* This plugin allows proxying */ #define SASL_FEAT_ALLOWS_PROXY 0x0020 +/* Underlying mechanism uses GSS framing */ +#define SASL_FEAT_GSS_FRAMING 0x0040 + +/* Underlying mechanism supports channel binding */ +#define SASL_FEAT_CHANNEL_BINDING 0x0080 + /* client plug-in features */ #define SASL_FEAT_NEEDSERVERFQDN 0x0001 @@ -550,8 +570,8 @@ typedef struct sasl_server_params { struct propctx *propctx; /* for additions which don't require a version upgrade; set to 0 */ - void *gss_creds; - void *spare_ptr2; + const void *gss_creds; /* GSS credential handle */ + const sasl_channel_binding_t *cbinding; /* server channel binding */ void *spare_ptr3; void *spare_ptr4; int (*spare_fptr1)();