char *pubkey;
char *hostpubmd5;
char *engine;
- bool list_engines;
bool crlf;
char *customrequest;
char *krblevel;
case 'f': /* crypto engine */
GetStr(&config->engine, nextarg);
if(config->engine && curlx_raw_equal(config->engine,"list"))
- config->list_engines = TRUE;
+ return PARAM_ENGINES_REQUESTED;
break;
case 'g': /* CA info PEM file */
/* CA cert directory */
orig_opt = argv[i];
if(curlx_strequal(":", argv[i]) &&
- ((config->url_list && config->url_list->url) || config->list_engines)) {
+ (config->url_list && config->url_list->url)) {
/* Allocate the next config */
config->next = malloc(sizeof(struct Configurable));
}
}
- if(result && result != PARAM_HELP_REQUESTED) {
+ if(result && result != PARAM_HELP_REQUESTED &&
+ result != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(result);
if(!curlx_strequal(":", orig_opt))
PARAM_REQUIRES_PARAMETER,
PARAM_BAD_USE,
PARAM_HELP_REQUESTED,
+ PARAM_ENGINES_REQUESTED,
PARAM_GOT_EXTRA_PARAMETER,
PARAM_BAD_NUMERIC,
PARAM_NEGATIVE_NUMERIC,
/* Parse the command line arguments */
ParameterError res = parse_args(config, argc, argv);
if(res) {
- if(res != PARAM_HELP_REQUESTED)
+ result = CURLE_OK;
+
+ /* Check if we were asked to list the SSL engines */
+ if(res == PARAM_ENGINES_REQUESTED)
+ tool_list_engines(config->easy);
+ else if(res != PARAM_HELP_REQUESTED)
result = CURLE_FAILED_INIT;
- else
- result = CURLE_OK;
- }
- /* Check if we were asked to list the SSL engines */
- else if(config->list_engines) {
- tool_list_engines(config->easy);
}
/* Perform the main operations */
else {
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
if(!strcmp(filename, "-")) {
filename = (char *)"<stdin>";
}
- if(PARAM_HELP_REQUESTED != res) {
+ if(res != PARAM_HELP_REQUESTED &&
+ res != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(res);
warnf(config, "%s:%d: warning: '%s' %s\n",
filename, lineno, option, reason);