1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Add support for config files in downloader. (#404)

* Add support for config files in downloader.

* Add no-ini for the version flag, too.

* Add config file options in doc to downloader.
This commit is contained in:
Sascha L. Teichmann 2023-07-19 10:49:17 +02:00 committed by GitHub
parent de27a668d1
commit 8630e8bac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 135 additions and 49 deletions

View file

@ -18,6 +18,7 @@ Application Options:
--validator=URL URL to validate documents remotely
--validatorcache=FILE FILE to cache remote validations
--validatorpreset= One or more presets to validate remotely (default: mandatory)
-c, --config=INI-FILE Path to config ini file
Help Options:
-h, --help Show this help message
@ -31,3 +32,26 @@ Increasing the number of workers opens more connections to the web servers
to download more advisories at once. This may improve the overall speed of the download.
However, since this also increases the load on the servers, their administrators could
have taken countermeasures to limit this.
If no config file is explictly given the follwing places are searched for a config file:
```
~/.config/csaf/downloader.ini
~/.csaf_downloader.ini
csaf_downloader.ini
```
with `~` expanding to `$HOME` on unixoid systems and `%HOMEPATH` on Windows systems.
Supported options in config files:
```
directory # not set by default
insecure = false
ignoresigcheck = false
verbose = false
# rate # set to unlimited
worker = 2
# header # not set by default
# validator # not set by default
# validatorcache # not set by default
validatorpreset = "mandatory"
```