函数“C_Decrypt”返回 Luna HSM 抛出的 0x5 (CKR_GENERAL_ERROR)
Luna HSM 抛出以下异常的原因可能是什么:
com.safenetinc.luna.exception.LunaCryptokiException: function 'C_Decrypt' returns 0x5 (CKR_GENERAL_ERROR)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2202) ~[na:na]
PS:它能够使用提供的密钥别名加载密钥。
what could be the reason that Luna HSM is throwing the below exception:
com.safenetinc.luna.exception.LunaCryptokiException: function 'C_Decrypt' returns 0x5 (CKR_GENERAL_ERROR)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2202) ~[na:na]
PS: it is able to load key using the provided key alias.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PKCS #11 中的 CKR_GENERAL_ERROR 表示客户端的加密操作请求未能成功完成。发生这种情况的原因可能是,在加密操作正在进行时,应用程序正在使用的插槽可能已离线/断开连接/消失。或者它可能遇到了崩溃或停止等问题。在某些情况下,您可能会在 CKR_GENERAL_ERROR 之后看到诸如 CKR_DEVICE_ERROR 或 CKR_TOKEN_NOT_PRESENT 之类的错误。
在您的情况下,当插槽仍在忙于处理 C_Decrypt() 时,插槽可能发生了一些事情。
CKR_GENERAL_ERROR in PKCS #11 means a crypto operation request by a client failed to complete successfully. This could have happened because the slot an application was using may have gone offline/disconnected/disappeared while a crypto operation was in progress. Or it may have encountered issues such as crash or a halt. In some cases you may see errors such as CKR_DEVICE_ERROR or CKR_TOKEN_NOT_PRESENT after CKR_GENERAL_ERROR.
In your case, something may have happened to the slot while it was still busy processing C_Decrypt().