From 96f97f245e2891983f027f94e0f21fc3c2fce913 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Tue, 13 Aug 2024 13:35:36 +0200 Subject: [PATCH] =?UTF-8?q?SNCB:=20remove=20hard-coded=20SSL=20CA=20certif?= =?UTF-8?q?icate=20chain=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- p/sncb/index.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/p/sncb/index.js b/p/sncb/index.js index 1756f538..3980a54e 100644 --- a/p/sncb/index.js +++ b/p/sncb/index.js @@ -11,13 +11,6 @@ import {parseLine} from '../../parse/line.js'; const baseProfile = require('./base.json'); import {products} from './products.js'; -// `www.belgianrail.be:443` doesn't provide the necessary CA certificate -// chain for Node.js to trust the certificate, so we manually add it. -// todo: fix this properly, e.g. by letting them know -const ca = readFileSync(new URL('./digicert-sha2-secure-server-ca.crt.pem', import.meta.url).pathname); -const agent = new Agent({ca}); -const transformReq = (ctx, req) => ({...req, agent}); - // todo: this is ugly const lineNameWithoutFahrtNr = ({parsed}) => { const {name, fahrtNr} = parsed; @@ -58,8 +51,6 @@ const profile = { locale: 'fr-BE', timezone: 'Europe/Brussels', - transformReq, - products, parseLine: parseHook(parseLine, lineNameWithoutFahrtNr),