MrLetsplay2003 / ShittyAuthLauncher

A Minecraft launcher for using a custom (shitty) authentication server
8 stars 2 forks source link

About the certificate error in #5 #6

Closed ajh123 closed 1 year ago

ajh123 commented 1 year ago

From #5:

Are you using a self-signed certificate which your OS doesn't trust? Maybe you've added an exception in other places

Actually, it's a Cloudflare origin server certificate. It is liked by web browsers and curl. Maybe Java cannot find Cloudflare's root certificate? I will do a bit of testing eventually. Maybe I'll also ask Cloudflare about it.

MrLetsplay2003 commented 1 year ago

That's strange. Cloudflare origin certificates are usually only used for communication between your server and Cloudflare and are thus often not trusted by default.

ajh123 commented 1 year ago

All my website's traffic is proxied through Cloudflare. So, the web browsers see Cloudflare's certificate they have on their proxy. Edit: Then the Cloudflare proxy confirms the origin server's certificate.

ajh123 commented 1 year ago

image image image

The web browsers are all hunky dory.

ajh123 commented 1 year ago

Here are the Cloudflare's SSL settings image

Since my origin server certificate is applied correctly, it must be something that Cloudflare has done with their certificate on their proxy.

ajh123 commented 1 year ago

image

Pinging my site would result with a Cloudflare IP address. Edit This would confirm that Cloudflare proxies the network traffic.

MrLetsplay2003 commented 1 year ago

If the browser trusts it, Java should usually trust it as well. There are ways to manually import root certificates (described here), but it's strange that your JRE/JDK would not trust Cloudflare by default.

Trying it on my end, everything appears to be fine and it doesn't throw any certificate errors when connecting (I'm running openjdk version "17.0.4.1" 2022-08-12)

ajh123 commented 1 year ago

All fixed now! It actually was my authentication servers still using the old URL for my site (which still has certificate problems). Incorrect certificates on my old URL caused the error when the profile data was read.