All Products
Search
Document Center

Key Management Service:getAttribute

Last Updated:Mar 31, 2026

getAttribute retrieves the attribute values of a key from your HSM (Hardware Security Module) and writes them to a file.

Prerequisites

Before you begin, make sure that you have:

  • A running key_mgmt_tool session

  • Logged in to your HSM as a CU (Crypto User)

Syntax

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

Enter parameters in the exact order shown above.

Parameters

ParameterDescriptionRequired
-oThe key handle of the target key.Yes
-aThe attribute constant to retrieve. See Key Attribute Constants for attribute details.Yes
-outThe file to write the output to.Yes

Examples

Get all attributes of a key

This example retrieves all attributes of the key with handle 6 and writes them to attr_6.

getAttribute -o 6 -a 512 -out attr_6

Expected output:

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

       	Cfm3GetAttribute returned: 0x00 : HSM Return: SUCCESS