1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

tool_operate: Moved list engines into separate function in tool_help

This commit is contained in:
Steve Holme 2014-02-22 16:04:30 +00:00
parent e08d0662b7
commit 6969e24aee
3 changed files with 13 additions and 4 deletions

View File

@ -23,6 +23,7 @@
#include "tool_panykey.h"
#include "tool_help.h"
#include "tool_operhlp.h"
#include "memdebug.h" /* keep this as LAST include */
@ -256,3 +257,12 @@ void tool_help(void)
#endif
}
}
void tool_list_engines(CURL *curl)
{
struct curl_slist *engines = NULL;
curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
list_engines(engines);
curl_slist_free_all(engines);
}

View File

@ -24,6 +24,7 @@
#include "tool_setup.h"
void tool_help(void);
void tool_list_engines(CURL *curl);
#endif /* HEADER_CURL_TOOL_HELP_H */

View File

@ -79,6 +79,7 @@
#include "tool_writeout.h"
#include "tool_xattr.h"
#include "tool_vms.h"
#include "tool_help.h"
#include "memdebug.h" /* keep this as LAST include */
@ -1831,10 +1832,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
}
/* Check if we were asked to list the SSL engines */
else if(config->list_engines) {
struct curl_slist *engines = NULL;
curl_easy_getinfo(config->easy, CURLINFO_SSL_ENGINES, &engines);
list_engines(engines);
curl_slist_free_all(engines);
tool_list_engines(config->easy);
}
/* Perform the main operations */
else {