static int
dsync_connect_tcp(struct dsync_cmd_context *ctx,
- const struct master_service_ssl_settings *ssl_set,
+ struct mail_storage_service_user *service_user,
const char *target, bool ssl, const char **error_r)
{
struct doveadm_client_settings conn_set;
}
if (ssl) {
- master_service_ssl_client_settings_to_iostream_set(ssl_set,
- pool_datastack_create(), &conn_set.ssl_set);
-
+ if (mail_storage_service_user_init_ssl_client_settings(
+ service_user, pool_datastack_create(),
+ &conn_set.ssl_set, error_r) < 0)
+ return -1;
if (ctx->ssl_ctx == NULL &&
ssl_iostream_client_context_cache_get(&conn_set.ssl_set,
&ctx->ssl_ctx,
static int
parse_location(struct dsync_cmd_context *ctx,
- const struct master_service_ssl_settings *ssl_set,
+ struct mail_storage_service_user *service_user,
const char *location,
const char *const **remote_cmd_args_r, const char **error_r)
{
if (str_begins(location, "tcp:", &ctx->remote_name)) {
/* TCP connection to remote dsync */
- return dsync_connect_tcp(ctx, ssl_set, ctx->remote_name,
+ return dsync_connect_tcp(ctx, service_user, ctx->remote_name,
FALSE, error_r);
}
if (str_begins(location, "tcps:", &ctx->remote_name)) {
/* TCP+SSL connection to remote dsync */
- return dsync_connect_tcp(ctx, ssl_set, ctx->remote_name,
+ return dsync_connect_tcp(ctx, service_user, ctx->remote_name,
TRUE, error_r);
}
const char *const *remote_cmd_args = NULL;
const struct mail_user_settings *user_set;
- const struct master_service_ssl_settings *ssl_set;
const char *username = "";
user_set = mail_storage_service_user_get_set(service_user,
&mail_user_setting_parser_info);
- ssl_set = mail_storage_service_user_get_ssl_settings(service_user);
ctx->fd_in = -1;
ctx->fd_out = -1;
}
if (remote_cmd_args == NULL && ctx->local_location != NULL) {
- if (parse_location(ctx, ssl_set, ctx->local_location,
+ if (parse_location(ctx, service_user, ctx->local_location,
&remote_cmd_args, error_r) < 0)
return -1;
}