キーの検索
キーを検索するためのコマンドを構成します。
findKey
コマンドを使用すると、指定したキー・クラス、キー・ラベルおよび係数と一致するすべてのキーを検索できます。
コマンド・プロンプトを開き、findKey
コマンドを実行して、指定したキー・クラス、キー・ラベルおよび係数に一致するすべてのキーを検索します。
Command
Syntax: findKey -h [-c <key class>] [-t <key type>]
[-l <key label>] [-id <key ID>]
[-sess 0/1]
説明
パラメータ | 説明 |
---|---|
-h | この情報を表示します |
-c | キー・ラベルを指定します。ラベルにスペースが含まれている場合は、"文字の間に書き込む必要があります。2 = 公開3 = 非公開4 = 秘密 |
-t | 検索するキー・タイプを指定します(オプション)。0 = RSA 1 = DSA 3 = EC 16 = GENERIC_SECRET 19 = DES 21 = DES3 31 = AES |
-l | 検索するキー・ラベルを指定します(オプション)。ラベルにスペースが含まれている場合は、"文字の間に書き込む必要があります。 |
-id | キーIDを指定します(オプション) |
- セッション | セッション・キー(1)のみまたはトークン・キー(0)のみを検索するオプションを指定します(オプション)。 |
例
Command: findKey
Total number of keys present 10
number of keys matched from start index 0::9
262151, 262152, 262153, 262154, 262155, 262156, 262157, 262158, 262159, 262160
PKCS #11 FindKey returned: 0x00 : HSM Return: SUCCESS
----------------------------------------------------------------------------
Command: findKey -l kms
Key count request cluster status:
Cluster Status:
Node id 0 status: 0x00000000 : HSM Return: SUCCESS
Node id 1 status: 0x00000000 : HSM Return: SUCCESS
Node id 2 status: 0x00000000 : HSM Return: SUCCESS
Total number of keys present: 1
Number of matching keys from start index 0::0
Handles of matching keys:
524667
Cluster Status:
Node id 0 status: 0x00000000 : HSM Return: SUCCESS
Node id 1 status: 0x00000000 : HSM Return: SUCCESS
Node id 2 status: 0x00000000 : HSM Return: SUCCESS
KeyMgmtUtilsFindKey returned: 0x00 : HSM Return: SUCCESS