简体   繁体   English

Session.GetOperationState()方法引发异常“ SoftHSM中方法C_GetOperationState返回了CKR_FUNCTION_NOT_SUPPORTED”

[英]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.

相关问题 如何修复方法 C_GenerateKeyPair 返回的 CKR_FUNCTION_FAILED - How to fix method C_GenerateKeyPair returned CKR_FUNCTION_FAILED 查找对象后如何更新特定属性。 得到错误方法C_SetAttributeValue返回CKR_ATTRIBUTE_READ_ONLY - How to Update particular Attribute after finding an object. getting error Method C_SetAttributeValue returned CKR_ATTRIBUTE_READ_ONLY C#API方法调用引发异常 - C# API method call throwing an exception C# - 当我使用task :: wait()方法时,抛出异常 - C# - When I use task::wait() method it throwing the exception 知道哪种方法引发异常 - Knowing which method is throwing the exception 在C#中使用Substring方法时抛出内存不足异常 - Out of memory exception is throwing while using Substring method in C# 抛出异常后保持方法执行c# - Keep a method executing after throwing a exception c# 在C#中有一个很好的方法可以在给定的线程上抛出异常 - Is there a good method in C# for throwing an exception on a given thread 是否可以使用在 if 语句条件中引发异常的方法? c# - Is it possible to use a method throwing an exception in an if statement condition? c# 尽管有条件,但不抛出异常的方法 - Method not throwing an exception despite the conditions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM