Skip to content
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

Site de origem apresenta inconsistência na negociação SSL. #2

Open
carlosromel opened this issue Jun 2, 2023 · 2 comments
Open

Comments

@carlosromel
Copy link

Prezados,

Tanto o curl quanto o get não conseguem mais baixar o arquivo original.
Motivo: erro na negociação do protocolo.

curl

curl --location https://servicodados.ibge.gov.br/api/v2/cnae/subclasses
curl: (35) error:0A000152:SSL routines::unsafe legacy renegotiation disabled

wget

2023-06-02 09:22:37--  https://servicodados.ibge.gov.br/api/v2/cnae/subclasses
Resolvendo servicodados.ibge.gov.br (servicodados.ibge.gov.br)... 170.84.40.25
Conectando-se a servicodados.ibge.gov.br (servicodados.ibge.gov.br)|170.84.40.25|:443... conectado.
OpenSSL: error:0A000152:SSL routines::unsafe legacy renegotiation disabled
Não foi possível estabelecer conexão segura (SSL).

A solução que encontrei, depois de baixar o arquivo normalmente (o Firefox reclama mas carrega o arquivo [33MB]) foi alterar o protocolo de comunicação de https para http.

@endersonmaia
Copy link
Owner

endersonmaia commented Jun 5, 2023

Usar HTTP ou usar legacy unsafe não me parecem solucões ideais, já que compromete a seguranca.

Idealmente, os servidores do IBGE deveriam ser atualizado para suportar versões mais recentes de TLS.

❯ curl --location -I https://servicodados.ibge.gov.br/api/v2/cnae/subclasses -v
*   Trying 170.84.40.25:443...
* Connected to servicodados.ibge.gov.br (170.84.40.25) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (OUT), TLS header, Unknown (21):
* TLSv1.2 (OUT), TLS alert, handshake failure (552):
* error:0A000152:SSL routines::unsafe legacy renegotiation disabled
* Closing connection 0
curl: (35) error:0A000152:SSL routines::unsafe legacy renegotiation disabled

@endersonmaia
Copy link
Owner

Referência: curl/curl#8943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants