This commit is contained in:
seb
2026-06-21 09:09:06 +02:00
commit 965e581151
30 changed files with 6914 additions and 0 deletions

20
generate-cert.js Normal file
View File

@@ -0,0 +1,20 @@
const { execSync } = require('node:child_process');
const fs = require('node:fs');
const path = require('node:path');
const certsDir = path.join(__dirname, 'certs');
const keyPath = path.join(certsDir, 'key.pem');
const certPath = path.join(certsDir, 'cert.pem');
fs.mkdirSync(certsDir, { recursive: true });
const subject = '/CN=localhost/O=JTL Debug Server/C=DE';
const san = 'subjectAltName=DNS:localhost,IP:127.0.0.1,IP:0.0.0.0';
execSync(
`openssl req -x509 -newkey rsa:2048 -nodes -keyout "${keyPath}" -out "${certPath}" -days 3650 -subj "${subject}" -addext "${san}"`,
{ stdio: 'inherit' }
);
console.log(`Wrote ${keyPath}`);
console.log(`Wrote ${certPath}`);