JDK-6931562 : Support SunMSCAPI Security Provider in Windows 64-bit releases of JVM
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 6u18
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2010-03-03
  • Updated: 2011-10-07
  • Resolved: 2011-06-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u38Fixed 7 b142Fixed
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
JRE 1.6.0_u18, for 64-bit Windows Vista does not appear to contain the sun.security.mscapi.SunMSCAPI security provider.  The classes, supporting DLL, and security provider mapping in the java.security policy file are absent.
At runtime, the security API reports that it cannot locate the Windows-MY keystore.  Documentation for the SunMSCAPI Provider does not indicate that support is only available on certain Windows platforms.
http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunMSCAPI

The 32-bit distribution for the same version and operating system includes this feature.

If implementation is impossible, due to limitations of the host platform, treat this as a bug, for which the end product would be updated documentation to warn future engineers of the missing feature.

JUSTIFICATION :
Provide feature consistency between JVM implementations runnable on the same host platform.  Provide upgrade-path for code written against 32-bit JVM features.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The 64-bit Windows JVM implementations should provide access to the Windows-MY and Windows-ROOT keystores.
ACTUAL -
JVM indicates that it cannot locate the Windows-MY keystore.

Exception in thread "main" java.security.KeyStoreException: Windows-MY not found
	at java.security.KeyStore.getInstance(KeyStore.java:587)
	at org.example.crypto.LoadKeystore.main(LoadKeystore.java:10)
Caused by: java.security.NoSuchAlgorithmException: Windows-MY KeyStore not available
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:142)
	at java.security.Security.getImpl(Security.java:659)
	at java.security.KeyStore.getInstance(KeyStore.java:584)

---------- BEGIN SOURCE ----------
package org.example.crypto;

import java.security.KeyStore;
import java.security.KeyStoreException;

public class LoadKeystore
{
    public static void main(String[] args) throws KeyStoreException
    {
        KeyStore keystore = KeyStore.getInstance("Windows-MY");
        System.out.println(keystore.aliases());
    }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Don't upgrade to the Windows 64-bit JVM.
or
Use certificates from a file-based keystore. (i.e. don't use the missing feature).

Comments
EVALUATION Working.
2011-02-11