Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.net.ssl.SSLHandshakeException #29

Open
R2kip opened this issue Mar 26, 2024 · 5 comments
Open

javax.net.ssl.SSLHandshakeException #29

R2kip opened this issue Mar 26, 2024 · 5 comments

Comments

@R2kip
Copy link

R2kip commented Mar 26, 2024

[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.Alerts.getSSLException(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.Handshaker.processLoop(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.Handshaker.process_record(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at java.security.AccessController.doPrivileged(Native Method)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at java.security.AccessController.doPrivileged(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at java.net.URL.openStream(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at io.github.quantizr.dungeonrooms.DungeonRooms.lambda$onServerConnect$8(DungeonRooms.java:236)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at io.github.quantizr.dungeonrooms.DungeonRooms$$Lambda$624/1113911512.run(Unknown Source)
[12:32:48] [Thread-45/INFO] [STDERR]: [io.github.quantizr.dungeonrooms.DungeonRooms:lambda$onServerConnect$8:247]: 	at java.lang.Thread.run(Unknown Source)
@R2kip
Copy link
Author

R2kip commented Mar 26, 2024

@KoutaChan
Copy link
Contributor

I think motd can be removed because it is no longer used. Anyway this message can be ignored

@Quantizr
Copy link
Owner

Quantizr commented Mar 26, 2024

I had to fix this 3 years ago for something else I was working on... I specifically chose to use gists for this since it didn't have that problem but RIP.

The problem with the fix there and in your link is it disables certificate checking altogether... which isn't a great practice for security but the alternative seems to be manually doing certificate checking on the gist, and the current certificate expires in a year.

On the other hand, the worst a MIM attacker could do is change the MOTD which is displayed, so perhaps to avoid the error...

@Quantizr
Copy link
Owner

I think motd can be removed because it is no longer used. Anyway this message can be ignored

The point of the MOTD was so I could occasionally display messages if I wanted (since gists are editable, the current blank MOTD can be changed). I've used it to tell users about new updates or giveaways before.

@Quantizr
Copy link
Owner

The problem is Minecraft, by default, launches 1.8.9 on Java 8u51, which is a version of Java released in 2015 (and contains many security vulnerabilities).
I just tested this and the problem described in this issue does not exist when launching Minecraft with a newer version of Java since the new certificates (and patches to all other vulnerabilities) are in newer Java versions.

The real solution here is for everyone playing to manually download the latest version of Java 8 and set their Minecraft instance's Java version to that. However, given the average SkyBlock player's familiarity with computers, this is unlikely to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants