yushijinhun / authlib-injector

Build your own Minecraft authentication system.
https://authlib-injector.yushi.moe
GNU Affero General Public License v3.0
744 stars 67 forks source link

Added option for overload SSL rules #117

Closed Shark-vil closed 3 years ago

Shark-vil commented 3 years ago

A similar problem

开启了SSL然后无法打开 - https://github.com/yushijinhun/authlib-injector/issues/111


Description of changes

I had problems using the API for my server. Java refused to accept Let's Encrypt certificates. To do this, I added an option to override certificate validation rules.

To enable the option in the launch parameters, you need to add:

-Dauthlibinjector.trustUnknownSSLCertificates

or

-Dauthlibinjector.trustUnknownSSLCertificatesOptional

The user will receive a warning that this method is not reliable and not recommended, however, this will fix the problem with the inability to send requests to the server.

Shark-vil commented 3 years ago

It is noteworthy that the problem is observed exclusively on the client (player) side. The server starts and runs without changing the certificate validation rules.

Shark-vil commented 3 years ago

Added the ability to change rules only if an error occurs. Thought about it after my post above. I don't know why the client cannot connect to the site, unlike the game server, which connects smoothly.

yushijinhun commented 3 years ago

I don't think this problem has anything to do with authlib-injector. Instead, it signals that your authentication server is misconfigured, or the client Java installation is outdated or broken. So, this PR will not be merged.

If you encounter a TLS certificate problem:

  1. Ensure your server is providing a valid certificate, and the certificate chain is complete.
  2. If the client is using Java 8, the Java version should be at least 8u101. (see Let's Encrypt Certificate Compatibility)
  3. If the problem still exists and occurs on a particular machine only, maybe the Java installation is broken, or someone is trying to hijack TLS traffic.