mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Improve uploader doc
* Use output from 0.3.1-40-gdef8677 100 chars width. * Add config paths to the doc. * Add hint that most options work in the config file as well.
This commit is contained in:
parent
6b377bb421
commit
4dee128e96
1 changed files with 41 additions and 29 deletions
|
|
@ -1,48 +1,60 @@
|
|||
## csaf_uploader
|
||||
|
||||
Following options are supported:
|
||||
|
||||
| Options | Description |
|
||||
| ------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
||||
| -a, --action=[upload\|create] | Action to perform (default: upload) |
|
||||
| -u, --url=URL | URL of the CSAF provider (default:https:<span></span>//localhost/cgi-bin/csaf_provider.go) |
|
||||
| -t, --tlp=[csaf\|white\|green\|amber\|red] | TLP of the feed (default: csaf) |
|
||||
| -x, --external-signed | CSAF files are signed externally. Assumes .asc files beside CSAF files |
|
||||
| -k, --key=KEY-FILE | OpenPGP key to sign the CSAF files |
|
||||
| -p, --password=PASSWORD | Authentication password for accessing the CSAF provider |
|
||||
| -P, --passphrase=PASSPHRASE | Passphrase to unlock the OpenPGP key |
|
||||
| -i, --password-interactive | Enter password interactively |
|
||||
| -I, --passphrase-interacive | Enter passphrase interactively |
|
||||
| -c, --config=INI-FILE | Path to config ini file |
|
||||
| --insecure | Do not check TLS certificates from provider |
|
||||
| --client-cert | TLS client certificate file (PEM encoded data) |
|
||||
| --client-key | TLS client private key file (PEM encoded data) |
|
||||
| --version | Display version of the binary |
|
||||
| -h, --help | Show help |
|
||||
|
||||
E.g. creating the initial directiories and files
|
||||
### Usage
|
||||
|
||||
```
|
||||
./csaf_uploader -a create -u http://localhost/cgi-bin/csaf_provider.go
|
||||
csaf_uploader [OPTIONS]
|
||||
|
||||
Application Options:
|
||||
-a, --action=[upload|create] Action to perform (default: upload)
|
||||
-u, --url=URL URL of the CSAF provider (default:
|
||||
https://localhost/cgi-bin/csaf_provider.go)
|
||||
-t, --tlp=[csaf|white|green|amber|red] TLP of the feed (default: csaf)
|
||||
-x, --external-signed CSAF files are signed externally. Assumes .asc files
|
||||
beside CSAF files.
|
||||
-s, --no-schema-check Do not check files against CSAF JSON schema locally.
|
||||
-k, --key=KEY-FILE OpenPGP key to sign the CSAF files
|
||||
-p, --password=PASSWORD Authentication password for accessing the CSAF provider
|
||||
-P, --passphrase=PASSPHRASE Passphrase to unlock the OpenPGP key
|
||||
--client-cert=CERT-FILE.crt TLS client certificate file (PEM encoded data)
|
||||
--client-key=KEY-FILE.pem TLS client private key file (PEM encoded data)
|
||||
-i, --password-interactive Enter password interactively
|
||||
-I, --passphrase-interacive Enter passphrase interactively
|
||||
--insecure Do not check TLS certificates from provider
|
||||
-c, --config=INI-FILE Path to config ini file
|
||||
--version Display version of the binary
|
||||
|
||||
Help Options:
|
||||
-h, --help Show this help message
|
||||
```
|
||||
E.g. creating the initial directiories and files
|
||||
|
||||
```bash
|
||||
./csaf_uploader -a create -u https://localhost/cgi-bin/csaf_provider.go
|
||||
```
|
||||
|
||||
E.g. uploading a csaf-document
|
||||
|
||||
```
|
||||
./csaf_uploader -a upload -I -t white -u http://localhost/cgi-bin/csaf_provider.go CSAF-document-1.json
|
||||
```bash
|
||||
./csaf_uploader -a upload -I -t white -u https://localhost/cgi-bin/csaf_provider.go CSAF-document-1.json
|
||||
```
|
||||
|
||||
which asks to enter password interactively.
|
||||
which asks to enter a password interactively.
|
||||
|
||||
csaf_uploader can be started with a config file like following:
|
||||
By default csaf_uploader will try to load a config file
|
||||
from the following places:
|
||||
|
||||
```
|
||||
./csaf_provider -c conf.ini
|
||||
"~/.config/csaf/uploader.ini",
|
||||
"~/.csaf_uploader.ini",
|
||||
"csaf_uploader.ini",
|
||||
```
|
||||
|
||||
config.ini :
|
||||
The command line options can be written in the init file, except:
|
||||
`password-interactive`, `passphrase-interactive` and `config`.
|
||||
An example:
|
||||
|
||||
```
|
||||
action=create
|
||||
u=http://localhost/cgi-bin/csaf_provider.go
|
||||
u=https://localhost/cgi-bin/csaf_provider.go
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue