diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib-sasl/dsasl-client-private.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/lib-sasl/dsasl-client-private.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/lib-sasl/dsasl-client-private.h b/src/lib-sasl/dsasl-client-private.h new file mode 100644 index 0000000..65b86f7 --- /dev/null +++ b/src/lib-sasl/dsasl-client-private.h @@ -0,0 +1,45 @@ +#ifndef DSASL_CLIENT_PRIVATE_H +#define DSASL_CLIENT_PRIVATE_H + +#include "dsasl-client.h" + +enum dsasl_mech_security_flags { + DSASL_MECH_SEC_ALLOW_NULS = 0x0001, +}; + +struct dsasl_client { + pool_t pool; + struct dsasl_client_settings set; + char *password; + const struct dsasl_client_mech *mech; +}; + +struct dsasl_client_mech { + const char *name; + size_t struct_size; + enum dsasl_mech_security_flags flags; + + int (*input)(struct dsasl_client *client, + const unsigned char *input, size_t input_len, + const char **error_r); + int (*output)(struct dsasl_client *client, + const unsigned char **output_r, size_t *output_len_r, + const char **error_r); + int (*set_parameter)(struct dsasl_client *client, + const char *key, const char *value, + const char **error_r); + int (*get_result)(struct dsasl_client *client, + const char *key, const char **value_r, + const char **error_r); + void (*free)(struct dsasl_client *client); +}; + +extern const struct dsasl_client_mech dsasl_client_mech_external; +extern const struct dsasl_client_mech dsasl_client_mech_login; +extern const struct dsasl_client_mech dsasl_client_mech_oauthbearer; +extern const struct dsasl_client_mech dsasl_client_mech_xoauth2; + +void dsasl_client_mech_register(const struct dsasl_client_mech *mech); +void dsasl_client_mech_unregister(const struct dsasl_client_mech *mech); + +#endif |