Quando estou brincando com a imagem docker CentOS7 no MacBookPro M1, parece que ela nao se conecta aos servidores que requerem conexao HTTPS.

Por exemplo, quando executo o comando yum -y update, ele retorna curl: (77) Problem with the SSL CA cert (path? access rights?). Hmm, parece um Bug do SO porque meus ca-certificates estao ok.

Tentei enviar um comando GET via curl e parece que nao funciona.

$ curl -vvv https://google.com
* About to connect () to google.com port 443  ( # 0) 
* Trying 216.58.212.142 ...
* Connected to github.com (216.58.212.142) port 443 (#0)
* Initializing NSS with certpath: sql: / etc / pki / nssdb
* Closing connection 0 curl: ( 77 ) Problem with the SSL CA cert ( path? Access rights? )

wget tambem nao funciona com conexoes HTTPS e fiz uma pesquisa online e vi que e um bug real. Aqui estao os detalhes; https://bugs.centos.org/view.php?id=16282

A Solucao

$ touch "/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned"

Sim, e isso. Precisamos apenas deste arquivo para executar conexoes TCP com seguranca. Aqui estao os resultados apos a solucao.

$ curl -I https://google.com
HTTP/2 301
location: https://www.google.com/
content-type: text/html; charset=UTF-8
date: Tue, 08 Mar 2022 08:16:51 GMT
expires: Tue, 08 Mar 2022 08:16:51 GMT
cache-control: private, max-age=2592000
server: gws
content-length: 220
x-xss-protection: 0
x-frame-options: SAMEORIGIN
set-cookie: CONSENT=PENDING+370; expires=Thu, 07-Mar-2024 08:16:51 GMT; path=/; domain=.google.com; Secure
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"

Tambem e um misterio que isso seja reproduzido apenas na maquina M1 ate agora. Mas por enquanto, consegui identificar a causa, e tudo bem chegar ao objetivo, certo?