Get
Show one certificate in full: its names, algorithms and fingerprint.
osapi pki cert get [flags]
Examples
osapi pki cert get --name api
Result
The command prints:
$ osapi pki cert get --name api Cert: Name: api State: ok Component: controller Source: self-signed File: /etc/osapi/pki/api.crt Names: localhost, controller.example.com, 127.0.0.1 Expires: 2031-11-25 12:00:00 Days left: 1825 Fingerprint: SHA256:1f53dea6b0c3e2f9a8d4c71e5b6a0f2d9c8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a Key: ECDSA P-256 Signature: ECDSA-SHA256 FIPS approved: yes
With --json, the command prints:
{
"name": "api",
"state": "ok",
"component": "controller",
"source": "self-signed",
"file": "/etc/osapi/pki/api.crt",
"names": ["localhost", "controller.example.com", "127.0.0.1"],
"expires": "2031-11-25T12:00:00Z",
"days_left": 1825,
"fingerprint": "SHA256:1f53dea6b0c3e2f9a8d4c71e5b6a0f2d9c8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a",
"key": "ECDSA P-256",
"signature": "ECDSA-SHA256",
"fips_approved": true
}
Flags
| Flag | Description | Default |
|---|---|---|
--name | The name of the certificate, as list shows it, such as api or nats (required) |
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
Output tells how the result is printed, and what --json
gives.