Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java sunmscapi.dll provider and MS Crypto Api next generation (CNG)

user12180646Apr 28 2015 — edited Apr 28 2015

Hi,

I am developing digital signature tools with java to be executed in Windows OS, so "Windows-My" is the certificate container used to retrieve the user certificates. Smart cards and HSM are also involved as the private key containers so it is necesary to provide CSP/CNG propietary libraries. The issue is that while there are no problems using sunmscapi provider to attach CSPs (old MS CAPI) libraries, i can't make it work using CNG (Crypto API: Next Generation). It seems like sunmscapi.dll is not capable to use the new cryptographic interface of MS. Is this true? Searching for some code of sunmscapi.dll through Internet i found that to recover private key information, CryptAcquireCertificatePrivateKey function is invoked, so maybe if CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG is set at dwFlags argument there will be no problem attching CNG libraries.

Maybe i am wrong and sunmscapi provider already support CNG (Key Store Provider) to recover private key information. I have tested KSP-CNG libraries and work well with other software to generate digital signatures.

I really appreciate if someone can help me with this or give some information in order to consider the ways to make it work.

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2015
Added on Apr 28 2015
0 comments
1,300 views