-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
beta
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2124851 | 5.0u4 | Andreas Sterbenz | P2 | Resolved | Fixed | b03 |
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux vermivorous 2.6.5-7.111-smp #3 SMP Tue Dec 14 11:41:51 EET 2004 i686 i686 i386 GNU/Linux
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If the locale of the system is set to turkish (tr_TR) or the application sets the default locale to turkish all SSL connections will fail with "javax.net.ssl.SSLKeyException: RSA premaster secret error"
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the application in "Source code for an executable test case"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output, no exceptions.
ACTUAL -
Exception in thread "main" javax.net.ssl.SSLKeyException: RSA premaster secret error
at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(PreMasterSecret.java:86)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:514)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:160)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
at HTTPSTest.main(HTTPSTest.java:12)
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(JsseJce.java:90)
at com.sun.net.ssl.internal.ssl.RSACipher.<init>(RSACipher.java:35)
at com.sun.net.ssl.internal.ssl.RSACipher.getInstance(RSACipher.java:69)
at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(PreMasterSecret.java:82)
... 11 more
ERROR MESSAGES/STACK TRACES THAT OCCUR :
as in "Actual Result"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.net.*;
import java.util.*;
public class HTTPSTest
{
public static void main(String[] args) throws Exception
{
Locale.setDefault(new Locale("tr", "TR"));
URL url = new URL("https://www.verisign.com/");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Change the locale
Release Regression From : 1.4.2_06
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 2005-1-21 13:57:10 GMT
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux vermivorous 2.6.5-7.111-smp #3 SMP Tue Dec 14 11:41:51 EET 2004 i686 i686 i386 GNU/Linux
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If the locale of the system is set to turkish (tr_TR) or the application sets the default locale to turkish all SSL connections will fail with "javax.net.ssl.SSLKeyException: RSA premaster secret error"
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the application in "Source code for an executable test case"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output, no exceptions.
ACTUAL -
Exception in thread "main" javax.net.ssl.SSLKeyException: RSA premaster secret error
at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(PreMasterSecret.java:86)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:514)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:160)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
at HTTPSTest.main(HTTPSTest.java:12)
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(JsseJce.java:90)
at com.sun.net.ssl.internal.ssl.RSACipher.<init>(RSACipher.java:35)
at com.sun.net.ssl.internal.ssl.RSACipher.getInstance(RSACipher.java:69)
at com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(PreMasterSecret.java:82)
... 11 more
ERROR MESSAGES/STACK TRACES THAT OCCUR :
as in "Actual Result"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.net.*;
import java.util.*;
public class HTTPSTest
{
public static void main(String[] args) throws Exception
{
Locale.setDefault(new Locale("tr", "TR"));
URL url = new URL("https://www.verisign.com/");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Change the locale
Release Regression From : 1.4.2_06
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 2005-1-21 13:57:10 GMT
- backported by
-
JDK-2124851 REGRESSION: SSL connections fail with Turkish input locale
- Resolved
- duplicates
-
JDK-6241396 SSL problem: Cannot find any provider supporting RSA/ECB/PKCS1Padding
- Closed
- relates to
-
JDK-6208680 Doc: Clarify issues with toLowerCase/toUpperCase and Turkish
- Resolved