JDK-7054708 : More fix of 6578658.
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 6u27
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2011-06-14
  • Updated: 2015-06-05
  • Resolved: 2011-06-20
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 Availability Release.

To download the current JDK release, click here.
JDK 6
6u27 b04Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Testcases from # 6578658
test/sun/security/mscapi/PublicKeyInterop.sh test/sun/security/mscapi/SignUsingSHA2withRSA.sh
failing


test/sun/security/mscapi/PublicKeyInterop.sh
----------System.err:(21/1784)*----------
K:\\regression\\workspaces\\1.6.0\\1.6.0_27b03\\j2se\\test\\sun\\security\\mscapi\\PublicKeyInterop.java:9: warning: sun.misc.HexDumpEncoder is Sun proprietary API and may be removed in a future release
import sun.misc.HexDumpEncoder;
               ^
K:\\regression\\workspaces\\1.6.0\\1.6.0_27b03\\j2se\\test\\sun\\security\\mscapi\\PublicKeyInterop.java:32: warning: sun.misc.HexDumpEncoder is Sun proprietary API and may be removed in a future release
        HexDumpEncoder hde = new HexDumpEncoder();
        ^
K:\\regression\\workspaces\\1.6.0\\1.6.0_27b03\\j2se\\test\\sun\\security\\mscapi\\PublicKeyInterop.java:32: warning: sun.misc.HexDumpEncoder is Sun proprietary API and may be removed in a future release
        HexDumpEncoder hde = new HexDumpEncoder();
                                 ^
Note: K:\\regression\\workspaces\\1.6.0\\1.6.0_27b03\\j2se\\test\\sun\\security\\mscapi\\PublicKeyInterop.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings
Exception in thread "main" java.security.InvalidKeyException: Unsupported key type: Sun RSA public key, 1024 bits
  modulus: 124501152047170682521371806684295282680950696756635210219846798198670699256498301911760802835753596930497796996589682670475180329547420375051670801739040548999544381689096661949313037932039723428697947004151629853158407961493309870189909745552334150850636418080422322882611819812119935198727889259737112381249
  public exponent: 65537
	at sun.security.mscapi.RSACipher.engineGetKeySize(RSACipher.java:345)
	at javax.crypto.Cipher.b(DashoA13*..)
	at javax.crypto.Cipher.a(DashoA13*..)
	at javax.crypto.Cipher.init(DashoA13*..)
	at javax.crypto.Cipher.init(DashoA13*..)
	at PublicKeyInterop.main(PublicKeyInterop.java:43)
result: Failed. Execution failed: exit code 1


==============================================================================
test/sun/security/mscapi/SignUsingSHA2withRSA.sh
----------System.out:(6/158)----------
Creating a temporary RSA keypair in the Windows-My store...

Running the test...

Removing the temporary RSA keypair from the Windows-My store...
done.
----------System.err:(14/887)*----------
K:\\regression\\workspaces\\1.6.0\\1.6.0_27b03\\j2se\\test\\sun\\security\\mscapi\\SignUsingSHA2withRSA.java:14: illegal start of type
    private static List<byte[]> generatedSignatures = new ArrayList<>();
                                                                    ^
1 error
java.lang.NoClassDefFoundError: SignUsingSHA2withRSA
Caused by: java.lang.ClassNotFoundException: SignUsingSHA2withRSA
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: SignUsingSHA2withRSA.  Program will exit.
Exception in thread "main" 
result: Failed. Execution failed: exit code 1

Comments
EVALUATION Testcase need little modification to run via JTREG and some typo fix. new signed sunmscapi.jar need to be included also.
14-06-2011