Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!