File Action
更新时间: 2026/08/06
在Gitcode上查看源码File Action
Change History
| openUBMC Version | Revision Date | Description |
|---|---|---|
| 25.06 | 2025/06/26 | Initial 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
| Byte | Data Field |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer 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. |
| 4 | Sub command, sub command=57h |
| 5 | The command is as follows: 0: set 1: query |
| 6 | Operation type. 1: exported file 2: Import a file. |
| 7 | File 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. |
| 8 | Reserved extended field. Set it to 0. |
| 9 | Length 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. |
| 10 | File name length. NOTE: If the value of byte 5 is 1, this field does not need to be filled. |
| 11~N | File Name (with Path) NOTE: If the value of byte 5 is 1, this field does not need to be filled. |
| 11+N~11+N+M | Extended 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
| Byte | Data Field |
|---|---|
| 1 | Completion 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:4 | Manufacturer 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:N | This 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 Description | Operation Type | Operator Role | Operation Rights | Extended parameter (the ninth byte of the request) |
|---|---|---|---|---|---|
| 01h | DICE CSR file | Export only | Administrator | BasicSetting | 0 |
| 02h | DICE CERT0 certificate | Import only | Administrator | BasicSetting | 0 |
| 03h | PARTNER HASH, BIOS SOC HASH certificate | Import only | Administrator | BasicSetting | 0 |
| 04h | Information about unsigned repair deletion credentials. | Export only | Administrator | BasicSetting | 0 |
| 05h | Repair and delete credentials after signing | Import only | Administrator | BasicSetting | 0 |
| 06h | SSL CSR file | Export only | Administrator | BasicSetting | 0 |
| 07h | SSL CERT certificate | Import only | Administrator | BasicSetting | 0 |
| 08h | Standby SSL CSR file | Export only | Administrator | BasicSetting | 0 |
| 09h | Standby SSL CERT certificate | Import only | Administrator | BasicSetting | 0 |
| 0Ah | SSL certificate (pfx/p12) | Import only | Administrator | SecurityMgmt | Indicates the length of the certificate password. |
| 0Bh | Asymmetric public key for firmware encryption | Export only | Administrator | SecurityMgmt | Asymmetric public key algorithm 0:RSA2048 1:RSA4096 |
| 0Ch | Firmware encryption key | Import only | Administrator | SecurityMgmt | Digest length of the firmware encryption key |
| 0Dh | SSL CSR file | Export only | Administrator | SecurityMgmt | 0 |
| 0Eh | SSL CERT certificate signed by the Chinese cryptographic algorithm | Import only | Administrator | SecurityMgmt | 0 |
| 0Fh | SSL CERT certificate encrypted using Chinese cryptographic algorithms | Import only | Administrator | SecurityMgmt | 0 |
| 10h | CA certificate | Export only | Administrator | SecurityMgmt | Indicates 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. |
| 11h | CSR file for intra-chassis communication | Export only | Administrator | SecurityMgmt | - |
| 12h | Intra-chassis communication identity certificate | Import only | Administrator | SecurityMgmt | - |
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 00Response:
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