Skip to main content

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​

FlagDescriptionDefault
--nameThe name of the certificate, as list shows it, such as api or nats (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath 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.