aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 0712110..f58747c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -148,7 +148,42 @@ cb_define_format(enum grecs_callback_command cmd,
&value->v.arg.v[1]->locus);
return 0;
}
+
+static struct grecs_keyword ssl_kw[] = {
+ { "enable", NULL,
+ "Use SSL",
+ grecs_type_bool, GRECS_DFLT, &use_ssl },
+ { "verify", NULL,
+ "Verify peer certificate",
+ grecs_type_bool, GRECS_DFLT, &ssl_verify_peer },
+ { "ca-file", NULL,
+ "File holding CA certificates",
+ grecs_type_string, GRECS_DFLT, &ssl_ca_file },
+ { "ca-path", NULL,
+ "Directory holding files with CA certificates",
+ grecs_type_string, GRECS_DFLT, &ssl_ca_path },
+ { NULL }
+};
+static int
+cb_ssl(enum grecs_callback_command cmd,
+ grecs_locus_t *locus,
+ void *varptr,
+ grecs_value_t *value,
+ void *cb_data)
+{
+ if (cmd == grecs_callback_set_value) {
+ if (!value || value->type != GRECS_TYPE_STRING ||
+ grecs_string_convert(&use_ssl, grecs_type_bool,
+ value->v.string, &value->locus)) {
+ grecs_error (value ? &value->locus : locus, 0,
+ _("expected boolean value"));
+ return 1;
+ }
+ }
+ return 0;
+}
+
static struct grecs_keyword eclat_kw[] = {
{ "default-endpoint", "hostname",
"Set default EC2 endpoint",
@@ -162,6 +197,17 @@ static struct grecs_keyword eclat_kw[] = {
{ "default-region", "name",
"Define default AWS region",
grecs_type_string, GRECS_DFLT, &region_name },
+ { "ssl", NULL,
+ "Configure SSL. The ssl keyword can also be used in scalar form, like this:\n\n"
+ " ssl yes;\n"
+ "\n"
+ "Use this form if you don't need any fine tuning and only wish to enable\n"
+ "or disable SSL.\n\n"
+ "By default SSL is disabled."
+ ,
+ grecs_type_section, GRECS_DFLT,
+ NULL, 0,
+ cb_ssl, NULL, ssl_kw },
{ "format", "<command: string> <format: string>",
"Set default format for <command>",
grecs_type_string, GRECS_MULT, NULL, 0, cb_format },

Return to:

Send suggestions and report system problems to the System administrator.