Bug 1329909

Summary: KeyException when using HTTPS
Product: [Fedora] Fedora Reporter: Jonny Heggheim <hegjon>
Component: java-1.8.0-openjdkAssignee: Deepak Bhole <dbhole>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 24CC: ahughes, dbhole, jerboaa, jvanek, msrb, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-24 19:38:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Java code the triggers the bug
none
Detailed output none

Description Jonny Heggheim 2016-04-24 19:11:49 UTC
Created attachment 1150203 [details]
Java code the triggers the bug

Description of problem:
All HTTPS connections will fail with KeyException.

Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-1.8.0.91-1.b14.fc24.x86_64
nss-3.23.0-1.2.fc24.x86_64

How reproducible:
Compile and run the attached java file

Steps to Reproduce:
1. $ javac Bla.java
2. $ java -Djavax.net.debug=all Bla

Actual results:
Start
javax.net.ssl.SSLException: java.security.ProviderException: java.security.KeyException
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
	at Bla.main(Bla.java:10)
Caused by: java.security.ProviderException: java.security.KeyException
	at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:147)
	at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:703)
	at sun.security.ssl.ECDHCrypt.<init>(ECDHCrypt.java:77)
	at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:721)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:281)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
	... 5 more
Caused by: java.security.KeyException
	at sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method)
	at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:128)
	... 14 more
Error
Done


Expected results:
No failures

Additional info:
Looks like the same issue: http://blog.backslasher.net/java-ssl-crash.html

Comment 1 Jonny Heggheim 2016-04-24 19:12:30 UTC
Created attachment 1150204 [details]
Detailed output

Comment 2 Jonny Heggheim 2016-04-24 19:38:24 UTC
Sorry for premature bug report, uodate FEDORA-2016-9f5172b1c5 fixed this bug.

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