int *l, maxfd=0;
int r, i;
sasl_conn_t *conn;
+ int cb_flag = 0;
- while ((c = getopt(argc, argv, "p:s:m:")) != EOF) {
+ while ((c = getopt(argc, argv, "cp:s:m:")) != EOF) {
switch(c) {
+ case 'c':
+ cb_flag = 1;
+ break;
+
case 'p':
port = optarg;
break;
int nfds, fd = -1;
FILE *in, *out;
fd_set readfds;
+ sasl_channel_binding cb;
FD_ZERO(&readfds);
for (i = 1; i <= l[0]; i++)
NULL, 0, &conn);
if (r != SASL_OK) saslfail(r, "allocating connection state");
+ cb.type = "sasl-sample";
+ cb.critical = cb_flag;
+ cb.data = "this is a test of channel binding";
+ cb.len = strlen(cb.data);
+
+ sasl_setprop(conn, SASL_CHANNEL_BINDING, &cb);
+
/* set external properties here
sasl_setprop(conn, SASL_SSF_EXTERNAL, &extprops); */