All Products
Search
Document Center

Key Management Service:IsValidKeyHandlefile

Last Updated:Mar 31, 2026

Use IsValidKeyHandlefile to check whether a key file contains a real RSA private key or a counterfeit PEM file that references a key handle in the HSM.

Background

A counterfeit PEM file does not contain actual private key material. Instead, it stores a reference to a private key within the hardware security module (HSM). Counterfeit PEM files are typically created by getCaviumPrivKey.

Prerequisites

Before you run this command, ensure that you have:

Syntax

IsValidKeyHandlefile -f <private-key-file>
Important

Enter parameters in the order shown in the syntax.

Parameters

ParameterDescriptionRequiredValid values
-fPath and name of the key file to checkYesNo special requirements

Examples

Validate a counterfeit PEM file

This command confirms that fakeKey.pem is a counterfeit PEM file that references key handle 8 in the HSM.

Command:  IsValidKeyHandlefile -f /tmp/fakeKey.pem

          Input file has invalid key handle: 8

What's next