Score:3

Upgrading command line tools to support TLS1.3 on Amazon Linux 2

tr flag

A server I need to communicate with only allows TLS1.3 traffic.

I have thus updated the version of OpenSSL bundled with Amazon Linux 2 to OpenSSL 1.1.1c. Following this guide

I am now able to use TLS 1.3 using OpenSSL e.g. openssl s_client -connect google.com:443 -tls1_3.

I need other command line tools such as cURL and Git to use this updated version of OpenSSL so they can communicate to the server using TLS 1.3 too. When I try to use cURL following the update I get the following

$ curl --tlsv1.3 "https://google.com"
curl: (4) OpenSSL was built without TLS 1.3 support

What is the best method of getting other tools such as cURL and Git to use the updated OpenSSL?

Alex avatar
in flag
Please see this https://stackoverflow.com/a/65986968 and this https://github.com/git/git/commit/d81b651f56060038a1547f4beb949122533a8165
Michael Hampton avatar
cz flag
Don't use Amazon Linux (2 or any other number). Use a stable, known quantity Linux distribution which already supports TLS 1.3 such as CentOS 8 or RHEL 8.
Score:1
in flag

I realize this is 4 months old, but to provide an answer to others who may be seeking the same solution:

You'll need to build a new version of curl that will support the new openssl version. I had to do the same for curl and wget. Bearing in mind that this is not the same version of curl that is used by PHP on Amazon Linux 2, so you can't expect that PHP apps like Wordpress using WP-Cron to be able to support TLSv1.3. Be aware that the example below was based on my needs, your versions and configuration options may vary, in addition to dependencies you may need to install:

wget https://curl.haxx.se/download/curl-7.80.0.tar.gz
gunzip -c curl-7.80.0.tar.gz | tar xvf -
cd curl-7.80.0
./configure --with-ssl --with-nghttp2 --with-ngtcp2 --with-{libssh,libssh2}
make
sudo make install

I believe a reboot is required to replace the existing curl/wget

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.