mirror of
https://github.com/curl/curl.git
synced 2026-08-26 08:33:31 +03:00
tool_getparam: verify that a file exists for some options
Passing the option as-is to libcurl is fine, but checking that the file exists allows the tool to better provide a helpful message. This now done for the following options: --cacert, --crlfile, --knownhosts, --netrc-file, --proxy-cacert amd --proxy-crlfile Bonus: bail out properly on OOM errors in the --cert parser. Reported-by: Wesley Moore Fixes #19583 Closes #19585
This commit is contained in:
parent
54a3f63520
commit
88024c6d39
6 changed files with 121 additions and 79 deletions
|
|
@ -372,9 +372,9 @@ ParameterError getparameter(const char *flag, const char *nextarg,
|
|||
int max_recursive);
|
||||
|
||||
#ifdef UNITTESTS
|
||||
void parse_cert_parameter(const char *cert_parameter,
|
||||
char **certname,
|
||||
char **passphrase);
|
||||
ParameterError parse_cert_parameter(const char *cert_parameter,
|
||||
char **certname,
|
||||
char **passphrase);
|
||||
#endif
|
||||
|
||||
ParameterError parse_args(int argc, argv_item_t argv[]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue