added cert to snakes

This commit is contained in:
Sewmina 2025-05-27 10:40:52 +05:30
parent ac8b0f09ba
commit acd70f0a49
3 changed files with 20 additions and 0 deletions

4
snakes/cert.json Normal file
View File

@ -0,0 +1,4 @@
{
"path":"./cert.pfx",
"password": ""
}

BIN
snakes/cert.pfx Normal file

Binary file not shown.

16
snakes/pfxTest.js Normal file
View File

@ -0,0 +1,16 @@
const https = require('https');
const fs = require('fs');
const port = 8000;
console.log("Listening on " + port);
const options = {
pfx: fs.readFileSync('cert.pfx')
};
https.createServer(options, (req, res) => {
console.log("Request from " + (req.socket ? req.socket.remoteAddress : "NULL"));
res.writeHead(200);
res.end('hello world\n');
}).listen(port);