Querying Certificate Information
Go to the tool installation directory and run the following command to query certificate information:
./tools/haf-tool cert --view --type <cert_info>
Option |
Description |
Mandatory |
|---|---|---|
--view |
Keywords for querying certificate information. |
Yes |
--type <cert_info> |
Type of the certificate information to be queried. For details, see Table 2. |
No |
Type |
Description |
|---|---|
serial |
Queries the serial number of the certificate, which is the unique identifier of the certificate issued by the CA server. |
issuer |
Issuer information, including the country/region and organization. |
subject |
Receiver information, including the country/region and organization. |
dates |
Validity period, including the time when the certificate takes effect and the time when the certificate expires. |
startdate |
Time when the certificate takes effect. |
enddate |
Time when the certificate expires. |
pubkey |
Public key of the certificate. |
purpose |
Certificate validity scope, for example, whether the certificate can be used for the requested purpose. |
verify |
Checks whether the certificate chain of the current node is correct. |
Parameter |
Description |
|---|---|
Task Name |
Querying certificate information of nodes |
Task Description |
Querying certificate information of offload nodes |
Run Directory |
/home/omm/haf-install/haf-target |
Run Command |
echo password | /home/omm/haf-install/haf-target/tools/haf-tool cert --view --type cert_info |
Whether to Check Return Code |
Yes |
Expected Return Code |
0 |
crt_view.sh is the internal script for querying a certificate. It is stored in haf-tool/scripts of the installation directory and is invoked by haf_tool. The internal invoking commands are as follows:
cd tools/scripts
./crt_view.sh -t <cert_path> -k <info_type>
After the command is executed, manually enter the password for logging in to the remote server.
Option |
Description |
Mandatory |
|---|---|---|
-t <cert_path> |
Path for storing the certificate. haf-tool uses the cert_path parameter in the configuration file to invoke this path. |
Yes |
-k <info_type> |
Keywords of the certificate to be queried, including serial, issuer, subject, dates, startdate, enddate, verify, pubkey, and purpose. Multiple keywords are separated by commas (,). |
Yes |
- crt_view.sh is an internal tool of the software. You are not advised to invoke it independently.
- If no keyword is specified when haf-tool invokes this script, all information is queried by default.