File Action
更新时间: 2026/08/06
在Gitcode上查看源码

File Action

Change History

openUBMC VersionRevision DateDescription
25.062025/06/26Initial draft: add command details

Basic Information

Function Description

File action.

Privilege

For details, see Table 1 Mapping between file actions and command permissions.

Command Information

Request Information

ByteData Field
NetFn30h
CMD93h
1:3Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h.
4Sub command, sub command=57h
5The command is as follows:
0: set
1: query
6Operation type.
1: exported file
2: Import a file.
7File type.
01h: DICE CSR file
02h: DICE CERT0 certificate
03h: PARTNER HASH, BIOS SOC HASH certificate (only import supported)
04h: unsigned maintenance credential deletion information (export only)
05h: credentials deleted during maintenance after signature (import only)
06h: SSL CSR file (export only)
07h: SSL CERT certificate (import only)
08h: standby SSL CSR file (export only)
09h: standby SSL CERT certificate (import only)
0 Ah: SSL certificate (pfx/p12) (import only)
0Bh: asymmetric public key (It can only be exported and is used only for importing the firmware encryption key.)
0Ch: firmware encryption key (This key can be imported only and cannot be imported again after being imported.)
0Dh: SSL CSR file (export only)
0Eh: SM signature SSL CERT certificate (import only)
0Fh: SSL CERT certificate encrypted using Chinese cryptographic algorithms (import only)
10h: CA certificate (import only)
11h: CSR file for intra-chassis communication (export only)
12h: intra-chassis communication identity certificate (import only)
CAUTION: The request operation permission of the file type 0Bh to 0Fh is SecurityMgmt.
8Reserved extended field. Set it to 0.
9Length of the extended information. If the value of byte 7 is equal to:
When the battery capacity is 0 Ah, it indicates the certificate password.
0Bh: asymmetric public key algorithm. The value can be 0 (RSA2048) or 1 (RSA4096).
When the value is 0Ch, it indicates the length of the firmware encryption key digest.
When the time is 10 hours, this parameter indicates the specified CA certificate ID. The value ranges from 0 to 32. The value 0 indicates that the ID is automatically allocated, and the value 1 to 32 indicate the specified ID.
In other scenarios, the value is 0.
10File name length.
NOTE: If the value of byte 5 is 1, this field does not need to be filled.
11~NFile Name (with Path)
NOTE: If the value of byte 5 is 1, this field does not need to be filled.
11+N~11+N+MExtended information. If the value of byte 7 is equal to:
When the battery capacity is 0 Ah, this field is mandatory and indicates the certificate password.
When the value is 0Ch, this field is mandatory and indicates the digest value of the firmware encryption key.

Response Information

ByteData Field
1Completion Code
00h: The command response is successful.
CCh: The command input parameter exceeds the supported range.
80h: The eFUSE burnt in the environment does not support the partner mode (root import is not supported).
81h: The roots of the PKCSV15 encryption algorithm and PSS algorithm have been imported.
82h: read-only
83h: The root of the PKCSV15 algorithm already exists in the environment.
84h: The root of the PSS algorithm already exists in the environment.
2:4Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h.
5:NThis field is available only in query commands.
Byte5:
0: The operation is complete.
1: The operation fails.
2: The operation is being performed.
FFh: idle state, not started.
Byte6:
When byte 5 is 2, the operation progress is displayed. The value ranges from 0 to 100.

Table 1 Mapping between file actions and command permissions

File type (7th byte of the request)File Type DescriptionOperation TypeOperator RoleOperation RightsExtended parameter (the ninth byte of the request)
01hDICE CSR fileExport onlyAdministratorBasicSetting0
02hDICE CERT0 certificateImport onlyAdministratorBasicSetting0
03hPARTNER HASH, BIOS SOC HASH certificateImport onlyAdministratorBasicSetting0
04hInformation about unsigned repair deletion credentials.Export onlyAdministratorBasicSetting0
05hRepair and delete credentials after signingImport onlyAdministratorBasicSetting0
06hSSL CSR fileExport onlyAdministratorBasicSetting0
07hSSL CERT certificateImport onlyAdministratorBasicSetting0
08hStandby SSL CSR fileExport onlyAdministratorBasicSetting0
09hStandby SSL CERT certificateImport onlyAdministratorBasicSetting0
0AhSSL certificate (pfx/p12)Import onlyAdministratorSecurityMgmtIndicates the length of the certificate password.
0BhAsymmetric public key for firmware encryptionExport onlyAdministratorSecurityMgmtAsymmetric public key algorithm
0:RSA2048
1:RSA4096
0ChFirmware encryption keyImport onlyAdministratorSecurityMgmtDigest length of the firmware encryption key
0DhSSL CSR fileExport onlyAdministratorSecurityMgmt0
0EhSSL CERT certificate signed by the Chinese cryptographic algorithmImport onlyAdministratorSecurityMgmt0
0FhSSL CERT certificate encrypted using Chinese cryptographic algorithmsImport onlyAdministratorSecurityMgmt0
10hCA certificateExport onlyAdministratorSecurityMgmtIndicates the ID of the specified CA certificate. The value ranges from 0 to 32. The value 0 indicates that the ID is automatically allocated. The value 1 to 32 indicates the specified ID.
11hCSR file for intra-chassis communicationExport onlyAdministratorSecurityMgmt-
12hIntra-chassis communication identity certificateImport onlyAdministratorSecurityMgmt-

Command Example

Export the SSL CSR file /tmp/server.csr.

Request:

bash
Request:
ipmicmd -k "0f 00 30 93 db 07 00 57 00 01 06 00 00 0f 2f 74 6d 70 2f 73 65 72 76 65 72 2e 63 73 72" smi 0
Response:
0f 31 00 93 00 db 07 00

Response:

text
Request:
ipmicmd -k "0f 00 30 93 db 07 00 57 00 02 07 00 00 0f 2f 74 6d 70 2f 73 65 72 76 65 72 2e 63 65 72" smi 0
Response:
0f 31 00 93 00 db 07 00

Back to Index