Opened 7 years ago

Closed 7 years ago

#684 closed defect (fixed)

Windows got problem fetching some SSL seed servers

Reported by: Meeh Owned by: Meeh
Priority: minor Milestone: 0.9.2
Component: router/general Version: 0.9.1
Keywords: ssl, win32, windows Cc:
Parent Tickets: Sensitive: no

Description

I've just setup a (re)seed server. And it worked fine on both linux and osx, but with windows (Oracle java 1.7_0_5 amd64) I got a SSL error.

10.08.12 21:57:17 ERROR [Reseed      ] uter.networkdb.reseed.Reseeder: EepGet failed on https://X.X.X.X
javax.net.ssl.SSLException: java.lang.UnsupportedOperationException
	at sun.security.ssl.Alerts.getSSLException(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)
	at sun.security.ssl.AppOutputStream.write(Unknown Source)
	at java.io.OutputStream.write(Unknown Source)
	at net.i2p.util.SSLEepGet.sendRequest(SSLEepGet.java:663)
	at net.i2p.util.EepGet.fetch(EepGet.java:512)
	at net.i2p.util.EepGet.fetch(EepGet.java:477)
	at net.i2p.util.EepGet.fetch(EepGet.java:467)
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.readURL(Reseeder.java:465)
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.reseedOne(Reseeder.java:314)
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.reseed(Reseeder.java:270)
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.run2(Reseeder.java:155)
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.run(Reseeder.java:140)
	at java.lang.Thread.run(Unknown Source)
	at net.i2p.util.I2PThread.run(I2PThread.java:85)
Caused by: java.lang.UnsupportedOperationException
	at net.i2p.util.SSLEepGet$SavingTrustManager.getAcceptedIssuers(SSLEepGet.java:390)
	at sun.security.ssl.AbstractTrustManagerWrapper.checkAlgorithmConstraints(Unknown Source)
	at sun.security.ssl.AbstractTrustManagerWrapper.checkAdditionalTrust(Unknown Source)
	at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(Unknown Source)
	at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
	at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
	at sun.security.ssl.Handshaker.processLoop(Unknown Source)
	at sun.security.ssl.Handshaker.process_record(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
	... 13 more

Subtickets

Change History (1)

comment:1 Changed 7 years ago by Meeh

Resolution: fixed
Status: newclosed

Solution:

mtn: beginning commit on branch 'i2p.i2p'
mtn: committed revision e1b195a5659bb12e2e239847ffa7d0fc7aebdec4

I think I've fixed it. It works on windows 7. Going to test it on XP and windows 8 later.

#
# old_revision [12c6f9fa84d2388c1ccb4e94d61ef0b7f57ebe00]
#
# patch "core/java/src/net/i2p/util/SSLEepGet.java"
#  from [0a2e4dcf25ab5a74d8c6d4a76cc6eb318d2efda8]
#    to [445e151bf44caf13f2729fd62866b8de5e6a58c3]
#
============================================================
--- core/java/src/net/i2p/util/SSLEepGet.java   0a2e4dcf25ab5a74d8c6d4a76cc6eb318d2efda8
+++ core/java/src/net/i2p/util/SSLEepGet.java   445e151bf44caf13f2729fd62866b8de5e6a58c3
@@ -388,8 +388,8 @@ public class SSLEepGet extends EepGet {
        }
 
        public X509Certificate[] getAcceptedIssuers() {
-           throw new UnsupportedOperationException();
-       }
+           return new X509Certificate[0];
+    }
 
        public void checkClientTrusted(X509Certificate[] chain, String authType)
                throws CertificateException {
Note: See TracTickets for help on using tickets.