全部產品
Search
文件中心

Key Management Service:setAttribute

更新時間:Nov 05, 2024

本文介紹如何使用setAttribute命令將當前會話中有效密鑰轉換為持久密鑰。

功能說明

setAttribute命令將僅在當前會話中有效密鑰轉換為持久密鑰(該密鑰在您將其刪除前始終存在)。它通過將密鑰的令牌屬性 (OBJ_ATTR_TOKEN) 的值從 false (0) 更改為 true (1) 來實現此目的。

重要

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

文法

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

setAttribute -o <object handle> 
             -a 1
重要

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

樣本

本文以修改密鑰21為永久密鑰為例。

Command:  setAttribute -o 21 -a 1
       		This attribute is defined as a boolean value.
       		Enter the boolean attribute value (0 or 1):1

       	Cfm3SetAttribute returned: 0x00 : HSM Return: SUCCESS

       	Cluster Status:
       	Node id 0 status: 0x00000000 : HSM Return: SUCCESS

參數

參數名稱

描述

是否必需

有效值

-o

指定工作階段金鑰的控制代碼。

CU

-a

指定修改屬性(OBJ_ATTR_TOKEN)的常量。

1