Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
Node.js https GET request with custom CA chain

I'm trying to make simple GET request from my university schedule website. This is the URL https://planzajec.uek.krakow.pl/ and to be exact https://planzajec.uek.krakow.pl/index.php?typ=G&id=190201&okres=1&xml where i get XML of my schedule. So I tried to make simple request as below

const https = require('https');
const request = https.get('https://planzajec.uek.krakow.pl', (result) => {
    console.log(result.statusCode);
});

and got error: Error: write EPROTO 80C5F30601000000:error:0A000172:SSL routines:tls12_check_peer_sigalg:wrong signature type:../deps/openssl/openssl/ssl/t1_lib.c:1565:

Although when I try to make this request on https://www.google.com/ or even main page of my university https://uek.krakow.pl/ I got 200 OK, so there is something wrong with the schedule website. After few hours of digging I've found out that the chain of CA is broken there.

https://www.ssllabs.com/ssltest/analyze.html?d=planzajec.uek.krakow.pl

Chain issues: Incomplete

Now I'm trying to pass those CA certs in requests but for some reason it's still not working. (tried both consolidated in one .pem file and passing array of individual .pem files)

const https = require('https');
const consolidate_ca = fs.readFileSync('consolidate.pem');
const request = https.get('https://planzajec.uek.krakow.pl/', { ca:consolidate_ca } , (result) => {
    console.log(result.statusCode);
});

Out of curiosity I checked if it works in python.

import requests
r = requests.get('https://planzajec.uek.krakow.pl/', verify='consolidate.pem')
print(r.status_code)

And got 200 OK (without verify parameter I was getting similar error as in JS).

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As i have pointed out in the comments. This method is very insecure and there are probably better solutions present on the internet. You can set a env variable to disable ssl and tls completely

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
const https = require('https')
const request = https.get('https://planzajec.uek.krakow.pl/index.php?typ=G&id=190201&okres=1&xml ',async (result) => {
    console.log(result.statusCode);
});

enter image description here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda