diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2022-12-17 21:31:41 +0100 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2022-12-17 21:31:41 +0100 |
commit | 1e588718a855ae2871a8841f6c6e621f49795454 (patch) | |
tree | 6599b3959554b307a571a73373114cb2d34a98ef /src/SSLCert | |
parent | 6c37c28d7044a813fcde9ef80bf8852529b8305f (diff) | |
download | Luxcena-Neo-1e588718a855ae2871a8841f6c6e621f49795454.tar.gz Luxcena-Neo-1e588718a855ae2871a8841f6c6e621f49795454.zip |
Start moving to esm, work on updater
Diffstat (limited to 'src/SSLCert')
-rw-r--r-- | src/SSLCert/index.cjs (renamed from src/SSLCert/index.js) | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/SSLCert/index.js b/src/SSLCert/index.cjs index d235c9b..05d9a32 100644 --- a/src/SSLCert/index.js +++ b/src/SSLCert/index.cjs @@ -7,9 +7,9 @@ * @author jakobst1n. * @since 14.16.2019 */ - let logger = require(__appdir + "/src/Logger"); - const fs = require("fs"); - const { execSync } = require("child_process"); +let logger = require("../Logger/index.cjs"); +const fs = require("fs"); +const { execSync } = require("child_process"); var neoModules; @@ -70,7 +70,7 @@ var neoModules; let res = openssl( `genrsa ` + `-out "${certPath}/root-CA.key.pem" ` + - `2048` + `4096` ); // Self sign the Root Certificate Autority @@ -82,6 +82,7 @@ var neoModules; `-key "${certPath}/root-CA.key.pem" ` + `-days 1024 ` + `-out "${certPath}/root-CA.crt.pem" ` + + `-sha256 ` + `-subj "/C=NO/ST=Oslo/L=Oslo/O=Luxcena Neo Self-Signing Authority/CN=${config.CN}"` ); @@ -91,7 +92,7 @@ var neoModules; res = openssl( `genrsa ` + `-out "${certPath}/privkey.pem" ` + - `2048` + `4096` ); // Create a request from your Device, which your Root CA will sign @@ -113,6 +114,7 @@ var neoModules; `-CAkey "${certPath}/root-CA.key.pem" ` + `-CAcreateserial ` + `-out "${certPath}/cert.pem" ` + + `-sha256 ` + `-days 500` ); |