

# Troubleshooting AWS CloudHSM
<a name="troubleshooting"></a>

If you encounter problems with AWS CloudHSM, the following topics can help you resolve them.

**Topics**
+ [

# AWS CloudHSM known issues
](KnownIssues.md)
+ [

# AWS CloudHSM Client SDK 3 key synchronization failures
](ts-client-sync-fail.md)
+ [

# AWS CloudHSM Client SDK 3 verify HSM performance with the pkpspeed tool
](troubleshooting-verify-hsm-performance.md)
+ [

# AWS CloudHSM Client SDK 5 user contains inconsistent values
](troubleshoot-sdk5-inconsistent-value.md)
+ [

# AWS CloudHSM Client SDK 5 user replicate failures
](troubleshoot-sdk5-user-replicate-failures.md)
+ [

# AWS CloudHSM Client SDK 5 key replicate failures
](troubleshoot-sdk5-key-replicate-failures.md)
+ [

# AWS CloudHSM error seen during key availability check
](troubleshoot-key-availability-check.md)
+ [

# AWS CloudHSM extracting keys using JCE
](troubleshoot-getencoded.md)
+ [

# HSM throttling
](troubleshoot-hsm-throttling.md)
+ [

# Keep HSM users in sync across HSMs in the AWS CloudHSM cluster
](troubleshooting-keep-hsm-users-in-sync.md)
+ [

# Lost connection to the AWS CloudHSM cluster
](troubleshooting-lost-connection.md)
+ [

# Missing AWS CloudHSM audit logs in CloudWatch
](troubleshooting-missing-audit-logs.md)
+ [

# Custom IVs with non-compliant length for AES key wrap in AWS CloudHSM
](troubleshooting-aes-keys.md)
+ [

# Resolving AWS CloudHSM cluster creation failures
](troubleshooting-create-cluster.md)
+ [

# Retrieving AWS CloudHSM client configuration logs
](troubleshooting-log-collection-script.md)

# AWS CloudHSM known issues
<a name="KnownIssues"></a>

AWS CloudHSM has the following known issues. Choose a topic to learn more.

**Topics**
+ [

# Known issues for all HSM instances
](ki-all.md)
+ [Known issues for hsm1.medium](ki-hsm1-medium.md)
+ [Known issues for hsm2m.medium](ki-hsm2m-medium.md)
+ [Known issues for the PKCS \$111 library](ki-pkcs11-sdk.md)
+ [Known issues for the JCE SDK](ki-jce-sdk.md)
+ [Known issues for the OpenSSL Dynamic Engine](ki-openssl-sdk.md)
+ [Known issues for the Key Storage Provider (KSP)](ki-ksp-sdk.md)
+ [Known issues for the OpenSSL Provider](ki-openssl-provider-sdk.md)
+ [Known issues for Amazon EC2 instances running Amazon Linux 2](ki-al2.md)
+ [Known issues for integrating third-party applications](ki-third-party.md)
+ [Known issues for cluster modification](ki-cluster-modification.md)
+ [Known issues of operation failure using AWS CloudHSM client version 5.12.0 on hsm2.medium](ki-hsm2-old-sdk.md)

# Known issues for all HSM instances
<a name="ki-all"></a>

The following issues impact all AWS CloudHSM users regardless of whether they use the key\$1mgmt\$1util command line tool, the PKCS \$111 SDK, the JCE SDK, or the OpenSSL SDK. 

**Topics**
+ [

## Issue: AES key wrapping uses PKCS \$15 padding instead of providing a standards-compliant implementation of key wrap with zero padding
](#ki-all-1)
+ [

## Issue: The client daemon requires at least one valid IP address in its configuration file to successfully connect to the cluster
](#ki-all-2)
+ [

## Issue: There was an upper limit of 16 KB on data that can be hashed and signed by AWS CloudHSM using Client SDK 3
](#ki-all-3)
+ [

## Issue: Imported keys could not be specified as non-exportable
](#ki-all-4)
+ [

## Issue: The default mechanism for the wrapKey and unWrapKey commands in the key\$1mgmt\$1util has been removed
](#ki-all-5)
+ [

## Issue: If you have a single HSM in your cluster, HSM failover does not work correctly
](#ki-all-6)
+ [

## Issue: If you exceed the key capacity of the HSMs in your cluster within a short period of time, the client enters an unhandled error state
](#ki-all-7)
+ [

## Issue: Digest operations with HMAC keys of size greater than 800 bytes are not supported
](#ki-all-8)
+ [

## Issue: The client\$1info tool, distributed with Client SDK 3, deletes the contents of the path specified by the optional output argument
](#ki-all-9)
+ [

## Issue: You receive an error when running the SDK 5 configure tool using the `--cluster-id` argument in containerized environments
](#ki-all-10)
+ [

## Issue: You receive the error "Failed to create cert/key from provided pfx file. Error: NotPkcs8"
](#ki-all-11)
+ [

## Issue: ECDSA signing fails with "invalid mechanism" error starting with SDK 5.16
](#ki-all-12)
+ [

## Issue: Signing operations with prehashed data do not properly clear session tokens in interactive mode
](#ki-all-13)
+ [

## Issue: CloudHSM client library's default client certificate expires on Jan 31, 2026
](#ki-all-14)

## Issue: AES key wrapping uses PKCS \$15 padding instead of providing a standards-compliant implementation of key wrap with zero padding
<a name="ki-all-1"></a>

Additionally, key wrap with no padding and zero padding is not supported.
+ **Impact: **There is no impact if you wrap and unwrap using this algorithm within AWS CloudHSM. However, keys wrapped with AWS CloudHSM cannot be unwrapped within other HSMs or software that expects compliance to the no-padding specification. This is because eight bytes of padding data might be added to the end of your key data during a standards-compliant unwrap. Externally wrapped keys cannot be properly unwrapped into an AWS CloudHSM instance. 
+ **Workaround: **To externally unwrap a key that was wrapped with AES Key Wrap with PKCS \$15 Padding on an AWS CloudHSM instance, strip the extra padding before you attempt to use the key. You can do this by trimming the extra bytes in a file editor or copying only the key bytes into a new buffer in your code. 
+ **Resolution status: **With the 3.1.0 client and software release, AWS CloudHSM provides standards-compliant options for AES key wrapping. For more information, see [AES Key Wrapping](manage-aes-key-wrapping.md). 

## Issue: The client daemon requires at least one valid IP address in its configuration file to successfully connect to the cluster
<a name="ki-all-2"></a>
+ **Impact: **If you delete every HSM in your cluster and then add another HSM, which gets a new IP address, the client daemon continues to search for your HSMs at their original IP addresses. 
+ **Workaround: **If you run an intermittent workload, we recommend that you use the `IpAddress` argument in the [CreateHsm](https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) function to set the elastic network interface (ENI) to its original value. Note than an ENI is specific to an Availability Zone (AZ). The alternative is to delete the `/opt/cloudhsm/daemon/1/cluster.info` file and then reset the client configuration to the IP address of your new HSM. You can use the `client -a <IP address>` command. For more information, see [Install and Configure the AWS CloudHSM Client (Linux)](cmu-install-and-configure-client-linux.md) or [Install and Configure the AWS CloudHSM Client (Windows)](cmu-install-and-configure-client-win.md).

## Issue: There was an upper limit of 16 KB on data that can be hashed and signed by AWS CloudHSM using Client SDK 3
<a name="ki-all-3"></a>
+ **Resolution status: **Data less than 16KB in size continues to be sent to the HSM for hashing. We have added capability to hash locally, in software, data between 16KB and 64KB in size. Client SDK 5 will explicitly fail if the data buffer is larger than 64KB. You must update your client and SDK(s) to a version greater than 5.0.0 or higher to benefit from the fix. 

## Issue: Imported keys could not be specified as non-exportable
<a name="ki-all-4"></a>
+ **Resolution Status: **This issue is fixed. No action is required on your part to benefit from the fix.

## Issue: The default mechanism for the wrapKey and unWrapKey commands in the key\$1mgmt\$1util has been removed
<a name="ki-all-5"></a>
+ **Resolution: **When using the wrapKey or unWrapKey commands, you must use the `-m` option to specify the mechanism. See the examples in the [wrapKey](key_mgmt_util-wrapKey.md) or [unWrapKey](key_mgmt_util-unwrapKey.md) articles for more information. 

## Issue: If you have a single HSM in your cluster, HSM failover does not work correctly
<a name="ki-all-6"></a>
+ **Impact: **If the single HSM instance in your cluster loses connectivity, the client will not reconnect with it even if the HSM instance is later restored.
+ **Workaround: **We recommend at least two HSM instances in any production cluster. If you use this configuration, you will not be impacted by this issue. For single-HSM clusters, bounce the client daemon to restore connectivity.
+ **Resolution status: ** This issue has been resolved in the AWS CloudHSM client 1.1.2 release. You must upgrade to this client to benefit from the fix.

## Issue: If you exceed the key capacity of the HSMs in your cluster within a short period of time, the client enters an unhandled error state
<a name="ki-all-7"></a>
+ **Impact: ** When the client encounters the unhandled error state, it freezes and must be restarted.
+ **Workaround: **Test your throughput to ensure you are not creating session keys at a rate that the client is unable to handle. You can lower your rate by adding an HSM to the cluster or slowing down the session key creation.
+ **Resolution status: ** This issue has been resolved in the AWS CloudHSM client 1.1.2 release. You must upgrade to this client to benefit from the fix.

## Issue: Digest operations with HMAC keys of size greater than 800 bytes are not supported
<a name="ki-all-8"></a>
+ **Impact: **HMAC keys larger than 800 bytes can be generated on or imported into the HSM. However, if you use this larger key in a digest operation via the JCE or key\$1mgmt\$1util, the operation will fail. Note that if you are using PKCS11, HMAC keys are limited to a size of 64 bytes.
+ **Workaround: **If you will be using HMAC keys for digest operations on the HSM, ensure the size is smaller than 800 bytes.
+ **Resolution status: **None at this time.

## Issue: The client\$1info tool, distributed with Client SDK 3, deletes the contents of the path specified by the optional output argument
<a name="ki-all-9"></a>
+ **Impact: **All existing files and sub-directories under the specified output path may be permanently lost.
+ **Workaround: **Do not use the optional argument `-output path` when using the `client_info` tool.
+ **Resolution status: **This issue has been resolved in the [Client SDK 3.3.2 release](https://docs.aws.amazon.com/cloudhsm/latest/userguide/client-history.html#client-version-3-3-2). You must upgrade to this client to benefit from the fix.

## Issue: You receive an error when running the SDK 5 configure tool using the `--cluster-id` argument in containerized environments
<a name="ki-all-10"></a>

You receive the following error when using the --cluster-id argument with the Configure Tool:

`No credentials in the property bag`

This error is caused by an update to Instance Metadata Service Version 2 (IMDSv2). For more information, see the [IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) documentation.
+ **Impact:** This issue will impact users running the configure tool on SDK versions 5.5.0 and later in containerized environments and utilizing EC2 instance metadata to provide credentials.
+ **Workaround:** Set the PUT response hop limit to at least two. For guidance on how to do this, see [ Configure the instance metadata options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html).

## Issue: You receive the error "Failed to create cert/key from provided pfx file. Error: NotPkcs8"
<a name="ki-all-11"></a>
+ **Workaround: **You can convert the custom SSL private key to PKCS8 format with openssl command: `openssl pkcs8 -topk8 -inform PEM -outform PEM -in ssl_private_key -out ssl_private_key_pkcs8`
+ **Resolution status: **This issue has been resolved in the [client SDK 5.12.0 release](client-version-previous.md#client-version-5-12-0). You must upgrade to this client version or later to benefit from the fix.

## Issue: ECDSA signing fails with "invalid mechanism" error starting with SDK 5.16
<a name="ki-all-12"></a>
+ **Impact: **ECDSA signing operations fail when using hash functions that are weaker than the key strength. This failure occurs because [FIPS 186-5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf) requires the hash function to be at least as strong as the key strength. 

  You might see an error similar to this in your client logs:

  ```
  [cloudhsm_provider::hsm1::session::ecdsa::sign::common][][] Digest security strength (80) is weaker than the key security strength (128)
  ```
+ **Workaround: **If you can't update your hash functions, you can migrate to non-FIPS clusters, which don't enforce the hash strength requirement. However, we recommend updating your hash functions to maintain FIPS compliance. 

   As an additional workaround, we have added a configuration option to bypass this requirement. Please note, this option is **not recommended**, as using ECDSA with weaker hash functions does not follow security best practices. To use this option, run the following command (replacing `configure-cli` with the configure tool for the SDK being used: [AWS CloudHSM Client SDK 5 configuration syntax](configure-tool-syntax5.md)): 

  ```
  sudo /opt/cloudhsm/bin/configure-cli --enable-ecdsa-with-weak-hash-function
  ```
+ **Resolution: **Use a hash function that is at least as strong as your ECDSA key. For information about hash function and ECDSA key strengths, see Tables 2 and 3 in [NIST SP 800-57 Part 1 Rev 5](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf). 

## Issue: Signing operations with prehashed data do not properly clear session tokens in interactive mode
<a name="ki-all-13"></a>
+ **Impact: **When using the CloudHSM CLI in interactive mode with SDK version 5.16.1, signing operations with prehashed data fail to clear session tokens properly. 
+ **Workaround: **Use single command mode instead of interactive mode when performing signing operations with prehashed data. This ensures proper token cleanup after each operation. 
+ **Resolution status: **This issue has been resolved in CloudHSM SDK 5.16.2. Upgrade to version 5.16.2 or later to benefit from the fix. 

## Issue: CloudHSM client library's default client certificate expires on Jan 31, 2026
<a name="ki-all-14"></a>
+ **Impact: **There is no impact to customers beyond Jan 31, 2026. All communications between the client and HSM are secured by client-HSM TLS as described [here](client-end-to-end-encryption.md). The client-HSM TLS uses customer owned/managed certificates which are configured by the customer during cluster initialization. 
+ **Resolution status: **Resolved. 

# Known issues for AWS CloudHSM hsm1.medium instances
<a name="ki-hsm1-medium"></a>

The following issues impact all AWS CloudHSM hsm1.medium instances. 

**Topics**
+ [

## Issue: The HSM cannot create more than 250 users
](#ki-hsm1-medium-1)

## Issue: The HSM cannot create more than 250 users
<a name="ki-hsm1-medium-1"></a>
+ **Workaround: **This issue is resolved on AWS CloudHSM hsm2m.medium instance types.
+ **Resolution status: **None at this time.

# Known issues for AWS CloudHSM hsm2m.medium instances
<a name="ki-hsm2m-medium"></a>

The following issues impact all AWS CloudHSM hsm2m.medium instances. 

**Topics**
+ [

## Issue: Increased login latency on hsm2m.medium
](#ki-hsm2m-medium-1)
+ [

## Issue: Increased find key latency on hsm2m.medium
](#ki-hsm2m-medium-2)
+ [

## Issue: A CO using trying to set the trusted attribute of a key will fail with Client SDK 5.12.0 and earlier
](#ki-hsm2m-medium-3)
+ [

## Issue: ECDSA verify will fail with Client SDK 5.12.0 and earlier for clusters in FIPS mode
](#ki-hsm2m-medium-4)
+ [

## Issue: Only the PEM-formatted certificates can be registered as mtls trust anchors with CloudHSM CLI
](#ki-hsm2m-medium-5)
+ [

## Issue: Customer applications will stop processing all requests when using mTLS with a passphrase protected [client private key](getting-started-setup-mtls.md#getting-start-setup-mtl-sdk).
](#ki-hsm2m-medium-6)
+ [

## Issue: User replicate fails when using the CloudHSM CLI
](#ki-hsm2m-medium-7)
+ [

## Issue: Operations can fail during backup creation
](#ki-hsm2m-medium-8)
+ [

## Issue: Client SDK 5.8 and above do not perform automatic retries for HSM throttled operations in some scenarios on hsm2m.medium
](#ki-hsm2m-medium-9)
+ [

## Issue: AES/CBC unwrap operations with all zero IV fails on hsm2m.medium
](#ki-hsm2m-medium-10)
+ [

## Issue: Failure to initialize HSM connection during application cold starts on hsm2m.medium
](#ki-hsm2m-medium-11)

## Issue: Increased login latency on hsm2m.medium
<a name="ki-hsm2m-medium-1"></a>
+ **Impact: **Logging into hsm2m.medium follows overly strict interpretation of compliance requirements, which results in increased latency.
+ **Resolution: **If you created a new hsm2m.medium instance or migrated to hsm2m.medium from hsm1.medium before December 20th, 2025, you will need to reset your password to take advantage of performance improvements we have implemented for login operations. Refer to the [change-password](cloudhsm_cli-user-change-password.md) for instructions.

## Issue: Increased find key latency on hsm2m.medium
<a name="ki-hsm2m-medium-2"></a>
+ **Impact: **The hsm2m.medium HSM instance has improved fair share architecture which results in more consistent predictable performance compared to hsm1.medium. With hsm1.medium, customers may observe higher find key performance due to irregular use of HSM resources. However, hsm1.medium find key performance will decrease when the HSM instance is patched or updated with new firmware. This issue affects operations such as `KeyStore.getKey()` in JCE.
+ **Resolution: **This issue has been resolved. As best practice, cache the results from find key operations. Caching will reduce the total number of find key operations as it is a resource intensive operation in HSM. In addition, implement client-side retries with exponential backoff and jitter to reduce HSM throttling failures.

## Issue: A CO using trying to set the trusted attribute of a key will fail with Client SDK 5.12.0 and earlier
<a name="ki-hsm2m-medium-3"></a>

 
+ **Impact: **Any CO user attempting to set the trusted attribute of a key will receive an error indicating that `User type should be CO or CU`.
+ **Resolution: **Future versions of the Client SDK will resolve this issue. Updates will be announced in our user guide's [Document history](document-history.md).

## Issue: ECDSA verify will fail with Client SDK 5.12.0 and earlier for clusters in FIPS mode
<a name="ki-hsm2m-medium-4"></a>

 
+ **Impact: **ECDSA verify operation performed for HSMs in FIPS mode will fail.
+ **Resolution status: **This issue has been resolved in the [client SDK 5.13.0 release](client-version-previous.md#client-version-5-13-0). You must upgrade to this client version or later to benefit from the fix.

## Issue: Only the PEM-formatted certificates can be registered as mtls trust anchors with CloudHSM CLI
<a name="ki-hsm2m-medium-5"></a>

 
+ **Impact: **Certificates in DER format cannot be registered as mTLS trust anchors with CloudHSM CLI.
+ **Workaround: **You can convert a certificate in DER format to PEM format with openssl command: `openssl x509 -inform DER -outform PEM -in certificate.der -out certificate.pem`

## Issue: Customer applications will stop processing all requests when using mTLS with a passphrase protected [client private key](getting-started-setup-mtls.md#getting-start-setup-mtl-sdk).
<a name="ki-hsm2m-medium-6"></a>

 
+ **Impact: **All operations performed by the application will be halted and the user will be prompted for the passphrase on standard input multiple times throughout the lifetime of application. Operations will timeout and fail if passphrase is not provided before the operation's timeout duration.
+ **Workaround: **Passphrase encrypted private keys are not supported for mTLS. Remove passphrase encryption from client private key

## Issue: User replicate fails when using the CloudHSM CLI
<a name="ki-hsm2m-medium-7"></a>

 
+ **Impact: **User replication fails on hsm2m.medium instances when using the CloudHSM CLI. The `user replicate` command works as expected on hsm1.medium instances.
+ **Resolution: **This issue has been resolved.

## Issue: Operations can fail during backup creation
<a name="ki-hsm2m-medium-8"></a>
+ **Impact: **Operations like generating random numbers can fail on hsm2m.medium instances while AWS CloudHSM creates a backup.
+ **Resolution: **To minimize service interruptions, implement these best practices:
  + Create a multi-HSM cluster
  + Configure your applications to retry cluster operations

  For more information about best practices, see [Best practices for AWS CloudHSM](best-practices.md).

## Issue: Client SDK 5.8 and above do not perform automatic retries for HSM throttled operations in some scenarios on hsm2m.medium
<a name="ki-hsm2m-medium-9"></a>
+ **Impact: **Client SDK 5.8 and above will not retry some HSM throttled operations
+ **Workaround: **Follow best practices to architect your cluster to handle load and implement application level retries. We are currently working on a fix. Updates will be announced in our user guide's [Document history](document-history.md).
+ **Resolution status:** This issue has been resolved in the AWS CloudHSM Client SDK 5.16.2. You must upgrade to this client version or later to benefit from the fix. 

## Issue: AES/CBC unwrap operations with all zero IV fails on hsm2m.medium
<a name="ki-hsm2m-medium-10"></a>
+ **Impact: **When using AES/CBC mechanism for unwrapping keys using the AWS CloudHSM JCE provider, operations with a 16-byte zero-filled IV fails on hsm2m.medium instances, due to an added validation check that was not in hsm1.medium instances.
+ **Resolution Status: **We are working on a fix that will allow zero-byte IVs to be accepted during AES/CBC unwrap operations.

## Issue: Failure to initialize HSM connection during application cold starts on hsm2m.medium
<a name="ki-hsm2m-medium-11"></a>
+ **Impact: **This issue affects cold starts such as client application deployments or restarts. The hsm2m.medium HSM instance has improved fair share architecture which ensures more consistent performance, throughput, and latency for all customers. At present on hsm1.medium, you may observe higher than intended performance for concurrent HSM connection initialization. However, hsm1.medium connection initialization performance will vary based on underlying system updates.
+ **Resolution: **Follow [best practices](bp-application-integration.md#bp-stagger-deployment) and stagger client application deployments and restarts to limit the amount of client applications initializing HSM connections concurrently. We also recommend that you implement application level retries for client application initialization. In addition, bootstrap using configure tool with `--cluster-id <cluster ID>` to add all HSM IP's to the client configuration file. This behavior has been improved in AWS CloudHSM Client SDK version 5.17.1 and later. We recommend upgrading to the latest SDK version to benefit from this improvement.

# Known issues for the PKCS \$111 library for AWS CloudHSM
<a name="ki-pkcs11-sdk"></a>

The following issues impact the PKCS \$111 library for AWS CloudHSM.

**Topics**
+ [

## Issue: AES key wrap in version 3.0.0 of the PKCS \$111 library does not validate IVs before use
](#ki-pkcs11-1)
+ [

## Issue: PKCS\$111 SDK 2.0.4 and earlier versions always used the default IV of `0xA6A6A6A6A6A6A6A6` for AES key wrap and unwrap
](#ki-pkcs11-2)
+ [

## Issue: The `CKA_DERIVE` attribute was not supported and was not handled
](#ki-pkcs11-3)
+ [

## Issue: The `CKA_SENSITIVE` attribute was not supported and was not handled
](#ki-pkcs11-4)
+ [

## Issue: Multipart hashing and signing are not supported
](#ki-pkcs11-5)
+ [

## Issue: `C_GenerateKeyPair` does not handle `CKA_MODULUS_BITS` or `CKA_PUBLIC_EXPONENT` in the private template in a manner that is compliant with standards
](#ki-pkcs11-6)
+ [

## Issue: Buffers for the `C_Encrypt` and `C_Decrypt` API operations cannot exceed 16 KB when using the `CKM_AES_GCM` mechanism
](#ki-pkcs11-8)
+ [

## Issue: Elliptic-curve Diffie-Hellman (ECDH) key derivation is executed partially within the HSM
](#ki-pkcs11-9)
+ [

## Issue: Verification of secp256k1 signatures fails on EL6 platforms such as CentOS6 and RHEL 6
](#ki-pkcs11-10)
+ [

## Issue: Incorrect sequence of function calls gives undefined results instead of failing
](#ki-pkcs11-11)
+ [

## Issue: Read Only Session is not supported in SDK 5
](#ki-pkcs11-13)
+ [

## Issue: `cryptoki.h` header file is Windows-only
](#ki-pkcs11-14)

## Issue: AES key wrap in version 3.0.0 of the PKCS \$111 library does not validate IVs before use
<a name="ki-pkcs11-1"></a>

If you specify an IV shorter than 8 bytes in length, it is padded with unpredictable bytes before use. 

**Note**  
This impacts `C_WrapKey` with `CKM_AES_KEY_WRAP` mechanism only.
+ **Impact:** If you provide an IV that is shorter than 8 bytes in version 3.0.0 of PKCS \$111 library, you may be unable to unwrap the key. 
+ **Workarounds: **
  + We strongly recommend you upgrade to version 3.0.1 or higher of the PKCS \$111 library, which properly enforces IV length during AES key wrap. Amend your wrapping code to pass a NULL IV, or specify the default IV of `0xA6A6A6A6A6A6A6A6`. For more information, see [Custom IVs with Non-Compliant Length for AES Key Wrap](troubleshooting-aes-keys.md).
  + If you wrapped any keys with version 3.0.0 of the PKCS \$111 library using an IV shorter than 8 bytes, reach out to us for [support](https://aws.amazon.com/support).
+ **Resolution status:** This issue has been resolved in version 3.0.1 of the PKCS \$111 library. To wrap keys using AES key wrap, specify an IV that is NULL or 8 bytes long.

## Issue: PKCS\$111 SDK 2.0.4 and earlier versions always used the default IV of `0xA6A6A6A6A6A6A6A6` for AES key wrap and unwrap
<a name="ki-pkcs11-2"></a>

User-provided IVs were silently ignored.

**Note**  
This impacts `C_WrapKey` with `CKM_AES_KEY_WRAP` mechanism only.
+ **Impact:** 
  + If you used PKCS\$111 SDK 2.0.4 or an earlier version and a user-provided IV, your keys are wrapped with the default IV of `0xA6A6A6A6A6A6A6A6`.
  + If you used PKCS\$111 SDK 3.0.0 or later and a user-provided IV, your keys are wrapped with the user-provided IV.
+ **Workarounds:**
  + To unwrap keys wrapped with PKCS\$111 SDK 2.0.4 or earlier use the default IV of `0xA6A6A6A6A6A6A6A6`. 
  + To unwrap keys wrapped with PKCS\$111 SDK 3.0.0 or later, use the user-provided IV.
+ **Resolution status:** We strongly recommend that you amend your wrapping and unwrapping code to pass a NULL IV, or specify the default IV of `0xA6A6A6A6A6A6A6A6`.

## Issue: The `CKA_DERIVE` attribute was not supported and was not handled
<a name="ki-pkcs11-3"></a>
+ **Resolution status: **We have implemented fixes to accept `CKA_DERIVE` if it is set to `FALSE`. `CKA_DERIVE` set to `TRUE` will not be supported until we begin to add key derivation function support to AWS CloudHSM. You must update your client and SDK(s) to version 1.1.1 or higher to benefit from the fix.

## Issue: The `CKA_SENSITIVE` attribute was not supported and was not handled
<a name="ki-pkcs11-4"></a>
+ **Resolution status: **We have implemented fixes to accept and properly honor the `CKA_SENSITIVE` attribute. You must update your client and SDK(s) to version 1.1.1 or higher to benefit from the fix.

## Issue: Multipart hashing and signing are not supported
<a name="ki-pkcs11-5"></a>
+ **Impact: **`C_DigestUpdate` and `C_DigestFinal` are not implemented. `C_SignFinal` is also not implemented and will fail with `CKR_ARGUMENTS_BAD` for a non-`NULL` buffer. 
+ **Workaround: **Hash your data within your application and use AWS CloudHSM only for signing the hash. 
+ **Resolution status: **We are fixing the client and the SDKs to correctly implement multipart hashing. Updates will be announced in the AWS CloudHSM forum and on the version history page.

## Issue: `C_GenerateKeyPair` does not handle `CKA_MODULUS_BITS` or `CKA_PUBLIC_EXPONENT` in the private template in a manner that is compliant with standards
<a name="ki-pkcs11-6"></a>
+ **Impact: **`C_GenerateKeyPair` should return `CKA_TEMPLATE_INCONSISTENT` when the private template contains `CKA_MODULUS_BITS` or `CKA_PUBLIC_EXPONENT`. It instead generates a private key for which all usage fields are set to `FALSE`. The key cannot be used. 
+ **Workaround: **We recommend that your application check the usage field values in addition to the error code.
+ **Resolution status: **We are implementing fixes to return the proper error message when an incorrect private key template is used. The updated PKCS \$111 library will be announced on the version history page. 

## Issue: Buffers for the `C_Encrypt` and `C_Decrypt` API operations cannot exceed 16 KB when using the `CKM_AES_GCM` mechanism
<a name="ki-pkcs11-8"></a>

AWS CloudHSM does not support multipart AES-GCM encryption.
+ **Impact: **You cannot use the `CKM_AES_GCM` mechanism to encrypt data larger than 16 KB.
+ **Workaround: ** You can use an alternative mechanism such as `CKM_AES_CBC`, `CKM_AES_CBC_PAD`, or you can divide your data into pieces and encrypt each piece using `AES_GCM` individually. If you’re using `AES_GCM`, you must manage the division of your data and subsequent encryption. AWS CloudHSM does not perform multipart AES-GCM encryption for you. Note that FIPS requires that the initialization vector (IV) for `AES-GCM` be generated on the HSM. Therefore, the IV for each piece of your AES-GCM encrypted data will be different. 
+ **Resolution status: **We are fixing the SDK to fail explicitly if the data buffer is too large. We return `CKR_MECHANISM_INVALID` for the `C_EncryptUpdate` and `C_DecryptUpdate` API operations. We are evaluating alternatives to support larger buffers without relying on multipart encryption. Updates will be announced in the AWS CloudHSM forum and on the version history page.

## Issue: Elliptic-curve Diffie-Hellman (ECDH) key derivation is executed partially within the HSM
<a name="ki-pkcs11-9"></a>

Your EC private key remains within the HSM at all times, but the key derivation process is performed in multiple steps. As a result, intermediate results from each step are available on the client.
+ **Impact: **In Client SDK 3, the key derived using the `CKM_ECDH1_DERIVE` mechanism is first available on the client and is then imported into the HSM. A key handle is then returned to your application.
+ **Workaround: **If you are implementing SSL/TLS Offload in AWS CloudHSM, this limitation may not be an issue. If your application requires your key to remain within an FIPS boundary at all times, consider using an alternative protocol that does not rely on ECDH key derivation.
+ **Resolution status: **SDK 5.16 now supports ECDH with Key Derivation which is performed entirely within the HSM.

## Issue: Verification of secp256k1 signatures fails on EL6 platforms such as CentOS6 and RHEL 6
<a name="ki-pkcs11-10"></a>

 This happens because the CloudHSM PKCS\$111 library avoids a network call during initialization of the verification operation by using OpenSSL to verify EC curve data. Since Secp256k1 is not supported by the default OpenSSL package on EL6 platforms, the initialization fails.
+ **Impact: **Secp256k1 signature verification will fail on EL6 platforms. The verify call will fail with a `CKR_HOST_MEMORY` error.
+ **Workaround: **We recommend using either Amazon Linux 1 or any EL7 platform if your PKCS\$111 application needs to verify secp256k1 signatures. Alternatively, upgrade to a version of the OpenSSL package that supports the secp256k1 curve.
+ **Resolution status: **We are implementing fixes to fall back to the HSM if local curve validation is not available. The updated PKCS\$111 library will be announced on the [version history](client-history.md) page.

## Issue: Incorrect sequence of function calls gives undefined results instead of failing
<a name="ki-pkcs11-11"></a>
+ **Impact**: If you call an incorrect sequence of functions, the final result is incorrect even though the individual function calls return success. For instance, decrypted data may not match the original plaintext or signatures may fail to verify. This issue affects both single part and multi-part operations.

  Examples of incorrect function sequences:
  + `C_EncryptInit`/`C_EncryptUpdate` followed by `C_Encrypt`
  + `C_DecryptInit`/`C_DecryptUpdate` followed by `C_Decrypt`
  + `C_SignInit`/`C_SignUpdate` followed by `C_Sign`
  + `C_VerifyInit`/`C_VerifyUpdate` followed by `C_Verify`
  + `C_FindObjectsInit` followed by `C_FindObjectsInit`
+  **Workaround**: Your application should, in compliance with the PKCS \$111 specification, use the right sequence of function calls for both single and multi-part operations. Your application should not rely on the CloudHSM PKCS \$111 library to return an error under this circumstance. 

## Issue: Read Only Session is not supported in SDK 5
<a name="ki-pkcs11-13"></a>
+ **Issue: **SDK 5 does not support opening Read-Only sessions with `C_OpenSession`.
+ **Impact: **If you attempt to call `C_OpenSession` without providing `CKF_RW_SESSION`, the call will fail with the error `CKR_FUNCTION_FAILED`. 
+ **Workaround: **When opening a session, you must pass the `CKF_SERIAL_SESSION | CKF_RW_SESSION` flags to the `C_OpenSession` function call. 

## Issue: `cryptoki.h` header file is Windows-only
<a name="ki-pkcs11-14"></a>
+ **Issue: **With AWS CloudHSM Client SDK 5 versions 5.0.0 through 5.4.0 on Linux, the header file `/opt/cloudhsm/include/pkcs11/cryptoki.h` is only compatible with Windows operating systems.
+ **Impact: **You may encounter issues when trying to include this header file in your application on Linux-based operating systems.
+ **Resolution status: **Upgrade to AWS CloudHSM Client SDK 5 version 5.4.1 or above, which includes a Linux-compatible version of this header file.

# Known issues for the JCE SDK for AWS CloudHSM
<a name="ki-jce-sdk"></a>

The following issues impact the JCE SDK for AWS CloudHSM.

**Topics**
+ [

## Issue: When working with asymmetric key pairs, you see occupied key capacity even when you are not explicitly creating or importing keys
](#ki-jce-1)
+ [

## Issue: The JCE KeyStore is read only
](#ki-jce-3)
+ [

## Issue: Buffers for AES-GCM encryption cannot exceed 16,000 bytes
](#ki-jce-4)
+ [

## Issue: Elliptic-curve Diffie-Hellman (ECDH) key derivation is executed partially within the HSM
](#ki-jce-5)
+ [

## Issue: KeyGenerator and KeyAttribute incorrectly interprets key size parameter as number of bytes instead of bits
](#ki-jce-6)
+ [

## Issue: Client SDK 5 throws the warning “An illegal reflective access operation has occurred”
](#ki-jce-7)
+ [

## Issue: JCE session pool is exhausted
](#ki-jce-8)
+ [

## Issue: Client SDK 5 memory leak with getKey operations
](#ki-jce-9)

## Issue: When working with asymmetric key pairs, you see occupied key capacity even when you are not explicitly creating or importing keys
<a name="ki-jce-1"></a>
+ **Impact:** This issue can cause your HSMs to unexpectedly run out of key space and occurs when your application uses a standard JCE key object for crypto operations instead of a `CaviumKey` object. When you use a standard JCE key object, `CaviumProvider` implicitly imports that key into the HSM as a session key and does not delete this key until the application exits. As a result, keys build up while the application is running and can cause your HSMs to run out of free key space, thus freezing your application. 
+ **Workaround: **When using the `CaviumSignature` class, `CaviumCipher` class, `CaviumMac` class, or the `CaviumKeyAgreement` class, you should supply the key as a `CaviumKey` instead of a standard JCE key object.

  You can manually convert a normal key to a `CaviumKey` using the [https://github.com/aws-samples/aws-cloudhsm-jce-examples/blob/master/src/main/java/com/amazonaws/cloudhsm/examples/KeyUtilitiesRunner.java](https://github.com/aws-samples/aws-cloudhsm-jce-examples/blob/master/src/main/java/com/amazonaws/cloudhsm/examples/KeyUtilitiesRunner.java) class, and can then manually delete the key after the operation is complete.
+ **Resolution status: **We are updating the `CaviumProvider` to properly manage implicit imports. The fix will be announced on the version history page once available.

## Issue: The JCE KeyStore is read only
<a name="ki-jce-3"></a>
+ **Impact: **You cannot store an object type that is not supported by the HSM in the JCE keystore today. Specifically, you cannot store certificates in the keystore. This precludes interoperability with tools like jarsigner, which expect to find the certificate in the keystore. 
+ **Workaround: **You can rework your code to load certificates from local files or from an S3 bucket location instead of from the keystore. 
+ **Resolution status: **You can use AWS CloudHSM keystore to store certificates.

## Issue: Buffers for AES-GCM encryption cannot exceed 16,000 bytes
<a name="ki-jce-4"></a>

Multi-part AES-GCM encryption is not supported.
+ **Impact: **You cannot use AES-GCM to encrypt data larger than 16,000 bytes.
+ **Workaround: ** You can use an alternative mechanism, such as AES-CBC, or you can divide your data into pieces and encrypt each piece individually. If you divide the data, you must manage the divided ciphertext and its decryption. Because FIPS requires that the initialization vector (IV) for AES-GCM be generated on the HSM, the IV for each AES-GCM-encrypted piece of data will be different.
+ **Resolution status: **We are fixing the SDK to fail explicitly if the data buffer is too large. We are evaluating alternatives that support larger buffers without relying on multi-part encryption. Updates will be announced in the AWS CloudHSM forum and on the version history page. 

## Issue: Elliptic-curve Diffie-Hellman (ECDH) key derivation is executed partially within the HSM
<a name="ki-jce-5"></a>

Your EC private key remains within the HSM at all times, but the key derivation process is performed in multiple steps. As a result, intermediate results from each step are available on the client. An ECDH key derivation sample is available in the [Java code samples](java-samples_3.md).
+ **Impact: ** Client SDK 3 adds ECDH functionality to the JCE. When you use the `KeyAgreement` class to derive a SecretKey, it is first available on the client and is then imported into the HSM. A key handle is then returned to your application.
+ **Workaround: **If you are implementing SSL/TLS Offload in AWS CloudHSM, this limitation may not be an issue. If your application requires your key to remain within an FIPS boundary at all times, consider using an alternative protocol that does not rely on ECDH key derivation.
+ **Resolution status: **SDK 5.16 now supports ECDH with Key Derivation which is performed entirely within the HSM.

## Issue: KeyGenerator and KeyAttribute incorrectly interprets key size parameter as number of bytes instead of bits
<a name="ki-jce-6"></a>

When generating a key using the `init` function of the [KeyGenerator class](https://docs.oracle.com/javase/8/docs/api/javax/crypto/KeyGenerator.html#init-int-) or the `SIZE` attribute of the [AWS CloudHSM KeyAttribute enum](java-lib-attributes_5.md), the API incorrectly expects the argument to be the number of key bytes, when it should instead be the number of key bits. 
+ **Impact: **Client SDK versions 5.4.0 through 5.4.2 incorrectly expects the key size to be provided to the specified APIs as bytes.
+ **Workaround: **Convert the key size from bits to bytes before using the KeyGenerator class or KeyAttribute enum to generate keys using the AWS CloudHSM JCE provider if using Client SDK versions 5.4.0 through 5.4.2.
+ **Resolution status: **Upgrade your client SDK version to 5.5.0 or later, which includes a fix to correctly expect key sizes in bits when using the KeyGenerator class or KeyAttribute enum to generate keys.

## Issue: Client SDK 5 throws the warning “An illegal reflective access operation has occurred”
<a name="ki-jce-7"></a>

When using Client SDK 5 with Java 11, CloudHSM throws the following Java warning: 

```
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.amazonaws.cloudhsm.jce.provider.CloudHsmKeyStore (file:/opt/cloudhsm/java/cloudhsm-jce-5.6.0.jar) to field java.security .KeyStore.keyStoreSpi
WARNING: Please consider reporting this to the maintainers of com.amazonaws.cloudhsm.jce.provider.CloudHsmKeyStore
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
```

This issue is fixed in Client SDK version 5.8 and later.

## Issue: JCE session pool is exhausted
<a name="ki-jce-8"></a>

**Impact: **You may not be able to perform operations in JCE after seeing the following message:

```
com.amazonaws.cloudhsm.jce.jni.exception.InternalException: There are too many operations 
happening at the same time: Reached max number of sessions in session pool: 1000
```

**Workarounds: **
+ Restart your JCE application if you’re experiencing impact.
+ When performing an operation, you may need to complete the JCE operation before losing reference to the operation.
**Note**  
Depending on the operation, a completion method may be needed.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/ki-jce-sdk.html)

**Resolution status: **We have resolved this issue in Client SDK 5.9.0 and later. To fix this issue, upgrade your Client SDK to one of these versions.

## Issue: Client SDK 5 memory leak with getKey operations
<a name="ki-jce-9"></a>
+ **Impact: **The API `getKey` operation has a memory leak in JCE in Client SDK versions 5.10.0 and earlier. If you’re using the `getKey` API multiple times in your application, it will lead to increased memory growth and consequently increase the memory footprint in your application. Over time this may cause throttling errors or require the application to be restarted.
+ **Workaround: **We recommend upgrading to Client SDK 5.11.0. If this can't be done, we recommend not calling the `getKey` API multiple times in your application. Rather, reuse the previously returned key from the prior `getKey` operation as much as possible.
+ **Resolution status: **Upgrade your client SDK version to 5.11.0 or later, which includes a fix for this issue.

# Known issues for the OpenSSL Dynamic Engine for AWS CloudHSM
<a name="ki-openssl-sdk"></a>

These are the known issues for OpenSSL Dynamic Engine for AWS CloudHSM.

**Topics**
+ [

## Issue: You cannot install AWS CloudHSM OpenSSL Dynamic Engine on RHEL 6 and CentOS6
](#ki-openssl-1)
+ [

## Issue: Only RSA offload to the HSM is supported by default
](#ki-openssl-2)
+ [

## Issue: RSA encryption and decryption with OAEP padding using a key on the HSM is not supported
](#ki-openssl-3)
+ [

## Issue: Only private key generation of RSA and ECC keys is offloaded to the HSM
](#ki-openssl-4)
+ [

## Issue: You cannot install OpenSSL Dynamic Engine for Client SDK 3 on RHEL 8, CentOS 8, or Ubuntu 18.04 LTS
](#ki-openssl-5)
+ [

## Issue: SHA-1 Sign and Verify deprecation on RHEL 9 (9.2\$1)
](#ki-openssl-6)
+ [

## Issue: AWS CloudHSM OpenSSL Dynamic Engine is incompatible with the FIPS provider for OpenSSL v3.x
](#ki-openssl-7)
+ [

## Issue: SSL/TLS offload fails with ECDSA cipher suites in TLS 1.0 and TLS 1.1 starting with SDK 5.16
](#ki-openssl-8)

## Issue: You cannot install AWS CloudHSM OpenSSL Dynamic Engine on RHEL 6 and CentOS6
<a name="ki-openssl-1"></a><a name="openssl-default-version"></a>
+ **Impact: **The OpenSSL Dynamic Engine only [supports OpenSSL 1.0.2[f\$1]](client-supported-platforms.md). By default, RHEL 6 and CentOS 6 ship with OpenSSL 1.0.1.
+ **Workaround: ** Upgrade the OpenSSL library on RHEL 6 and CentOS 6 to version 1.0.2[f\$1].

## Issue: Only RSA offload to the HSM is supported by default
<a name="ki-openssl-2"></a>
+ **Impact: **To maximize performance, the SDK is not configured to offload additional functions such as random number generation or EC-DH operations.
+ **Workaround: **Please contact us through a support case if you need to offload additional operations.
+ **Resolution status: **We are adding support to the SDK to configure offload options through a configuration file. The update will be announced on the version history page once available.

## Issue: RSA encryption and decryption with OAEP padding using a key on the HSM is not supported
<a name="ki-openssl-3"></a>
+ **Impact: **Any call to RSA encryption and decryption with OAEP padding fails with a divide-by-zero error. This occurs because the OpenSSL dynamic engine calls the operation locally using the fake PEM file instead of offloading the operation to the HSM. 
+ **Workaround: ** You can perform this procedure by using either the [PKCS \$111 library for AWS CloudHSM Client SDK 5](pkcs11-library.md) or the [JCE provider for AWS CloudHSM Client SDK 5](java-library.md). 
+ **Resolution status: **We are adding support to the SDK to correctly offload this operation. The update will be announced on the version history page once available. 

## Issue: Only private key generation of RSA and ECC keys is offloaded to the HSM
<a name="ki-openssl-4"></a>

For any other key type, the OpenSSL AWS CloudHSM engine is not used for call processing. The local OpenSSL engine is used instead. This generates a key locally in software.
+ **Impact: **Because the failover is silent, there is no indication that you have not received a key that was securely generated on the HSM. You will see an output trace that contains the string `"...........++++++"` if the key is locally generated by OpenSSL in software. This trace is absent when the operation is offloaded to the HSM. Because the key is not generated or stored on the HSM, it will be unavailable for future use.
+ **Workaround: **Only use the OpenSSL engine for key types it supports. For all other key types, use PKCS \$111 or JCE in applications, or use `key_mgmt_util` in the CLI. 

## Issue: You cannot install OpenSSL Dynamic Engine for Client SDK 3 on RHEL 8, CentOS 8, or Ubuntu 18.04 LTS
<a name="ki-openssl-5"></a>
+ **Impact: **By default, RHEL 8, CentOS 8, and Ubuntu 18.04 LTS ship a version of OpenSSL that is not compatible with OpenSSL Dynamic Engine for Client SDK 3.
+ **Workaround: **Use a Linux platform that provides support for OpenSSL Dynamic Engine. For more information about supported platforms, see [Supported Platforms](client-supported-platforms.md). 
+ **Resolution status: ** AWS CloudHSM supports these platforms with OpenSSL Dynamic Engine for Client SDK 5. For more information, see [Supported Platforms](client-supported-platforms.md) and [OpenSSL Dynamic Engine](openssl-library.md). 

## Issue: SHA-1 Sign and Verify deprecation on RHEL 9 (9.2\$1)
<a name="ki-openssl-6"></a>
+ **Impact: **The usage of the SHA-1 message digest for cryptographic purposes has been deprecated in RHEL 9 (9.2\$1). As a result, sign and verify operations with SHA-1 using the OpenSSL Dynamic Engine will fail.
+ **Workaround: **If your scenario requires the use of SHA-1 for signing/verifying existing or third-party cryptographic signatures, see [Enhancing RHEL Security: Understanding SHA-1 deprecation on RHEL 9 (9.2\$1)](https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9) and [RHEL 9 (9.2\$1) Release Notes](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/overview) for further details.

## Issue: AWS CloudHSM OpenSSL Dynamic Engine is incompatible with the FIPS provider for OpenSSL v3.x
<a name="ki-openssl-7"></a>
+ **Impact: **You will receive an error if you attempt to utilize the AWS CloudHSM OpenSSL Dynamic Engine when the FIPS provider is enabled for OpenSSL versions 3.x.
+ **Workaround: **To use the AWS CloudHSM OpenSSL Dynamic Engine with OpenSSL versions 3.x, ensure that the "default" provider is configured. Read more about the default provider on the [OpenSSL Website](https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-default.html).

## Issue: SSL/TLS offload fails with ECDSA cipher suites in TLS 1.0 and TLS 1.1 starting with SDK 5.16
<a name="ki-openssl-8"></a>
+ **Impact: **Connection attempts using TLS 1.0 or TLS 1.1 fail because these versions use SHA-1 for signing, which doesn't meet [FIPS 186-5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf) requirements. 
+ **Workaround: **If you can't upgrade TLS versions immediately, you can migrate to non-FIPS clusters, which don't enforce the hash strength requirement. However, we recommend upgrading to TLS 1.2 or TLS 1.3 to maintain FIPS compliance and security best practices. 
+ **Resolution: **Upgrade your implementation to use TLS 1.2 or TLS 1.3. The Internet Engineering Task Force (IETF) has [deprecated](https://datatracker.ietf.org/doc/rfc8996/) TLS 1.0 and TLS 1.1 due to security concerns.

# Known issues for the Key Storage Provider (KSP) for AWS CloudHSM
<a name="ki-ksp-sdk"></a>

These are the known issues for Key Storage Provider (KSP) for AWS CloudHSM.

**Topics**
+ [

## Issue: Verification of a certificate store fails
](#ki-ksp-1)
+ [

## Issue: Container name inconsistency in the certificate store while using SDK3 compatibility mode for Client SDK 5
](#ki-ksp-2)

## Issue: Verification of a certificate store fails
<a name="ki-ksp-1"></a>

 When using Client SDK versions 5.14 and 5.15, calling `certutil -store my CERTIFICATE_SERIAL_NUMBER` throws the following error: 

```
ERROR: Could not verify certificate public key against private key
```
+  **Impact: ** You cannot use `certutil` to validate a certificate store created with Client SDK 5. 
+  **Workaround: ** Validate the key pair associated with the certificate by signing a file using the private key and verifying the signature using the public key. This can be done using Microsoft SignTool by following the steps provided [here](signtool-sdk5.md). 
+  **Resolution Status: ** We're working to add support for verifying certificates using `certutil`. The fix will be announced on the version history page once available. 

## Issue: Container name inconsistency in the certificate store while using SDK3 compatibility mode for Client SDK 5
<a name="ki-ksp-2"></a>

 When using the `certutil -store my CERTIFICATE_SERIAL_NUMBER` command to view certificates whose key-reference files were generated using [generate-file](cloudhsm_cli-key-generate-file.md#key-generate-ksp-key-reference) command in AWS CLI 5.16.0, the following error occurs: 

```
ERROR: Container name inconsistent: CONTAINER_NAME
```

This error occurs because there is a mismatch between the container name stored in the certificate and the key reference file name generated by the CloudHSM CLI.
+  **Impact: ** Despite this error, the certificates and their associated keys remain fully functional. All applications using these certificates will continue to work normally. 
+ **Workaround: ** To resolve this error, rename the key reference filename to Simple or Unique container name. Refer to the following sample output of the command `certutil -store my` 

  ```
  Subject: CN=www.website.com, OU=Organizational-Unit, O=Organization, L=City, S=State, C=US 
  Non-root Certificate
  Cert Hash(sha1): 1add52
  Key Container = 7e3c-b2f5
  Simple container name: tq-3daacd89
  Unique container name: tq-3daacd89
  ERROR: Container name inconsistent: 7e3c-b2f5
  ```

   By default, the key reference files will be stored in `C:\Users\Default\AppData\Roaming\Microsoft\Crypto\CaviumKSP\GlobalPartition` 

  1. Rename the key reference file to the simple container name.

  1. Repair the certificate store with the new key container name. Refer to steps 12 to 14 in [ KSP Migration](ksp-migrate-to-sdk-5.md) for more details.
+  **Resolution status: ** This issue has been fixed in Client SDK version 5.16.1. To resolve this problem, upgrade your Client SDK to version 5.16.1 or later. 

# Known issues for the OpenSSL Provider for AWS CloudHSM
<a name="ki-openssl-provider-sdk"></a>

These are the known issues for OpenSSL Provider for AWS CloudHSM.

**Topics**
+ [

## Issue: Errors in OpenSSL CLI when used with OpenSSL Provider
](#ki-openssl-provider-1)

## Issue: Errors in OpenSSL CLI when used with OpenSSL Provider
<a name="ki-openssl-provider-1"></a>
+  **Impact: ** Integration with OpenSSL CLI is not currently supported by AWS CloudHSM OpenSSL Provider. See [AWS CloudHSM SSL/TLS offload on Linux using NGINX or HAProxy with OpenSSL Provider](third-offload-linux-openssl-provider.md) for supported integrations. 
+  **Resolution: ** Use supported integrations listed in [AWS CloudHSM SSL/TLS offload on Linux using NGINX or HAProxy with OpenSSL Provider](third-offload-linux-openssl-provider.md). Any updates to OpenSSL CLI support will be announced on the version history page. 

# Known issues for Amazon EC2 instances running Amazon Linux 2 with AWS CloudHSM
<a name="ki-al2"></a>

The following issues impact AWS CloudHSM and Amazon EC2 instances that are running on Amazon Linux 2.

## Issue: Amazon Linux 2 version 2018.07 uses an updated `ncurses` package (version 6) that is currently incompatible with the AWS CloudHSM SDKs
<a name="ki-al2-1"></a>

You see the following error returned upon running the AWS CloudHSM [cloudhsm\$1mgmt\$1util](cloudhsm_mgmt_util.md) or [key\$1mgmt\$1util](key_mgmt_util.md):

```
/opt/cloudhsm/bin/cloudhsm_mgmt_util: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
```
+ **Impact: **Instances running on Amazon Linux 2 version 2018.07 will be unable to use *all* AWS CloudHSM utilities. 
+ **Workaround: ** Issue the following command on your Amazon Linux 2 EC2 instances to install the supported `ncurses` package (version 5):

  ```
  sudo yum update && yum install ncurses-compat-libs
  ```
+ **Resolution status:** This issue has been resolved in the AWS CloudHSM client 1.1.2 release. You must upgrade to this client to benefit from the fix.

# Known issues for integrating third-party applications with AWS CloudHSM
<a name="ki-third-party"></a>

The following issues impact AWS CloudHSM when integrating with third-party applications.

## Issue: Client SDK 3 does not support Oracle setting PKCS \$111 attribute `CKA_MODIFIABLE` during master key generation
<a name="ki-third-party-1"></a>

This limit is defined in the PKCS \$111 library. For more information, see annotation 1 on [Supported PKCS \$111 Attributes](pkcs11-attributes.md). 
+ **Impact:** Oracle master key creation fails.
+ **Workaround:** Set the special environment variable `CLOUDHSM_IGNORE_CKA_MODIFIABLE_FALSE` to TRUE when creating a new master key. This environment variable is only needed for master key generation and you do not need to use this environment variable for anything else. For example, you would use this variable for the first master key you create and then you would only use this environment variable again if you wanted to rotate your master key edition. For more information, see [Generate the Oracle TDE Master Encryption Key](oracle-tde.md#oracle-tde-generate-master-key).
+ **Resolution status:** We are improving the HSM firmware to fully support the CKA\$1MODIFIABLE attribute. Updates will be announced in the AWS CloudHSM forum and on the version history page

# Known issues for AWS CloudHSM cluster modification
<a name="ki-cluster-modification"></a>

The following issues impact customers attempting to use the modify-cluster API to change the HSM type of a cluster.

**Topics**
+ [

## Issue: Login latency increases due to increased PBKDF2 iterations
](#ki-cluster-modification-1)
+ [

## Issue: Unable to modify HSM type due to token key creation
](#ki-cluster-modification-2)

## Issue: Login latency increases due to increased PBKDF2 iterations
<a name="ki-cluster-modification-1"></a>
+ **Impact: **Clusters with a large amount of users will experience an extended migration period. This is due to changes in the backup restoration process performing PBKDF2 operations per user when restoring an hsm1.medium backup to hsm2m.medium for the first time.
+ **Resolution status: **If you created a new hsm2m.medium instance or migrated to hsm2m.medium from hsm1.medium before December 20th, 2025, you will need to reset your password to take advantage of performance improvements we have implemented for login operations. Refer to the [change-password](cloudhsm_cli-user-change-password.md) for instructions.

## Issue: Unable to modify HSM type due to token key creation
<a name="ki-cluster-modification-2"></a>
+ **Impact: **Customers performing token key based workloads will be unable to start their migration. This is done because the HSM will be placed into a limited-write mode to prevent dataloss scenarios during the HSM type modification.
+ **Workaround: **Stop creating and deleting token keys and then wait 7 days. Alternatively, please reach out to support if you
  + Cannot handle blocking token key migrations and cannot do a blue/green deployment.
  + Can handle blocking token key operations for the duration of the migration, but can’t wait the full 7 day period.
+ **Resolution status: **This issue has been resolved. Customers performing token key based workloads can now begin the migration. Token key creations and deletions will be blocked for the duration of the migration.

# Known issues of operation failure using AWS CloudHSM client version 5.12.0 on hsm2.medium
<a name="ki-hsm2-old-sdk"></a>

The following issues impact AWS CloudHSM when using AWS CloudHSM client version 5.12.0

## Issue: Error during get-attribute operation
<a name="ki-hsm2-old-sdk-1"></a>

If you're migrating from hsm1.medium to hsm2m.medium and using CloudHSM Client SDK 5.12.0, you may observe errors related to attribute handling.

You might see the following error message in the client logs: `Error in deserialization of data: Invalid integer conversion`

**Impact: Below operations will fail using client version 5.12.0**
+ In PKCS\$111 SDK, calls to C\$1GetAttributeValue fail
+ In CloudHSM CLI, the key list command shows no attributes in the output
+ In CloudHSM CLI, key generate-file may fail for keys generated using hsm1.medium

**Resolution: **We recommend upgrading to the latest version of the SDK which resolves this issue. 

# AWS CloudHSM Client SDK 3 key synchronization failures
<a name="ts-client-sync-fail"></a>

In Client SDK 3, if client-side synchronization fails, AWS CloudHSM makes a best-effort response to clean up any unwanted keys that may have been created (and are now unwanted). This process involves removing unwanted key material immediately or marking unwanted material for later removal. In both these cases, the resolution does not require any action from you. In the rare case that AWS CloudHSM cannot remove *and* cannot mark unwanted key material, you must delete the key material.

**Problem**: You attempt a token key generation, import, or unwrap operation and see errors that specify a failure to *tombstone*.

```
2018-12-24T18:28:54Z liquidSecurity ERR: print_node_ts_status:
[create_object_min_nodes]Key: 264617 failed to tombstone on node:1
```

**Cause**: AWS CloudHSM was unsuccessful removing *and* marking unwanted key material. 

**Resolution**: An HSM in your cluster contains unwanted key material that is not marked as unwanted. You must manually remove the key material. To manually delete unwanted key material, use key\$1mgmt\$1util (KMU) or an API from the PKCS \$111 library or the JCE provider. For more information, see [deleteKey](key_mgmt_util-deleteKey.md) or [Client SDKs](use-hsm.md).

To make token keys more durable, AWS CloudHSM fails key creation operations that don't succeed on the minimum number of HSMs specified in client-side synchronization settings. For more information, see [Key Synchronization in AWS CloudHSM](manage-key-sync.md).

# AWS CloudHSM Client SDK 3 verify HSM performance with the pkpspeed tool
<a name="troubleshooting-verify-hsm-performance"></a>

This topic describes how to verify AWS CloudHSM hardware security module (HSM) performance with Client SDK 3.

To verify the performance of the HSMs in your AWS CloudHSM cluster, you can use the pkpspeed (Linux) or pkpspeed\$1blocking (Windows) tool that is included with Client SDK 3. The pkpspeed tool executes under ideal conditions and directly calls the HSM to execute operations without going through an SDK such as PKCS11. We recommend load testing your application independently to determine your scaling needs. We do not recommend running the following tests: Random (I), ModExp (R), and EC point mul (Y).

 For more information about installing the client on a Linux EC2 instance, see [Install and configure the AWS CloudHSM client for CMU (Linux)](cmu-install-and-configure-client-linux.md). For more information about installing the client on a Windows instance, see [Install and configure the AWS CloudHSM client for CMU (Windows)](cmu-install-and-configure-client-win.md). 

After you install and configure the AWS CloudHSM client, run the following command to start it.

------
#### [ Amazon Linux ]

```
$ sudo start cloudhsm-client
```

------
#### [ Amazon Linux 2 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ CentOS 7 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ CentOS 8 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ RHEL 7 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ RHEL 8 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Ubuntu 16.04 LTS ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Ubuntu 18.04 LTS ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Windows ]
+ For Windows client 1.1.2\$1:

  ```
  C:\Program Files\Amazon\CloudHSM>net.exe start AWSCloudHSMClient
  ```
+ For Windows clients 1.1.1 and older:

  ```
  C:\Program Files\Amazon\CloudHSM>start "cloudhsm_client" cloudhsm_client.exe C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_client.cfg
  ```

------

If you have already installed the client software, you might need to download and install the latest version to get pkpspeed. You can find the pkpspeed tool at `/opt/cloudhsm/bin/pkpspeed` in Linux or `C:\Program Files\Amazon\CloudHSM\` in Windows. 

To use pkpspeed, run the **pkpspeed** command or **pkpspeed\$1blocking.exe**, specifying the user name and password of a crypto user (CU) on the HSM. Then set the options to use while considering the following recommendations. 

## Test recommendations
<a name="w2aac37c11c17"></a>
+ To test the performance of RSA sign and verify operations, choose the `RSA_CRT` cipher in Linux or option B in Windows. Don't choose `RSA` (option A in Windows). The ciphers are equivalent, but `RSA_CRT` is optimized for performance. 
+ Start with a small number of threads. For testing AES performance, one thread is typically enough to show maximum performance. For testing RSA performance(`RSA_CRT`), three or four threads is typically enough. 

## Configurable options for the pkpspeed tool
<a name="w2aac37c11c19"></a>
+ **FIPS Mode**: AWS CloudHSM is always in FIPS mode (See [AWS CloudHSM FAQs](https://aws.amazon.com/cloudhsm/faqs/) for details). This can be verified by using the CLI tools as documented in the AWS CloudHSM User Guide and running the ** [Get hardware information for each HSM in an AWS CloudHSM cluster with CMU](cloudhsm_mgmt_util-getHSMInfo.md) ** command which will indicate the FIPS mode status.
+ **Test type (blocking versus non-blocking)**: This specifies how operations are performed in a threaded manner. You will most likely get better numbers using non-blocking. This is because they utilize threads and concurrency.
+ **Number of threads**: Number of threads to run the test with.
+ **Time in seconds to run the test (max = 600)**: pkpspeed produces results measured in "OPERATIONS/second" and reports this value for each second that the test is run. For example, if the test is run for 5 seconds the output may look like the following sample values:
  + `OPERATIONS/second 821/1`
  + `OPERATIONS/second 833/1`
  + `OPERATIONS/second 845/1`
  + `OPERATIONS/second 835/1`
  + `OPERATIONS/second 837/1`

## Tests that can be ran with the pkpspeed tool
<a name="w2aac37c11c21"></a>
+ **AES GCM**: Tests AES GCM mode encryption.
+ **Basic 3DES CBC**: Tests 3DES CBC mode encryption. See note [1](#verify-hsm-performance-note-1) below for an upcoming change.
+ **Basic AES**: Tests AES CBC/ECB encryption.
+ **Digest**: Tests hash digest.
+ **ECDSA Sign**: Tests ECDSA sign.
+ **ECDSA Verify**: Tests ECDSA verify.
+ **FIPS Random**: Tests generation of a FIPS-compliant random number (Note: this can only be used in blocking mode).
+ **HMAC**: Tests HMAC.
+ **Random**: This test is not relevant because we are using FIPS 140-2 HSM’s.
+ **RSA non-CRT versus RSA\$1CRT**: Tests RSA sign and verify operations.
+ **RSA OAEP Enc**: Tests RSA OAEP encryption.
+ **RSA OAEP Dec**: Tests RSA OAEP decryption.
+ **RSA private dec non-CRT**: Tests RSA Private key encryption (non-optimized).
+ **RSA private key dec CRT**: Tests RSA Private key encryption (optimized).
+ **RSA PSS Sign**: Tests RSA PSS sign.
+ **RSA PSS Verify**: Tests RSA PSS verify.
+ **RSA public key enc**: Tests RSA Public key encryption.

RSA public key encryption, RSA private decryption non-CRT, and RSA private key decryption CRT will also prompt the user to answer the following:

```
Do you want to use static key [y/n]
```

If `y` is entered, a pre-computed key is imported into the HSM.

If `n` is entered, a new key is generated.

[1] In accordance with NIST guidance, this is disallowed for clusters in FIPS mode after 2023. For clusters in non-FIPS mode, it is still allowed after 2023. See [FIPS 140 Compliance: 2024 Mechanism Deprecation](compliance-dep-notif.md#compliance-dep-notif-1) for details.

## Examples
<a name="w2aac37c11c23"></a>

The following examples show the options that you can choose with pkpspeed (Linux) or pkpspeed\$1blocking (Windows) to test the HSM's performance for RSA and AES operations. 

**Example – Using pkpspeed to test RSA performance**  
You can run this example on Windows, Linux, and compatible operating systems.  
Use these instructions for Linux and compatible operating systems.  

```
/opt/cloudhsm/bin/pkpspeed -s CU user name -p password

SDK Version: 2.03

        Available Ciphers:
                AES_128
                AES_256
                3DES
                RSA  (non-CRT. modulus size can be 2048/3072)
                RSA_CRT (same as RSA)
For RSA, Exponent will be 65537

Current FIPS mode is: 00002
Enter the number of thread [1-10]: 3
Enter the cipher: RSA_CRT
Enter modulus length: 2048
Enter time duration in Secs: 60
Starting non-blocking speed test using data length of 245 bytes...
[Test duration is 60 seconds]

Do you want to use static key[y/n] (Make sure that KEK is available)?n
```

```
c:\Program Files\Amazon\CloudHSM>pkpspeed_blocking.exe -s CU user name -p password

Please select the test you want to run

RSA non-CRT------------------->A
RSA CRT----------------------->B
Basic 3DES CBC---------------->C
Basic AES--------------------->D
FIPS Random------------------->H
Random------------------------>I
AES GCM ---------------------->K

eXit------------------------>X
B

Running 4 threads for 25 sec

Enter mod size(2048/3072):2048
Do you want to use Token key[y/n]n
Do you want to use static key[y/n] (Make sure that KEK is available)?  n
OPERATIONS/second                821/1
OPERATIONS/second                833/1
OPERATIONS/second                845/1
OPERATIONS/second                835/1
OPERATIONS/second                837/1
OPERATIONS/second                836/1
OPERATIONS/second                837/1
OPERATIONS/second                849/1
OPERATIONS/second                841/1
OPERATIONS/second                856/1
OPERATIONS/second                841/1
OPERATIONS/second                847/1
OPERATIONS/second                838/1
OPERATIONS/second                843/1
OPERATIONS/second                852/1
OPERATIONS/second                837/
```

**Example – Using pkpspeed to test AES performance**  
Use these instructions for Linux and compatible operating systems.  

```
/opt/cloudhsm/bin/pkpspeed -s <CU user name> -p <password>

SDK Version: 2.03

        Available Ciphers:
                AES_128
                AES_256
                3DES
                RSA  (non-CRT. modulus size can be 2048/3072)
                RSA_CRT (same as RSA)
For RSA, Exponent will be 65537

Current FIPS mode is: 00000002
Enter the number of thread [1-10]: 1
Enter the cipher: AES_256
Enter the data size [1-16200]: 8192
Enter time duration in Secs: 60
Starting non-blocking speed test using data length of 8192 bytes...
```

```
c:\Program Files\Amazon\CloudHSM>pkpspeed_blocking.exe -s CU user name -p password
login as USER
Initializing Cfm2 library
        SDK Version: 2.03

 Current FIPS mode is: 00000002
Please enter the number of threads [MAX=400] : 1
Please enter the time in seconds to run the test [MAX=600]: 20


Please select the test you want to run

RSA non-CRT------------------->A
RSA CRT----------------------->B
Basic 3DES CBC---------------->C
Basic AES--------------------->D
FIPS Random------------------->H
Random------------------------>I
AES GCM ---------------------->K

eXit------------------------>X
D

Running 1 threads for 20 sec

Enter the key size(128/192/256):256
Enter the size of the packet in bytes[1-16200]:8192
OPERATIONS/second                9/1
OPERATIONS/second                10/1
OPERATIONS/second                11/1
OPERATIONS/second                10/1
OPERATIONS/second                10/1
OPERATIONS/second                10/...
```

# AWS CloudHSM Client SDK 5 user contains inconsistent values
<a name="troubleshoot-sdk5-inconsistent-value"></a>

The `user list` command in AWS CloudHSM Client SDK 5 returns a list of all users, and user properties, in your cluster. If any of a user’s properties have the value "**inconsistent**", this user is not synchronized across your cluster. This means that the user exists with different properties on different HSMs in the cluster. Based on which property is inconsistent, different repair steps can be taken. 

 The following table includes steps to resolve inconsistencies for a single user. If a single user has multiple inconsistencies, resolve them by following these steps from top to bottom. If there are multiple users with inconsistencies, work through this list for each user, fully resolving the inconsistencies for that user before moving on the next. 

**Note**  
To perform these steps you should ideally be logged in as an admin. If your admin account is not consistent, go through these steps logging in with the admin and repeating the steps until all properties are consistent. After your admin account is consistent, you can proceed to use that admin to synchronize other users in the cluster.


| Inconsistent property | Example output of user list | Implication  | Recovery method  | 
| --- | --- | --- | --- | 
| User "role" is "inconsistent" | <pre>{<br />"username": <br />"test_user",    <br />"role": "inconsistent",    <br />"locked": "false",    <br />"mfa": [],     <br />"cluster-coverage": "full"<br />}</pre> | This user is a CryptoUser on some HSMs, and an Admin on other HSMs. This can happen if two SDKs attempt to create the same user, at the same time, with different roles.You must remove this user, and re-create it with the desired role. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html)  | 
| User "cluster-coverage" is "inconsistent" | <pre>{<br />"username": "test_user",    <br />"role": "crypto-user",    <br />"locked": "false",    <br />"mfa": [],     <br />"cluster-coverage": "inconsistent"<br />}</pre> |  This user exists on a subset of HSMs in the cluster.This can happen if a **user create** partially succeeded, or if a **user delete** partially succeeded. You must finish your previous operation, either creating or removing this user from your cluster.  |  If the user should not exist, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html) If the user should exist, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html)  | 
| User "locked" parameter is "inconsistent" or "true" | <pre>{<br />"username": <br />"test_user",    <br />"role": "crypto-user",    <br />"locked": inconsistent,    <br />"mfa": [],     <br />"cluster-coverage": "full"<br />}</pre> |  This user is locked out on a subset of HSMs. This can happen if a user uses the wrong password and only connects to a subset of HSMs in the cluster. You must change the user's credentials to be consistent across the cluster.  |  If the user has MFA activated, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html) If MFA should be active for the user, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html)  | 
| MFA status is "inconsistent" | <pre>{    <br />"username": "test_user",    <br />"role": "crypto-user",    <br />"locked": "false",    <br />"mfa": [<br />  {            <br />   "strategy": "token-sign",<br />   "status": "inconsistent"<br />   }    <br />],     <br />"cluster-coverage": "full"<br />}</pre> |  This user has different MFA flags on different HSMs in the cluster. This can happen if an MFA operation only completed on a subset of HSMs. You must reset the user's password, and allow them to re-enable MFA.  |  If the user has MFA activated, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html) If MFA should be active for the user, follow these steps: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshoot-sdk5-inconsistent-value.html)  | 

# AWS CloudHSM Client SDK 5 user replicate failures
<a name="troubleshoot-sdk5-user-replicate-failures"></a>

The `user replicate` command in the CloudHSM CLI replicates a user between cloned AWS CloudHSM clusters. This guide addresses failures due to user inconsistencies within the source cluster or between the source and destination clusters. User replicate verifies that users are consistent by checking the following attributes: 
+ User Role
+ Account Lock Status
+ Quorum Status
+ Multi-Factor Authentication (MFA) Status

## Problem: The selected user is not synchronized throughout the cluster
<a name="troubleshoot-sdk5-user-replicate-failures-desynch"></a>

The user replication process checks for user synchronization throughout the source cluster. If a user's attribute has the value "inconsistent", this means the user isn't synchronized across the cluster. User replication fails with the following error message: 

```
{
  "error_code": 1,
  "data": "Specified user is inconsistent across the cluster"
}
```

To check for user desynchronization in the source cluster:
+ Run the `user list` command in the CloudHSM CLI.

```
aws-cloudhsm > user list
{
  "error_code": 0,
  "data": {
    "users": [
      {
        "username": "admin",
        "role": "admin",
        "locked": "false",
        "mfa": [],
        "quorum": [],
        "cluster-coverage": "full"
      },
      {
        "username": "example-inconsistent-user",
        "role": "admin",
        "locked": "false",
        "mfa": [],
        "quorum": [],
        "cluster-coverage": "inconsistent"
      },
      {
        "username": "app_user",
        "role": "internal(APPLIANCE_USER)",
        "locked": "false",
        "mfa": [],
        "quorum": [],
        "cluster-coverage": "full"
      }
    ]
  }
}
```

**Resolution: Synchronize user attributes throughout the source cluster**
+ To synchronize user information throughout the source cluster, refer to the following: [AWS CloudHSM Client SDK 5 user contains inconsistent values](troubleshoot-sdk5-inconsistent-value.md).

## Problem: User exists on the destination cluster with different attributes
<a name="troubleshoot-sdk5-user-replicate-failures-ref-attribs"></a>

 If a user already exists with the same reference exists in one or more HSMs in the destination cluster but has different user attributes, the following error may occur: 

```
{
  "error_code": 1,
  "data": "User replicate failed on 1 of 3 connections"
}
```

**Resolution**

1. Determine which version of the user should be kept.

1. Delete the unwanted user in the appropirate cluster by running the `user delete` command. See [Delete an AWS CloudHSM user with CloudHSM CLI](cloudhsm_cli-user-delete.md) for more information.

1. Replicate the user by running the `user replicate` command.

## Problem: User replicate from hsm2m.medium to hsm1.medium fails
<a name="troubleshoot-sdk5-user-replicate-failures-hsm2m-to-hsm1"></a>

User replicate from hsm2m.medium to hsm1.medium is not supported. If replicating a user from a hsm2m.medium source cluster to a hsm1.medium destination cluster, the following error will occur: 

```
{
  "error_code": 1,
  "data": "User replicate failed on 1 of 1 connections"
}
```

**Resolution**
+ Use [user management](manage-hsm-users-chsm-cli.md) with CloudHSM CLI to manually recreate the missing users.

# AWS CloudHSM Client SDK 5 key replicate failures
<a name="troubleshoot-sdk5-key-replicate-failures"></a>

The `key replicate` command in the CloudHSM CLI replicates a key from a source AWS CloudHSM cluster to a destination AWS CloudHSM cluster. This guide addresses failures caused by inconsistencies within the source cluster or between the source and destination clusters. 

## Problem: The selected key is not synchronized throughout the cluster
<a name="troubleshoot-sdk5-key-replicate-failures-desynch"></a>

The key replication process checks for key synchronization throughout the source cluster. If any key information or attributes have the value "inconsistent", this means the key isn't synchronized across the cluster. Key replication fails with the following error message: 

```
{
  "error_code": 1,
  "data": "The selected key is not synchronized throughout the cluster"
}
```

To check for key desynchronization in the source cluster:

1. Run the `key list` command in the CloudHSM CLI.

1. Use the `--filter `flag to specify the key.

1. Add the `--verbose` flag to see the full output with key coverage information.

```
aws-cloudhsm > key list --filter attr.label=example-desynchronized-key-label --verbose
{
  "error_code": 0,
  "data": {
    "matched_keys": [
      {
        "key-reference": "0x000000000048000f",
        "key-info": {
          "key-owners": [
            {
              "username": "cu1",
              "key-coverage": "full"
            }
          ],
          "shared-users": [],
        "key-quorum-values": {
          "manage-key-quorum-value": 0,
          "use-key-quorum-value": 0
        },
          "cluster-coverage": "full"
        },
        "attributes": {
          "key-type": "aes",
          "label": "example-desynchronized-key-label",
          "id": "0x",
          "check-value": "0xbe79db",
          "class": "secret-key",
          "encrypt": false,
          "decrypt": false,
          "token": true,
          "always-sensitive": true,
          "derive": false,
          "destroyable": true,
          "extractable": true,
          "local": true,
          "modifiable": true,
          "never-extractable": false,
          "private": true,
          "sensitive": true,
          "sign": "inconsistent",
          "trusted": false,
          "unwrap": false,
          "verify": true,
          "wrap": false,
          "wrap-with-trusted": false,
          "key-length-bytes": 16
        }
      }
    ],
    "total_key_count": 1,
    "returned_key_count": 1
  }
}
```

**Resolution: Synchronize key information and attributes throughout the source cluster**

To synchronize key information and attributes throughout the source cluster:

1.  For inconsistent key attributes: Use the `key set-attribute` command to set the desired attribute for the specific key. 

1.  For inconsistent shared user coverage: Use the `key share` or `key unshare` commands to adjust key sharing with the desired users. 

## Problem: Key with same reference exists in destination cluster with different information or attributes
<a name="troubleshoot-sdk5-key-replicate-failures-ref-attribs"></a>

 If a key with the same reference exists in the destination cluster but has different information or attributes, the following error may occur: 

```
{
  "error_code": 1,
  "data": "Key replicate failed on 1 of 3 connections"
}
```

**Resolution**

1. Determine which version of the key should be kept.

1. Delete the unwanted key version using the `key delete` command in the appropriate cluster.

1. Replicate the key from the cluster that has the correct version.

# AWS CloudHSM error seen during key availability check
<a name="troubleshoot-key-availability-check"></a>

**Problem**: An AWS CloudHSM hardware security module (HSM) is returning the following error:

```
Key <KEY HANDLE> does not meet the availability requirements - The key must be available on at least 2 HSMs before being used.
```

**Cause**: Key availability checks look for keys that, under rare but possible conditions, could be lost. This error usually occurs in clusters with only one HSM or in clusters with two HSMs during a period in which one of them is being replaced. In these situations, the following customer operations likely prompted the above error: 
+ A new key was generated using a command like **[The generate-symmetric category in CloudHSM CLI](cloudhsm_cli-key-generate-symmetric.md)** or **[The generate-asymmetric-pair category in CloudHSM CLI](cloudhsm_cli-key-generate-asymmetric-pair.md)**.
+ A **[List keys for a user with CloudHSM CLI](cloudhsm_cli-key-list.md)** operation was started.
+ A new instance of the SDK was started.
**Note**  
OpenSSL frequently forks new instances of the SDK.

**Resolution/recommendation**: Choose from the following actions to prevent this error from occurring:
+ Use the **--disable-key-availability-check** parameter to set key availability to false in the configure file of your [configure tool](configure-tool.md). For more information, see the [AWS CloudHSM Client SDK 5 configuration parameters](configure-tool-params5.md) section of the Configure tool.
+ If using a cluster with two HSMs, avoid using the operations that prompted the error, except during initialization code.
+ Increase the amount of HSMs in your cluster to at least three.

# AWS CloudHSM extracting keys using JCE
<a name="troubleshoot-getencoded"></a>

Use the following sections to troubleshoot issues extracting AWS CloudHSM keys using JCE.

## getEncoded, getPrivateExponent, or getS returns null
<a name="w2aac37c21b5"></a>

`getEncoded`, `getPrivateExponent`, and `getS` will return null because they are by default disabled. To enable them, refer to [Key extraction using JCE for AWS CloudHSM](java-lib-configs-getencoded.md).

If `getEncoded`, `getPrivateExponent`, and `getS` return null after being enabled, your key does not meet the right prerequisites. For more information, refer to [Key extraction using JCE for AWS CloudHSM](java-lib-configs-getencoded.md).

## getEncoded, getPrivateExponent, or getS return key bytes outside of the HSM
<a name="w2aac37c21b7"></a>

You or someone with access to your system has enabled clear key extraction. See the following pages for more information, including how to reset this configuration to the default disabled state.
+ [Key extraction using JCE for AWS CloudHSM](java-lib-configs-getencoded.md)
+ [Protecting and extracting keys from an HSM](bp-hsm-key-management.md#best-practices-key-protection)

# HSM throttling
<a name="troubleshoot-hsm-throttling"></a>

When your workload exceeds your AWS CloudHSM cluster’s hardware security module (HSM) capacity, you will receive error messages stating HSMs are busy or throttled. When this happens, you may see reduced throughput or an increased rate of rejection requests from HSMs. Additionally, HSMs may send the following busy errors.

## For Client SDK 5
<a name="ts-hsm-throttling-sdk5-errors"></a>
+ In PKCS11, busy errors map to `CKR_FUNCTION_FAILED`. This error can happen for multiple reasons, but if HSM throttling causes this error the following log lines will appear in your log: 
  + `[cloudhsm_provider::hsm1::hsm_connection::e2e_encryption::error] Failed to prepare E2E response. Error: Received error response code from Server. Response Code: 187`
  + `[cloudhsm_pkcs11::decryption::aes_gcm] Received error from the server. Error: This operation is already in progress. Internal error code: 0x000000BB`
+ In JCE, busy errors map to `com.amazonaws.cloudhsm.jce.jni.exception.InternalException: Unexpected error with the Provider: The HSM could not queue the request for processing.`
+ Other SDKs' busy errors print out the following message: `Received error response code from Server. Response Code: 187`.

## For Client SDK 3
<a name="ts-hsm-throttling-sdk3-errors"></a>
+ In PKCS11, busy errors map to `CKR_OPERATION_ACTIVE` errors.
+ In JCE, busy errors map to `CFM2Exception` with status of `0xBB (187)`. Applications can use `getStatus()` function on `CFM2Exception` to check what status is returned by the HSM.
+ Other SDKs busy errors will print out the following message: `HSM Error: HSM is already busy generating the keys(or random bytes) for another request.`

## Resolution
<a name="ts-hsm-throttling-resolution"></a>

You can resolve these issues by completing one or more of the following actions:
+ Add retry commands for rejected HSM operations in your application layer. Before enabling retry commands, ensure your cluster is adequately sized to meet peak loads.
**Note**  
For Client SDK 5.8.0 and above, retry commands are turned on by default. For details on each SDK’s retry command configuration, refer to [Advanced configurations for the Client SDK 5 configure tool](configure-sdk5-advanced-configs.md).
+ Add more HSMs to your cluster by following the instructions in [Scaling HSMs in an AWS CloudHSM cluster](add-remove-hsm.md).
**Important**  
We recommend load testing your cluster to determine the peak load you should anticipate, and then add one more HSM to it to ensure high availability.

# Keep HSM users in sync across HSMs in the AWS CloudHSM cluster
<a name="troubleshooting-keep-hsm-users-in-sync"></a>

To [manage your HSM's users](manage-hsm-users.md), you use a AWS CloudHSM command line tool known as cloudhsm\$1mgmt\$1util. It communicates only with the HSMs that are in the tool's configuration file. It's not aware of other HSMs in the cluster that are not in the configuration file.

AWS CloudHSM synchronizes the keys on your HSMs across all other HSMs in the cluster, but it doesn't synchronize the HSM's users or policies. When you use cloudhsm\$1mgmt\$1util to [manage HSM users](manage-hsm-users.md), these user changes might affect only some of the cluster's HSMs—the ones that are in the cloudhsm\$1mgmt\$1util configuration file. This can cause problems when AWS CloudHSM syncs keys across HSMs in the cluster, because the users that own the keys might not exist on all HSMs in the cluster.

To avoid these problems, edit the cloudhsm\$1mgmt\$1util configuration file *before* managing users. For more information, see [Prerequisites for user management in AWS CloudHSM Management Utility](understand-users.md).

# Lost connection to the AWS CloudHSM cluster
<a name="troubleshooting-lost-connection"></a>

When you [configured the AWS CloudHSM client](cmu-install-and-configure-client-linux.md#cmu-edit-client-configuration), you provided the IP address of the first HSM in your cluster. This IP address is saved in the configuration file for the AWS CloudHSM client. When the client starts, it tries to connect to this IP address. If it can't—for example, because the HSM failed or you deleted it—you might see errors like the following:

```
LIQUIDSECURITY: Daemon socket connection error
```

```
LIQUIDSECURITY: Invalid Operation
```

To resolve these errors, update the configuration file with the IP address of an active, reachable HSM in the cluster.

**To update the configuration file for the AWS CloudHSM client**

1. Use one of the following ways to find the IP address of an active HSM in your cluster.
   + View the **HSMs** tab on the cluster details page in the [AWS CloudHSM console](https://console.aws.amazon.com/cloudhsm/home).
   + Use the AWS Command Line Interface (AWS CLI) to issue the [https://docs.aws.amazon.com/cli/latest/reference/cloudhsmv2/describe-clusters.html](https://docs.aws.amazon.com/cli/latest/reference/cloudhsmv2/describe-clusters.html) command.

   You need this IP address in a subsequent step.

1. Use the following command to stop the client.

------
#### [ Amazon Linux ]

   ```
   $ sudo stop cloudhsm-client
   ```

------
#### [ Amazon Linux 2 ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ CentOS 7 ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ CentOS 8 ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ RHEL 7 ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ RHEL 8 ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ Ubuntu 16.04 LTS ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ Ubuntu 18.04 LTS ]

   ```
   $ sudo service cloudhsm-client stop
   ```

------
#### [ Windows ]
   + For Windows client 1.1.2\$1:

     ```
     C:\Program Files\Amazon\CloudHSM>net.exe stop AWSCloudHSMClient
     ```
   + For Windows clients 1.1.1 and older:

     Use **Ctrl**\$1**C** in the command window where you started the AWS CloudHSM client.

------

1. Use the following command to update the client's configuration file, providing the IP address that you found in a previous step.

   ```
   $ sudo /opt/cloudhsm/bin/configure -a <IP address>
   ```

1. Use the following command to start the client.

------
#### [ Amazon Linux ]

   ```
   $ sudo start cloudhsm-client
   ```

------
#### [ Amazon Linux 2 ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ CentOS 7 ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ CentOS 8 ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ RHEL 7 ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ RHEL 8 ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ Ubuntu 16.04 LTS ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ Ubuntu 18.04 LTS ]

   ```
   $ sudo service cloudhsm-client start
   ```

------
#### [ Windows ]
   + For Windows client 1.1.2\$1:

     ```
     C:\Program Files\Amazon\CloudHSM>net.exe start AWSCloudHSMClient
     ```
   + For Windows clients 1.1.1 and older:

     ```
     C:\Program Files\Amazon\CloudHSM>start "cloudhsm_client" cloudhsm_client.exe C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_client.cfg
     ```

------

# Missing AWS CloudHSM audit logs in CloudWatch
<a name="troubleshooting-missing-audit-logs"></a>

If you created an AWS CloudHSM cluster before January 20th, 2018, you will need to manually configure a [service-linked role](service-linked-roles.md) in order to enable the delivery of that cluster's audit logs. For instructions on how to enable a service-linked role on an HSM cluster, see [Understanding Service-Linked Roles](service-linked-roles.md), as well as [Creating a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#create-service-linked-role) in the IAM User Guide.

# Custom IVs with non-compliant length for AES key wrap in AWS CloudHSM
<a name="troubleshooting-aes-keys"></a>

This troubleshooting topic helps you determine if your application generates irrecoverable wrapped keys. If you are impacted by this issue, use this topic to address the problem.

**Topics**
+ [

## Determine whether your code generates irrecoverable wrapped keys
](#troubleshooting-problem1)
+ [

## Actions you must take if your code generates irrecoverable wrapped keys
](#troubleshooting-problem2)

## Determine whether your code generates irrecoverable wrapped keys
<a name="troubleshooting-problem1"></a>

You are impacted only if you meet *all* the conditions below:


****  

| Condition | How do I know? | 
| --- | --- | 
|  Your application uses PKCS \$111 library   |  The PKCS \$111 library is installed as the `libpkcs11.so` file in your `/opt/cloudhsm/lib` folder. Applications written in the C language generally use the PKCS \$111 library directly, while application written in Java may be using the library indirectly via a Java abstraction layer. If you're using Windows, you are NOT affected, as PKCS \$111 library is not presently available for Windows.  | 
|  Your application specifically uses version 3.0.0 of the PKCS \$111 library   |  If you received an email from the AWS CloudHSM team, you are likely using version 3.0.0 of the PKCS \$111 library.  To check the software version on your application instances, use this command:  <pre>rpm -qa | grep ^cloudhsm</pre>  | 
|  You wrap keys using AES key wrapping  |  AES key wrapping means you use an AES key to wrap out some other key. The corresponding mechanism name is `CKM_AES_KEY_WRAP`. It is used with the function `C_WrapKey`. Other AES based wrapping mechanisms that use initialization vectors (IVs), such as `CKM_AES_GCM` and` CKM_CLOUDHSM_AES_GCM`, are not affected by this issue. [Learn more about functions and mechanisms](pkcs11-mechanisms.md).   | 
|  You specify a custom IV when calling AES key wrapping, and the length of this IV is shorter than 8  |  AES key wrap is generally initialized using a `CK_MECHANISM` structure as follows:  `CK_MECHANISM mech = {CKM_AES_KEY_WRAP, IV_POINTER, IV_LENGTH};` This issue applies to you only if: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/cloudhsm/latest/userguide/troubleshooting-aes-keys.html)  | 

If you do not meet all the conditions above, you may stop reading now. Your wrapped keys can be unwrapped properly, and this issue does not impact you. Otherwise, see [Actions you must take if your code generates irrecoverable wrapped keys](#troubleshooting-problem2). 

## Actions you must take if your code generates irrecoverable wrapped keys
<a name="troubleshooting-problem2"></a>

You should take the following three steps: 

1.  **Immediately upgrade your PKCS \$111 library to a newer version**
   + [Latest PKCS \$111 library for Amazon Linux, CentOS 6 and RHEL 6](client-upgrade.md)
   + [Latest PKCS \$111 library for Amazon Linux 2, CentOS 7 and RHEL 7](client-upgrade.md)
   + [Latest PKCS \$111 library for Ubuntu 16.04 LTS](client-upgrade.md)

1. **Update your software to use a standards-compliant IV **

   We strongly recommend you follow our sample code and simply specify a NULL IV, which causes the HSM to utilize the standards-compliant default IV. Alternatively, you may explicitly specify the IV as `0xA6A6A6A6A6A6A6A6` with a corresponding IV length of `8`. We do not recommend using any other IV for AES key wrapping, and will explicitly disable custom IVs for AES key wrapping in a future version of the PKCS \$111 library.

   Sample code for properly specifying the IV appears in [aes\$1wrapping.c](https://github.com/aws-samples/aws-cloudhsm-pkcs11-examples/blob/master/src/wrapping/aes_wrapping.c#L72) on GitHub.

1. **Identify and recover existing wrapped keys**

   You should identify any keys you wrapped using version 3.0.0 of the PKCS \$111 library, and then contact support for assistance ([https://aws.amazon.com/support](https://aws.amazon.com/support)) in recovering these keys.

**Important**  
This issue only impacts keys wrapped with version 3.0.0 of the PKCS \$111 library. You can wrap keys using earlier versions (2.0.4 and lower-numbered packages) or later versions (3.0.1 and higher-numbered packages) of the PKCS \$111 library. 

# Resolving AWS CloudHSM cluster creation failures
<a name="troubleshooting-create-cluster"></a>

When you create a cluster, AWS CloudHSM creates the AWSServiceRoleForCloudHSM service-linked role, if the role does not already exist. If AWS CloudHSM cannot create the service-linked role, your attempt to create a cluster might fail.

This topic explains how to resolve the most common problems so you can create a cluster successfully. You need to create this role only one time. Once the service-linked role is created in your account, you can use any of the supported methods to create additional clusters and to manage them.

The following sections offer suggestions to troubleshoot cluster creation failures that are related to the service-linked role. If you try them but are still unable to create a cluster, contact [Support](https://aws.amazon.com/contact-us/). For more information about the AWSServiceRoleForCloudHSM service-linked role, see [Service-linked roles for AWS CloudHSM](service-linked-roles.md). 

**Topics**
+ [

## Add the missing permission
](#missing-permission)
+ [

## Create the service-linked role manually
](#api-call-failure)
+ [

## Use a non-federated user
](#non-federated-user)

## Add the missing permission
<a name="missing-permission"></a>

To create a service-linked role, the user must have the `iam:CreateServiceLinkedRole` permission. If the IAM user who is creating the cluster does not have this permission, the cluster creation process fails when it tries to create the service-linked role in your AWS account.

When a missing permission causes the failure, the error message includes the following text.

```
This operation requires that the caller have permission to call iam:CreateServiceLinkedRole to create the CloudHSM Service Linked Role.
```

To resolve this error, give the IAM user who is creating the cluster the `AdministratorAccess` permission or add the `iam:CreateServiceLinkedRole` permission to the user's IAM policy. For instructions, see [Adding Permissions to a New or Existing User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#w2ab1c19c19c26b9). 

Then try to [create the cluster](create-cluster.md) again. 

## Create the service-linked role manually
<a name="api-call-failure"></a>

You can use the IAM console, CLI, or API to create the AWSServiceRoleForCloudHSM service-linked role. For more information, see [Creating a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#create-service-linked-role) in the *IAM User Guide*. 

## Use a non-federated user
<a name="non-federated-user"></a>

Federated users, whose credentials originate outside of AWS, can perform many of the tasks of a non-federated user. However, AWS does not allow users to make the API calls to create a service-linked role from a federated endpoint. 

To resolve this problem, [create a non-federated user](create-iam-user.md) with the `iam:CreateServiceLinkedRole` permission, or give an existing non-federated user the `iam:CreateServiceLinkedRole` permission. Then have that user [create a cluster](create-cluster.md) from the AWS CLI. This creates the service-linked role in your account.

Once the service-linked role is created, if you prefer, you can delete the cluster that the non-federated user created. Deleting the cluster does not affect the role. Thereafter, any user with the required permissions, included federated users, can create AWS CloudHSM clusters in your account.

To verify that the role was created, open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) and choose **Roles**. Or use the IAM [get-role](https://docs.aws.amazon.com/cli/latest/reference/iam/get-role.html) command in the AWS CLI.

```
$  aws iam get-role --role-name AWSServiceRoleForCloudHSM
 {
     "Role": {
         "Description": "Role for CloudHSM service operations",
         role policy statement
         "RoleId": "AROAJ4I6WN5QVGG5G7CBY",
         "CreateDate": "2017-12-19T20:53:12Z",
         "RoleName": "AWSServiceRoleForCloudHSM",
         "Path": "/aws-service-role/cloudhsm.amazonaws.com/",
         "Arn": "arn:aws:iam::111122223333:role/aws-service-role/cloudhsm.amazonaws.com/AWSServiceRoleForCloudHSM"
     }
 }
```

# Retrieving AWS CloudHSM client configuration logs
<a name="troubleshooting-log-collection-script"></a>

AWS CloudHSM offers tools for Client SDK 3 and Client SDK 5 to gather information about your environment for AWS Support to troubleshoot problems. 

**Topics**
+ [

# AWS CloudHSM Client SDK 5 support tool
](support-tool-sdk5.md)
+ [

# AWS CloudHSM Client SDK 3 support tool
](support-tool-sdk3.md)

# AWS CloudHSM Client SDK 5 support tool
<a name="support-tool-sdk5"></a>

The script for AWS CloudHSM Client SDK 5 extracts the following information:
+ The configuration file for the Client SDK 5 component
+ Available log files
+ Current version of the operating system
+ Package information

## Running the info tool for Client SDK 5
<a name="running-sdk5"></a>

Client SDK 5 includes a client support tool for each component, but all tools function the same. Run the tool to create an output file with all the gathered information. 

The tools use a syntax like this: 

```
[ pkcs11 | dyn | jce | ksp | cli]_info
```

For example, to gather information for support from a Linux host running PKCS \$111 library and have the system write to the default directory, you would run this command: 

```
/opt/cloudhsm/bin/pkcs11_info
```

The tool creates the output file inside the `/tmp` directory.

------
#### [ AWS CloudHSM CLI ]

**To gather support data for AWS CloudHSM CLI on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/cli_info
  ```

**To gather support data for AWS CloudHSM on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\cli_info.exe"
  ```

------
#### [ PKCS \$111 library ]

**To gather support data for PKCS \$111 library on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/pkcs11_info
  ```

**To gather support data for PKCS \$111 library on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\pkcs11_info.exe"
  ```

------
#### [ OpenSSL Dynamic Engine ]

**To gather support data for OpenSSL Dynamic Engine on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/dyn_info
  ```

------
#### [ JCE provider ]

**To gather support data for JCE provider on Linux**
+  Use the support tool to gather data. 

  ```
  /opt/cloudhsm/bin/jce_info
  ```

**To gather support data for JCE provider on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\jce_info.exe"
  ```

------
#### [ Key Storage Provider ]

**To gather support data for Key Storage Provider on Windows**
+  Use the support tool to gather data. 

  ```
  PS C:\> & "C:\Program Files\Amazon\CloudHSM\bin\ksp_info.exe"
  ```

------

## Retrieving logs from a serverless environment
<a name="serverless-logs-sdk5"></a>

To configure for serverless environments, like Fargate or Lambda, we recommend you configure your AWS CloudHSM log type to `term`. Once configured to `term`, the serverless environment will be able to output to CloudWatch.

To get the client logs from CloudWatch, see [Working with log groups and log streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) in the Amazon CloudWatch Logs User Guide.

# AWS CloudHSM Client SDK 3 support tool
<a name="support-tool-sdk3"></a>

The script for the AWS CloudHSM Client SDK 3 extracts the following information:
+ Operating system and its current version
+ Client configuration information from `cloudhsm_client.cfg`, `cloudhsm_mgmt_util.cfg`, and `application.cfg` files
+ Client logs from the location specific to the platform
+ Cluster and HSM information by using cloudhsm\$1mgmt\$1util
+ OpenSSL information
+ Current client and build version
+ Installer version

## Running the info tool for Client SDK 3
<a name="running-script"></a>

The script creates an output file with all the gathered information. The script creates the output file inside the `/tmp` directory.

**Linux**: `/opt/cloudhsm/bin/client_info`

**Windows**: `C:\Program Files\Amazon\CloudHSM\client_info`

**Warning**  
This script has a known issue for Client SDK 3 versions 3.1.0 through 3.3.1. We strongly recommend you upgrade to version 3.3.2 which includes a fix for this issue. Please refer to the [Known Issues](https://docs.aws.amazon.com/cloudhsm/latest/userguide/ki-all.html#ki-all-9) page for more information before using this tool.