Bug 158893 - java.io.EOFException for particular HTTPS sites
java.io.EOFException for particular HTTPS sites
Product: Fedora
Classification: Fedora
Component: jessie (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Fitzsimmons
Depends On:
  Show dependency treegraph
Reported: 2005-05-26 12:28 EDT by Jeff Pound
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-04 02:28:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
HTTPS Test Case (969 bytes, text/plain)
2005-05-26 12:28 EDT, Jeff Pound
no flags Details

  None (edit)
Description Jeff Pound 2005-05-26 12:28:43 EDT
Description of problem:
Connecting to https://bugzilla.redhat.com/bugzilla/index.cgi causes a
java.io.EOFException. Connecting to other https sites works fine (ex:
https://bugs.eclipse.org/bugs/index.cgi). Running with a jvm also works fine.

Im not sure what makes redhat's https different from others.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run attatched test case.
Actual results:
java.io.EOFException: unexpected end of input stream
   at org.metastatic.jessie.provider.ContentType.read(java.io.InputStream)
(Unknown Source)
   at org.metastatic.jessie.provider.RecordInput.readRecord() (Unknown Source)
   at org.metastatic.jessie.provider.RecordInput.pollClose() (Unknown Source)
   at org.metastatic.jessie.provider.SSLSocket.close() (Unknown Source)
   at gnu.java.net.protocol.http.HTTPConnection.closeConnection()
java.io.InputStream, boolean) (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.Request.dispatch() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect()
   at HttpsTest.fetchPage(java.lang.String) (Unknown Source)
   at HttpsTest.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Comment 1 Jeff Pound 2005-05-26 12:28:43 EDT
Created attachment 114876 [details]
HTTPS Test Case
Comment 2 Thomas Fitzsimmons 2006-02-03 18:26:10 EST
Now I'm getting:

$ java HttpsTest
javax.net.ssl.SSLProtocolException: java.lang.Object cannot be cast to
   at org.metastatic.jessie.provider.Certificate.read (Certificate.java:123)
   at org.metastatic.jessie.provider.Handshake.read (Handshake.java:216)
   at org.metastatic.jessie.provider.Handshake.read (Handshake.java:110)
   at org.metastatic.jessie.provider.SSLSocket.doClientHandshake
   at org.metastatic.jessie.provider.SSLSocket.startHandshake (SSLSocket.java:519)
   at gnu.java.net.protocol.http.HTTPConnection.getSocket (libgcj.so.7)
   at gnu.java.net.protocol.http.HTTPConnection.getOutputStream (libgcj.so.7)
   at gnu.java.net.protocol.http.Request.dispatch (libgcj.so.7)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect (libgcj.so.7)
   at HttpsTest.fetchPage (HttpsTest.java:27)
   at HttpsTest.main (HttpsTest.java:21)
Caused by: java.security.cert.CertificateException: java.lang.Object cannot be
cast to gnu.java.security.OID
   at gnu.java.security.x509.X509Certificate.<init> (libgcj.so.7)
   at gnu.java.security.provider.X509CertificateFactory.generateCert (libgcj.so.7)
   at java.security.cert.CertificateFactory.generateCertificate (libgcj.so.7)
   at org.metastatic.jessie.provider.Certificate.read (Certificate.java:115)
   ...10 more
Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
   at gnu.java.security.x509.X509Certificate.parse (libgcj.so.7)
   at gnu.java.security.x509.X509Certificate.<init> (libgcj.so.7)
   ...14 more

I've seen that exception somewhere else but I can't place it.
Comment 3 Tom Tromey 2006-02-03 21:19:31 EST
What gcj are you using?

This was fixed in classpath cvs trunk and on the gcc 4.1 branch by:

2006-01-20  Tom Tromey  <tromey@redhat.com>

	* gnu/java/security/x509/X509Certificate.java (parse):
	Unconditionally read value; for version==1 case when reading
	algorithm ID.

This was bug #174708.  It was fixed in the gcc-4.1.0-0.16 RPM.
Comment 4 Thomas Fitzsimmons 2006-02-04 02:28:04 EST
Confirmed fixed in Rawhide.  Closing.

Note You need to log in before you can comment on or make changes to this bug.