Renumber CB-specific error codes/flags
[cyrus-sasl.git] / include / sasl.h
index 714f0ca..de0abf3 100755 (executable)
 #define SASL_NOCHANGE   -22  /* requested change was not needed */
 #define SASL_WEAKPASS   -27  /* passphrase is too weak for security policy */
 #define SASL_NOUSERPASS -28  /* user supplied passwords not permitted */
+#define SASL_NEED_OLD_PASSWD   -29 /* sasl_setpass needs old password in order
+                                   to perform password change */
+#define SASL_CONSTRAINT_VIOLAT -30 /* a property can't be stored,
+                                      because of some constrains/policy violation */
+#define SASL_USER_EXISTS       -31 /* sasl_auxprop_rename_user has failed because
+                                      new_userid already exists */
+#define SASL_BADBINDING                -32 /* channel binding failure */
 
 /* max size of a sasl mechanism name */
 #define SASL_MECHNAMEMAX 20
@@ -791,14 +798,15 @@ LIBSASL_API int sasl_getprop(sasl_conn_t *conn, int propnum,
  * is particularly useful for servers that respond to multiple names. */
 #define        SASL_GSS_LOCAL_NAME     20
 
-typedef struct sasl_channel_bindings {
-    char *type;
+/* Channel binding information. Memory is managed by the caller. */
+typedef struct sasl_channel_binding {
+    const char *name;
     int critical;
     unsigned long len;
-    unsigned char *data;
-} sasl_channel_bindings;
+    const unsigned char *data;
+} sasl_channel_binding_t;
 
-#define SASL_CHANNEL_BINDINGS   21
+#define SASL_CHANNEL_BINDING    21
 
 /* set property in SASL connection state
  * returns: