testing ssl stuff (doesnt do anything yet)

This commit is contained in:
zefie
2025-07-21 11:00:06 -04:00
parent 385849dab7
commit b67251abbb
5 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
class WTVSSL {
wtvshared = null;
constructor() {
const WTVShared = require("./WTVShared.js")['WTVShared'];
this.wtvshared = new WTVShared();
}
getCACert() {
// return the CA cert
const caCertFile = this.wtvshared.getServiceDep("https/ca.der")
if (!this.wtvshared.fs.existsSync(caCertFile)) {
throw new Error("CA certificate file not found");
}
return this.wtvshared.fs.readFileSync(caCertFile);
}
}
module.exports = WTVSSL;