简体   繁体   English

PKCS11Exception:CKR_HOST_MEMORY

[英]PKCS11Exception: CKR_HOST_MEMORY

I'm having problems with an application that generates SOAP messages and does some signing using the XMLSignature class from the JDK. 我在生成SOAP消息并使用JDK的XMLSignature类进行一些签名的应用程序时遇到问题。

I get this exception: 我得到这个例外:

Caused by: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_HOST_MEMORY
at sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:547)
at java.security.Signature$Delegate.engineSign(Signature.java:1160)
at java.security.Signature.sign(Signature.java:553)
at org.jcp.xml.dsig.internal.dom.DOMSignatureMethod.sign(DOMSignatureMethod.java:298)
at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:397)
at uz.mm.ehealth.client.sts.HolderOfKeySOAPHandler.handleMessage(HolderOfKeySOAPHandler.java:156)
at uz.mm.ehealth.client.sts.HolderOfKeySOAPHandler.handleMessage(HolderOfKeySOAPHandler.java:85)
at com.sun.xml.internal.ws.handler.HandlerProcessor.callHandleMessage(HandlerProcessor.java:282)
at com.sun.xml.internal.ws.handler.HandlerProcessor.callHandlersRequest(HandlerProcessor.java:123)
at com.sun.xml.internal.ws.handler.ClientSOAPHandlerTube.callHandlersOnRequest(ClientSOAPHandlerTube.java:127)
... 31 more
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_HOST_MEMORY
at sun.security.pkcs11.wrapper.PKCS11.C_Sign(Native Method)
at sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:538)
... 40 more

Googling this did not reveal anything, though. 谷歌搜索并没有发现任何东西。 Does anyone know what this could mean or how I could debug this further? 有谁知道这可能意味着什么,或者我如何进一步调试它?

Any pointers would be greatly appreciated! 任何指针将不胜感激!

CKR_HOST_MEMORY error is most likely returned by the PKCS#11 library your JRE is using as a "plugin" which performs cryptographic operations (digital signature creation in your case). 您的JRE使用PKCS#11库作为执行加密操作(在您的情况下,创建数字签名)的“插件”,很可能会返回CKR_HOST_MEMORY错误。 PKCS#11 libraries are usually provided by the vendors of specialized cryptographic hardware such as smartcards or HSMs and these libraries provide standardized API which can be used by other applications to access such devices in an easy and convenient way. PKCS#11库通常由专用加密硬件(例如智能卡或HSM)的供应商提供,这些库提供标准化的API,其他应用程序可以使用该API轻松便捷地访问此类设备。

When you look at PKCS#11 v2.20 specification you will find this description of the error you are getting: 当您查看PKCS#11 v2.20规范时 ,会发现此错误的描述:

CKR_HOST_MEMORY: The computer that the Cryptoki library is running on has insufficient memory to perform the requested function. CKR_HOST_MEMORY:运行Cryptoki库的计算机没有足够的内存来执行请求的功能。

I believe you should contact the vendor of the PKCS#11 library you are using. 我相信您应该与所使用的PKCS#11库的供应商联系。 He should be able to diagnose and resolve your problem. 他应该能够诊断并解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM