Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 95898

Summary: "RSA premaster secret error" and "Cannot find any provider supporting RSA/ECB/PKCS1Padding" when step through mode
Product: [Eclipse Project] JDT Reporter: Ralf Hauser <hauser>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: sburoff
Version: 3.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ralf Hauser CLA 2005-05-19 02:21:21 EDT
The debug mode appears to obstruct SSL.
Even with the export local_policy.jar as per
http://dev.eclipse.org/newslists/news.eclipse.platform/msg34785.html and
http://dev.eclipse.org/newslists/news.eclipse.platform/msg34745.html

for more discussion and related stack traces, see also
http://www.bouncycastle.org/devmailarchive/msg04735.html and
http://forum.java.sun.com/thread.jspa?threadID=567433
Comment 1 Ralf Hauser CLA 2005-05-19 02:40:49 EDT
see also http://issues.apache.org/bugzilla/show_bug.cgi?id=32301
Comment 2 Kevin Barnes CLA 2005-05-19 09:00:53 EDT
Please attach steps to reproduce
Comment 3 Kevin Barnes CLA 2005-05-19 11:22:50 EDT
Could this be related to Bug #89935?
Comment 4 Ralf Hauser CLA 2005-05-19 12:34:06 EDT
thanks for the hint:
Cipher cp1 = Cipher.getInstance("DES/ECB/NoPadding");
                log.debug(cp1 + ", " + cp1.getAlgorithm() + ", "
                        + cp1.getProvider());
Cipher cp = Cipher.getInstance("DES/ECB/NoPadding", "SunJCE");
                log.debug(cp + ", " + cp.getAlgorithm() + ", "
                        + cp.getProvider());

produces
- with "use default system libraries"
  <<DEBUG [main] (TestSuite.java:369) - javax.crypto.Cipher@eaf40c, 
       DES/ECB/NoPadding, SunJCE version 1.5
    DEBUG [main] (TestSuite.java:372) - javax.crypto.Cipher@13c6641, 
       DES/ECB/NoPadding, SunJCE version 1.5>>
- without the "use default system libraries", I get
  <<DEBUG [main] (TestSuite.java:369) - javax.crypto.Cipher@18d7ace,
       DES/ECB/NoPadding, BC version 1.28>>
and then the stacktrace as per the above referenced bug ending in 
  <<DEBUG [main] (TestSuite.java:377) - JCE cannot authenticate 
       the provider SunJCE>>

So, interesting that the "BC" gets half found due to 
            Security.addProvider(new BouncyCastleProvider());
but as soon as I do not ask specificly for "BC", it fails at least in the case
reported on the bouncycastle mailing list

Interestingly, my bcprov*.jar is not in the jre/lib directories that are
supposedly affect by this, but in the Project - Poperties - Build-Path - Libraries

Anyway, if there were a good way to warn the user, I hope you will add this (at
least I don't recall a specific reason for not to have that box checked, so why
is it unchecked? And if I did so, I certainly didn't get a warning that would
helped me when running into this)!
Comment 5 Kevin Barnes CLA 2005-05-19 12:45:49 EDT

*** This bug has been marked as a duplicate of 89935 ***