Skip to content
Snippets Groups Projects
Commit 0b454016 authored by timothycarambat's avatar timothycarambat
Browse files

patch comkey path to fallback

parent 718062d0
No related branches found
No related tags found
No related merge requests found
const crypto = require("crypto"); const crypto = require("crypto");
const fs = require("fs"); const fs = require("fs");
const path = require("path"); const path = require("path");
const keyPath = const keyPath =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? path.resolve(__dirname, `../../../server/storage/comkey`) ? path.resolve(__dirname, `../../../server/storage/comkey`)
: path.resolve(process.env.STORAGE_DIR, `comkey`); : path.resolve(
process.env.STORAGE_DIR ??
path.resolve(__dirname, `../../../server/storage`),
`comkey`
);
class CommunicationKey { class CommunicationKey {
#pubKeyName = "ipc-pub.pem"; #pubKeyName = "ipc-pub.pem";
......
...@@ -4,7 +4,10 @@ const path = require("path"); ...@@ -4,7 +4,10 @@ const path = require("path");
const keyPath = const keyPath =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? path.resolve(__dirname, `../../storage/comkey`) ? path.resolve(__dirname, `../../storage/comkey`)
: path.resolve(process.env.STORAGE_DIR, `comkey`); : path.resolve(
process.env.STORAGE_DIR ?? path.resolve(__dirname, `../../storage`),
`comkey`
);
// What does this class do? // What does this class do?
// This class generates a hashed version of some text (typically a JSON payload) using a rolling RSA key // This class generates a hashed version of some text (typically a JSON payload) using a rolling RSA key
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment