diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-16 23:20:19 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-16 23:20:19 +0300 |
commit | 59fd27abd2fc4e0201695976edfdde84fe37aea0 (patch) | |
tree | 11af0390ea7886f915590b1a74555898d6fab7d6 /src/cmdline.opt | |
parent | 086f544ad76e8d9560c39d11ea556c570e46d7c4 (diff) | |
download | eclat-59fd27abd2fc4e0201695976edfdde84fe37aea0.tar.gz eclat-59fd27abd2fc4e0201695976edfdde84fe37aea0.tar.bz2 |
Provide configuration statements for SSL control.
* doc/eclat.conf.5: Document new configuration statements.
* src/cmdline.opt (replvar): Change structure.
(replace_int_var): New function.
* src/config.c: Use "ssl" as a block or scalar statement.
* src/eclat.c (ssl_verify_peer, ssl_ca_file)
(ssl_ca_path): New variables.
(main): Set up SSL configuration.
* src/eclat.h (ssl_verify_peer, ssl_ca_file)
(ssl_ca_path): New protos.
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r-- | src/cmdline.opt | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt index 5ecaa9b..8d82e9d 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt @@ -23,8 +23,18 @@ static size_t pp_cmd_bufsize; static size_t pp_cmd_buflevel; struct replvar { - char **s_ptr; - char *s_val; + union { + char **strptr; + int *intptr; + } r_pointer; +#define s_ptr r_pointer.strptr +#define i_ptr r_pointer.intptr + union { + char *strval; + int intval; + } r_value; +#define s_val r_value.strval +#define i_val r_value.intval }; int @@ -35,6 +45,14 @@ replace_string_var(void *p) return 0; } +int +replace_int_var(void *p) +{ + struct replvar *rv = p; + *rv->i_ptr = rv->i_val; + return 0; +} + OPTIONS_BEGIN("eclat", [<EC2 Command Line Administrator Tool>], [<COMMAND [COMMAND-OPTIONS...]>], @@ -104,7 +122,10 @@ END OPTION(ssl,,, [<use SSL (HTTPS) connection>]) BEGIN - use_ssl = 1; + struct replvar *rv = grecs_malloc(sizeof(*rv)); + rv->i_ptr = &use_ssl; + rv->i_val = 1; + add_config_finish_hook(replace_int_var, rv); END OPTION(format,H,NAME, |