* Channel binding macros **
******************************/
-/* TRUE if channel binding is non-NULL */
-#define SASL_CB_DISP_NONE 0x00 /* client did not support CB */
-#define SASL_CB_DISP_USED 0x01 /* client supports CB, thinks server does not */
-#define SASL_CB_DISP_WANT 0x02 /* client supports and used CB */
+typedef enum {
+ SASL_CB_DISP_NONE = 0, /* client did not support CB */
+ SASL_CB_DISP_USED, /* client supports CB, thinks server does not */
+ SASL_CB_DISP_WANT /* client supports and used CB */
+} 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)
_sasl_cbinding_disp(sasl_client_params_t *cparams,
int mech_nego,
int server_can_cb,
- unsigned int *cbindingdisp)
+ sasl_cbinding_disp_t *cbindingdisp)
{
/*
* If negotiating mechanisms, then we fail immediately if the
size_t i, list_len;
sasl_ssf_t bestssf = 0, minssf = 0;
int result, server_can_cb = 0;
- unsigned int cbindingdisp;
+ sasl_cbinding_disp_t cbindingdisp;
if(_sasl_client_active==0) return SASL_NOTINIT;