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!

PKCS#7 and Sun's MS CAPI Provider (JDK 1.6)

843811Oct 2 2007 — edited Nov 25 2009
I wrote an applet that uses CMS and the CMSSignedDataGenerator to
create PCKS7-compliant signatures for some messaging infrastructure
that on the server must be compatible with CAPICOM attached signature of microsoft.

Then, I decided to make my life a bit more complicated (hoping that I
was making my client's life easier). Instead of loading my key
material from a standard Java JKS keystore, I decided to use Sun's new
MSCAPI provider that's part of Java 6 so that my client could use
familiar Microsoft screens to manage key material in the Windows
environment.

Unfortunately, the signing code I wrote started to barf. I've poked
into the code, and the ultimate problem appears to be that the MSCAPI
provider's implementation of RSAPrivateKey
(sun.security.mscapi.RSAPrivateKey) doesn't implement the
java.security.interfaces.RSAPrivateKey interface.

Can someone help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2009
Added on Oct 2 2007
13 comments
1,571 views