JDK-6241396 : SSL problem: Cannot find any provider supporting RSA/ECB/PKCS1Padding
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-03-16
  • Updated: 2010-04-02
  • Resolved: 2005-03-16
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
unlimited security strength JCE policy file installed without any effect

A DESCRIPTION OF THE PROBLEM :
SSL failure, because JCE can not provide cypher needed, I guess.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.net.*;
...
URL url = new URL("https://www.buyandhold.com/");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
...

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Connection has been opened
ACTUAL -
see the exception thrown

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" javax.net.ssl.SSLKeyException: RSA premaster secret error
	at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(Unknown Source)
	at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
	at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
	at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
	at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
	at exceedsoft.bh.PortfolioTransformer.main(PortfolioTransformer.java:188)
Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS1Padding
	at javax.crypto.Cipher.getInstance(DashoA12275)
	at com.sun.net.ssl.internal.ssl.JsseJce.getCipher(Unknown Source)
	at com.sun.net.ssl.internal.ssl.RSACipher.<init>(Unknown Source)
	at com.sun.net.ssl.internal.ssl.RSACipher.getInstance(Unknown Source)
	... 12 more

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.net.*;
...
URL url = new URL("https://www.buyandhold.com/");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
...
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
I tried an alternative JCE provider (www.openjce.org) to no effect
###@###.### 2005-03-16 09:22:10 GMT

Comments
EVALUATION There is not enough detail about the configuration to reproduce this, but the only reasonable explanation is that this is a duplicate of 6220064 , closing. ###@###.### 2005-03-16 19:37:04 GMT
16-03-2005