"No protocols available" on Ubuntu 20.04 #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I received the above error message using LuaIRC with the Minetest IRC mod. Because I am only able to configure
secure
as a booleantrue
and not with a table specifyingprotocol
I have come up with this small change to LuaIRC which I think benefits many users and leaves no users disadvantaged.tlsv1
andtlsv1_1
are insecure, deprecated and no longer available on Ubuntu as of 20.04 so hardcodingtlsv1
as a default is a bad idea. This pull request fixes the problem by not specifying the protocol version. LuaIRC will now use the highest TLS version available. Usingprotocol = "any"
is also used in the client example for Luasec at https://github.com/brunoos/luasec/wiki . Luasec itself changed from "tlsv1" to "any" in version 0.6 as the default for https connections.To diagnose the problem, I used openssl to check what protocols were available. TLSv1 and TLSv1.1 worked on MacOS 10.14 but not on Ubuntu 20.04 as can be seen by the failure of these commands on Ubuntu.
TLSv1.2 and TLSv1.3 worked on both MacOS 10.14 and Ubuntu 20.04 as can be seen by the success of these commands.
Deprecating TLSv1 and TLSv1.1 is recommended by this IETF RFC https://datatracker.ietf.org/doc/draft-ietf-tls-oldversions-deprecate/ . The RFC also recommends that clients specify their highest supported protocol.