projects
/
cyrus-sasl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7c78517
)
make channel binding disposition an enum
author
Luke Howard
<lukeh@padl.com>
Tue, 28 Sep 2010 16:54:04 +0000
(18:54 +0200)
committer
Luke Howard
<lukeh@padl.com>
Tue, 28 Sep 2010 16:54:04 +0000
(18:54 +0200)
include/saslplug.h
patch
|
blob
|
history
lib/client.c
patch
|
blob
|
history
diff --git
a/include/saslplug.h
b/include/saslplug.h
index
d9547fe
..
ad96e93
100755
(executable)
--- a/
include/saslplug.h
+++ b/
include/saslplug.h
@@
-223,12
+223,15
@@
typedef enum {
* Channel binding macros **
******************************/
* 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)
#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)
#define SASL_CB_CRITICAL(params) (SASL_CB_PRESENT(params) && \
(params)->cbinding->critical)
diff --git
a/lib/client.c
b/lib/client.c
index
18bab7d
..
e4ef163
100644
(file)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-470,7
+470,7
@@
static inline int
_sasl_cbinding_disp(sasl_client_params_t *cparams,
int mech_nego,
int server_can_cb,
_sasl_cbinding_disp(sasl_client_params_t *cparams,
int mech_nego,
int server_can_cb,
-
unsigned in
t *cbindingdisp)
+
sasl_cbinding_disp_
t *cbindingdisp)
{
/*
* If negotiating mechanisms, then we fail immediately if the
{
/*
* If negotiating mechanisms, then we fail immediately if the
@@
-526,7
+526,7
@@
int sasl_client_start(sasl_conn_t *conn,
size_t i, list_len;
sasl_ssf_t bestssf = 0, minssf = 0;
int result, server_can_cb = 0;
size_t i, list_len;
sasl_ssf_t bestssf = 0, minssf = 0;
int result, server_can_cb = 0;
-
unsigned in
t cbindingdisp;
+
sasl_cbinding_disp_
t cbindingdisp;
if(_sasl_client_active==0) return SASL_NOTINIT;
if(_sasl_client_active==0) return SASL_NOTINIT;