Develop > Command-Line Interfaces > opr-cert-mgmt Command-Line Interface

opr-cert-mgmt Command-Line Interface

You can use the opr-cert-mgmt command-line interface (CLI) to manage trusted certificates in the OMi trusted certificate store. OMi stores its server certificates in the trusted certificate store, except for the certificates used in any communication based on BBC. The certificates are then distributed from the global trusted certificate store to the gateway and data processing servers.

Location

<OMi_HOME>\bin\opr-cert-mgmt.[bat|sh]

Synopsis

opr-cert-mgmt ‑help | ‑version | ‑list | ‑details | -sync | ‑import <alias> <path> | -remove <alias> | ‑export <alias> [JKS|PKCS12|PEM] <passphrase> <filepath>

Options

Option Description
‑help|‑h|‑? Displays a summary of the command options.
‑list|‑l

Lists all certificates in the trusted certificate store.

‑detail|‑d <alias>

Generates detailed information for the certificate with the specified alias.

‑sync|‑s

Synchronizes the global certificate store with the local certificate store.

‑import|‑i <alias> <path> Imports the certificate with the specified alias to the certificate store.
‑remove|‑r <alias> Removes the certificate with the specified alias from the certificate inventory.
‑export|‑e <alias> [JKS|PKCS12|PEM] <passphrase> <filepath>

Exports the certificate with the specified alias to the specified location. If the certificate format is JKS or PKCS12, a passphrase must be provided to encrypt the certificate store.

Default: JKS

‑version|‑v Displays version information for the command.

Exit Status

Exit Status

Description

Output

0

Successful completion of the requested operation.

No output.
1

Failure of the requested operation.

An error message stating why the operation failed, followed by the tool's help text.
2 Failure of the requested operation due to invalid argument on the command line. An error message stating why the operation failed, followed by the tool's help text.

Restrictions

To run opr-cert-mgmt, the same permissions as for the user installing OMi are required:

  • Windows: administrative privileges

  • Linux: root user

Examples

This section contains a number of examples you can use as a starting point for developing your own opr-cert-mgmt commands.

  • Save the OMi web server CA certificate in PEM format to C-drive:

    opr-cert-mgmt.bat ‑export "OMi Webserver CA Certificate" PEM "C:\ca_certificate.crt"

  • Save the OMi web server CA certificate in JKS format with passphrase "test" to /tmp:

    ./opr-cert-mgmt.sh ‑export "OMi Webserver CA Certificate" JKS "test" "/tmp/test.jks"