注册为多个 HSM 的 HSM 客户端的 Pkcs11Interop Cryptoki 应用程序是否会检测并向活动的 HSM 发送请求

Will the Pkcs11Interop Cryptoki application, which is registered as HSM client to more than one HSMs) detects and sends requests to active HSM

我们在我们的应用程序中使用 Pkcs11Interop API 使用存储在 Thales nShield HSM 中的私钥对摘要进行签名。

为了满足 DR 场景,我们的数字签名应用程序托管服务器注册为主要 Thales nShield HSM 和 DR(次要)Thales nShield HSM 的 HSM 客户端。此处,基于安装的安全世界软件将在创建 HSM 连接之前检测到活动 HSM 的假设,两个 Thales nShield HSM 的 IP 地址不同。

当我们通过关闭主 Thales nShield HSM 来测试 DR(故障转移)场景时,Pkcs11Interop 出现错误:

Method C_Initialize returned CKR_FUNCTION_FAILED.

我想知道使用 Pkcs11Interop 编写的代码是否应该检查哪个 HSM 处于活动状态,然后向活动 HSM 发送请求,或者服务器上安装的安全世界软件是否应该在打开活动连接之前检查活动 HSM。

请告诉我们处理这种情况的正确方向。

I would like to know whether the code written using Pkcs11Interop should check which HSM is active then send requests to active HSM OR the secure world software installed on the server should check the active HSM before opening active connection

IMO 你应该首先询问 Thales 支持他们的 PKCS#11 库是否可以执行自动故障转移。如果他们的回答是肯定的,那么您不需要将任何与故障转移相关的代码添加到您的应用程序中。