全部產品
Search
文件中心

Key Management Service:getAttribute

更新時間:Nov 05, 2024

本文介紹如何使用getAttribute命令在HSM擷取密鑰屬性。

功能說明

getAttribute命令可擷取密鑰的屬性值並將其寫入檔案中。密鑰屬性說明可參考密鑰屬性常量

重要

在運行此命令之前,必須啟動key_mgmt_tool並以CU身份登入HSM。

文法

請按照下方文法輸入參數,參數說明請參見參數

getAttribute -o <key handle> 
             -a <attribute constant> 
             -out <file>
重要

您必須按文法指定的順序輸入參數。

樣本

本文以擷取控制代碼為6的密鑰的所有屬性,並將其寫入檔案attr_6為例。

Command:  getAttribute -o 6 -a 512 -out attr_6

Attribute size: 554, count: 24
Written to: attr_6 file

       	Cfm3GetAttribute returned: 0x00 : HSM Return: SUCCESS

參數

參數名稱

描述

是否必需

有效值

-o

指定密鑰控制代碼。

無特殊要求

-a

指定密鑰屬性的常量。

更多屬性說明,請參見密鑰屬性常量

-out

指定儲存輸出資料的檔案名稱。

無特殊要求