Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda