This indicates whether mechanism uses password at all.
enum dsasl_mech_security_flags {
DSASL_MECH_SEC_ALLOW_NULS = BIT(1),
+ DSASL_MECH_SEC_NO_PASSWORD = BIT(2),
};
struct dsasl_client {
return mech->name;
}
+bool dsasl_client_mech_uses_password(const struct dsasl_client_mech *mech)
+{
+ return (mech->flags & DSASL_MECH_SEC_NO_PASSWORD) == 0;
+}
+
void dsasl_client_mech_register(const struct dsasl_client_mech *mech)
{
unsigned int idx;
const struct dsasl_client_mech *dsasl_client_mech_find(const char *name);
const char *dsasl_client_mech_get_name(const struct dsasl_client_mech *mech);
+bool dsasl_client_mech_uses_password(const struct dsasl_client_mech *mech);
struct dsasl_client *dsasl_client_new(const struct dsasl_client_mech *mech,
const struct dsasl_client_settings *set);
const struct dsasl_client_mech dsasl_client_mech_external = {
.name = "EXTERNAL",
.struct_size = sizeof(struct external_dsasl_client),
+ .flags = DSASL_MECH_SEC_NO_PASSWORD,
.input = mech_external_input,
.output = mech_external_output