[英]Session.GetOperationState() method is throwing exception “Method C_GetOperationState returned CKR_FUNCTION_NOT_SUPPORTED in SoftHSM”
We are using SoftHSM in our application. 我们在应用程序中使用SoftHSM 。 We have generated tokens and imported keys in it. 我们已经生成了令牌并在其中导入了密钥。 Now we have created one job which monitors if our SoftHSM is Up and running. 现在,我们创建了一个作业,用于监视SoftHSM是否已启动并正在运行。
For that, It seems that the Session.GetOperationState() method should be able to work. 为此,似乎Session.GetOperationState()方法应该可以工作。 However I am getting an error message as below: 但是我收到如下错误消息:
Method C_GetOperationState returned CKR_FUNCTION_NOT_SUPPORTED. 方法C_GetOperationState返回了CKR_FUNCTION_NOT_SUPPORTED。
Please help, if this method is suitable for my need or should I usew some other function. 如果此方法适合我的需要或者我应该使用其他功能,请提供帮助。 Thanks in advance. 提前致谢。
Method Session::GetOperationState
freezes cryptographic operation (eg after computation of hash for the first half of file) and method Session::SetOperationState
resumes cryptographic operation (eg for the computation of hash for the second half of the file). 方法Session::GetOperationState
冻结加密操作(例如,在计算文件前半部分的哈希值之后),而方法Session::SetOperationState
恢复加密操作(例如,计算文件后半部分的哈希值)。
If you want to perform health check of your HSM it should be enough to open new session with Slot::OpenSession
method, check its state with Session::GetSessionInfo
method and close the session afterwards. 如果要执行HSM的运行状况检查,则足以使用Slot::OpenSession
方法打开新的会话,并使用Session::GetSessionInfo
方法检查其状态并随后关闭该会话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.