Skip to content

PKI CLI Options

Endi S. Dewata edited this page Apr 10, 2021 · 3 revisions

Bypassing Access Banner

If access banner is enabled on PKI server, the banner will appear before the actual operation is executed, for example:

$ pki cert-show 0x1
WARNING!
Access to this service is restricted to those individuals with
specific permissions. If you are not an authorized user, disconnect
now. Any attempts to gain unauthorized access will be prosecuted to
the fullest extent of the law.

Do you want to proceed (y/N)? y
-----------------
Certificate "0x1"
-----------------
  Serial Number: 0x1
  Issuer: CN=CA Signing Certificate,OU=pki-tomcat,O=EXAMPLE
  Subject: CN=CA Signing Certificate,OU=pki-tomcat,O=EXAMPLE
  Status: VALID
  Not Before: Mon Feb 20 18:21:03 CET 2017
  Not After: Fri Feb 20 18:21:03 CET 2037

To bypass banner (e.g. for automation) specify the --ignore-banner option, for example:

$ pki --ignore-banner cert-show 0x1

See also Access Banner.

Configuring Message Format

By default CLI requests and responses are sent in XML format. To use JSON format:

$ pki --message-format json <command> ...

Storing CLI Messages

To store CLI requests and responses into files:

$ pki --output <output folder> <command> ...

The requests will be stored in http-request-<n>. The responses will be stored in http-response-<n>.

See Also

Clone this wiki locally