xref: /memcached-1.4.29/sasl_defs.h (revision b0a858ce)
1f1307c4dSDustin Sallings #ifndef SASL_DEFS_H
2f1307c4dSDustin Sallings #define SASL_DEFS_H 1
3f1307c4dSDustin Sallings 
43705435bSDustin Sallings // Longest one I could find was ``9798-U-RSA-SHA1-ENC''
53705435bSDustin Sallings #define MAX_SASL_MECH_LEN 32
63705435bSDustin Sallings 
7f1307c4dSDustin Sallings #if defined(HAVE_SASL_SASL_H) && defined(ENABLE_SASL)
8f1307c4dSDustin Sallings 
9f1307c4dSDustin Sallings #include <sasl/sasl.h>
10f1307c4dSDustin Sallings void init_sasl(void);
11f1307c4dSDustin Sallings 
12*b0a858ceSDustin Sallings extern char my_sasl_hostname[1025];
13*b0a858ceSDustin Sallings 
14f1307c4dSDustin Sallings #else /* End of SASL support */
15f1307c4dSDustin Sallings 
16f1307c4dSDustin Sallings typedef void* sasl_conn_t;
17f1307c4dSDustin Sallings 
18f1307c4dSDustin Sallings #define init_sasl() {}
19f1307c4dSDustin Sallings #define sasl_dispose(x) {}
20f1307c4dSDustin Sallings #define sasl_server_new(a, b, c, d, e, f, g, h) 1
21f1307c4dSDustin Sallings #define sasl_listmech(a, b, c, d, e, f, g, h) 1
22f1307c4dSDustin Sallings #define sasl_server_start(a, b, c, d, e, f) 1
23f1307c4dSDustin Sallings #define sasl_server_step(a, b, c, d, e) 1
24f1307c4dSDustin Sallings #define sasl_getprop(a, b, c) {}
25f1307c4dSDustin Sallings 
26f1307c4dSDustin Sallings #define SASL_OK 0
27f1307c4dSDustin Sallings #define SASL_CONTINUE -1
28f1307c4dSDustin Sallings 
29f1307c4dSDustin Sallings #endif /* sasl compat */
30f1307c4dSDustin Sallings 
31f1307c4dSDustin Sallings #endif /* SASL_DEFS_H */
32