/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "dsasl-client-private.h"
struct plain_dsasl_client {
bool output_sent;
};
static int
const char **error_r)
{
(struct plain_dsasl_client *)_client;
if (!client->output_sent) {
if (input_len > 0) {
*error_r = "Server sent non-empty initial response";
return -1;
}
} else {
*error_r = "Server didn't finish authentication";
return -1;
}
return 0;
}
static int
const char **error_r)
{
(struct plain_dsasl_client *)_client;
*error_r = "authid not set";
return -1;
}
*error_r = "password not set";
return -1;
}
return 0;
}
.name = "PLAIN",
.struct_size = sizeof(struct plain_dsasl_client),
};