Pheox - Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

com.pheox.jcapi.JCAPIJNIRuntimeException in JCAPIUtil.getCSP RSS feed
Forum Index » General Issues
Author Message
mackenziecc

Visitor

Joined: Sep 23, 2009
Messages: 1
Offline
Anyways, am running into an issue and trying to get more information on the JCAPIUtil.getCSP and why it might be hitting a com.pheox.jcapi.JCAPIJNIRuntimeException. Enclosed is a stack trace.

Using MS CSP = Microsoft Enhanced Cryptographic Provider v1.0
CSP = ActivCard Gold Cryptographic Service Provider
CSP = Arcot Systems Cryptographic Service Provider v1.0
CSP = eToken Base Cryptographic Provider
CSP = Gemplus GemSAFE Card CSP v1.0
CSP = Infineon SICRYPT Base Smart Card CSP
CSP = Microsoft Base Cryptographic Provider v1.0
CSP = Microsoft Base DSS and Diffie-Hellman Cryptographic Provider
CSP = Microsoft Base DSS Cryptographic Provider
CSP = Microsoft DH SChannel Cryptographic Provider
CSP = Microsoft Enhanced Cryptographic Provider v1.0
CSP = Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider
CSP = Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)
CSP = Microsoft Exchange Cryptographic Provider v1.0
CSP = Microsoft RSA SChannel Cryptographic Provider
CSP = Microsoft Strong Cryptographic Provider
CSP = Schlumberger Cryptographic Service Provider
CSP = VeriSign Personal Trust Agent (PTA)
CSP = VeriSign TPM CSP
15:52:10.234 INFO findObjects - Found capi alias = My|8dsVZRHLJApzdktl+AJnmcBeIkE=
15:52:10.234 INFO findTokens - Exception raised in JCAPI.DLL:
JCAPIUtil_getCSP() - Could not get key provider info.
Cannot find object or property.

Error code: 0x80092004
com.pheox.jcapi.JCAPIJNIRuntimeException: Exception raised in JCAPI.DLL:
JCAPIUtil_getCSP() - Could not get key provider info.
Cannot find object or property.

Error code: 0x80092004
at com.pheox.jcapi.CoreUtilJNI.getCSP(Native Method)
at com.pheox.jcapi.f.a(Unknown Source)
at com.pheox.jcapi.JCAPIUtil.getCSP(Unknown Source)
at org.mysignaturebook.plugin.JCAPIToken.getSoftCertificate(Unknown Source)
at org.mysignaturebook.plugin.JCAPIToken.findObjects(Unknown Source)
at org.mysignaturebook.plugin.JCAPIToken.<init>(Unknown Source)
at org.mysignaturebook.plugin.MSBTokenFactory.getJCAPIToken(Unknown Source)
at org.mysignaturebook.plugin.MSBTokenFactory.findTokens(Unknown Source)

We do not have the ability to enable Pheox debug as this is a production applet. Would appreciate either some context as to what might be happening in JCAPIUtil.getCSP or some background on when/why error code 0x80092004 might be generated.

Thanks.
tommy

Visitor

Joined: May 30, 2005
Messages: 148
Offline
Hi,

What happens is that the JCAPI DLL is calling the MS CAPI function CertGetCertificateContextProperty() with dwPropId set to CERT_KEY_PROV_INFO_PROP_ID
in order to get the name of the CSP from the returned CRYPT_KEY_PROV_INFO struct. Your error code indicates CRYPT_E_NOT_FOUND, which means The certificate does not have the specified property.

At a first glance, it doesn't seem that good for JCAPI to ask for the CRYPT_KEY_PROV_INFO struct since it holds the information about the private key associated with the certificate in question. That struct can not be returned for a certificate entry since it doesn't have a private key (only key entries have private keys and can thus return such a struct).

From your program's output, I assume that the alias My|8dsVZRHLJApzdktl+AJnmcBeIkE= trigger this problem. This certificate is stored in the MY system store which indicates that it should be a key entry, but it doesn't have to be since certificates without a private key can be stored there as well.

Is it possible for you to find out if the certificate with alias My|8dsVZRHLJApzdktl+AJnmcBeIkE= has a private key or not?
Meanwhile, I will setup a test case here to reproduce your problem.

Regards,
Tommy
tommy

Visitor

Joined: May 30, 2005
Messages: 148
Offline
Hi,

Have you been able yet to check if the certificate has a private key or not?
Since no CRYPT_KEY_PROV_INFO struct is returned from the CSP, it shows a strong indication that there is no private key associated with that private key.

I've tested the getCSP() method with a certificate entry (i.e. no private key) and it trigger the exact same error as yours.

In any case, I'll change the implementation of the getCSP() method to also return the preferred CSP for certificate entries as well.

Regards,
Tommy
tommy

Visitor

Joined: May 30, 2005
Messages: 148
Offline
Updated information!

The reported problem is now fixed in JCAPI v1.2.5.

Regards,
Tommy
 
Forum Index » General Issues
Go to:   
Mobile view
Powered by JForum 2.8.3 © 2023 JForum Team • Maintained by Andowson Chang and Ulf Dittmer