-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use rustls instead of system openssl to make compilation easier #43
Conversation
Note that this change also comes with performance implications (both speedups and slowdowns): https://github.com/aochagavia/rustls-bench-results |
Hey, Im not fimilar with nixOS. Why OpenSSL is a pain to install and rusttls is easier?. I also sometimes develop pumpkin on Windows and it compiles there without any problems |
That's not how NixOS actually works but just imagine that every installed application is a container. There aren't any globally installed libraries and you basically need to package everything that uses system dependencies. If a project uses 100% rust libraries this procedure can be avoided. Openssl is currently the only system library we're using atm (apart from libc). |
Ah okay i understand. So what are the disatvantages are when using rusttls?. Does it may break something? |
Here's a discussion about making it the upstream reqwests default seanmonstar/reqwest#2025
(re-worded for clarity) It shouldn't break anything if Mojang doesn't depend on using only deprecated TLS 1.1. In my test it worked fine. |
Okay, I just got home and looked at rustls. I like the idea of having a modern TLS library written in rust instead of relying on System C Libaries. But like this comment https://users.rust-lang.org/t/any-reasons-to-prefer-native-tls-over-rustls/37626/2 mentioned it, there will may be security vulnerabilities that can't be patched via a dependency update. Sure we can update the library a vulnerability is found. But there may be users who rely on an older version of Pumpkin |
I don't think rustls vulnerabilities should be a concern, we aren't even transmitting anything sensitive over HTTPS (afaik)! |
This is useful for some situations, like being able to use an empty docker base image for running the server, but this is also something that should not be enabled by default (due to the security point mentioned by @Snowiiii). Maybe using a feature flag to enable this would be better? |
Ok, I'll make it a feature for now but consider that there's talk about making this the upstream default anyways, so I really don't think that security should be a concern here (a minecraft server) when banking clients might use the reqwests library with rustls (as a default) in the future. Also looking at the list of recent openssl vulnerabilities most of them would not be possible with rusts safety measures. |
Actually making it a feature doesn't really work out. I need to remove the |
Do we have to use the new http2 feature ? @DaniD3v |
|
Looks like |
Thank you @DaniD3v 👍 |
On nixOS installing pkg-config and the system
openssl
is a bit of a pain so why don't we userustls
instead?I imagine compiling for Windows isn't fun either but not too sure how their system crypto library works.