signalk-ssl 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,7 @@ export declare const defaultTargets: (configPath: string) => InstallTargets;
|
|
|
8
8
|
* Atomically install the leaf certificate, key, and chain into the paths
|
|
9
9
|
* signalk-server reads at boot (`${configPath}/ssl-cert.pem`,
|
|
10
10
|
* `ssl-key.pem`, `ssl-chain.pem`). signalk-server enforces strict perms on
|
|
11
|
-
*
|
|
11
|
+
* both files (refuses to start if either is group/world-readable; see
|
|
12
|
+
* `hasStrictPermissions` in signalk-server's `src/security.ts`).
|
|
12
13
|
*/
|
|
13
14
|
export declare const installCerts: (targets: InstallTargets, leafPem: string, leafKeyPem: string, caPem: string) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { chmod, mkdir, rename, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
const PEM_KEY_MODE = 0o600;
|
|
4
|
-
const PEM_CERT_MODE =
|
|
4
|
+
const PEM_CERT_MODE = 0o600;
|
|
5
5
|
export const defaultTargets = (configPath) => ({
|
|
6
6
|
certPath: join(configPath, 'ssl-cert.pem'),
|
|
7
7
|
keyPath: join(configPath, 'ssl-key.pem'),
|
|
@@ -19,7 +19,8 @@ const atomicWrite = async (path, data, mode, pid = process.pid) => {
|
|
|
19
19
|
* Atomically install the leaf certificate, key, and chain into the paths
|
|
20
20
|
* signalk-server reads at boot (`${configPath}/ssl-cert.pem`,
|
|
21
21
|
* `ssl-key.pem`, `ssl-chain.pem`). signalk-server enforces strict perms on
|
|
22
|
-
*
|
|
22
|
+
* both files (refuses to start if either is group/world-readable; see
|
|
23
|
+
* `hasStrictPermissions` in signalk-server's `src/security.ts`).
|
|
23
24
|
*/
|
|
24
25
|
export const installCerts = async (targets, leafPem, leafKeyPem, caPem) => {
|
|
25
26
|
// mkdir every distinct parent directory. defaultTargets() puts all three
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signalk-ssl",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "SSL/TLS certificate management plugin for SignalK Node Server — generate a local CA, issue server certs, distribute the root via QR to phones/tablets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin/index.js",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"signalk-plugin-enabled-by-default": false,
|
|
47
47
|
"signalk": {
|
|
48
48
|
"displayName": "SignalK SSL",
|
|
49
|
+
"appIcon": "./app-icon.svg",
|
|
49
50
|
"appstore": {
|
|
50
51
|
"displayName": "SignalK SSL",
|
|
51
52
|
"categories": [
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" role="img" aria-label="signalk-ssl">
|
|
2
|
+
<title>signalk-ssl</title>
|
|
3
|
+
<!-- Background: rounded square in SignalK blue -->
|
|
4
|
+
<rect x="0" y="0" width="256" height="256" rx="44" ry="44" fill="#003399"/>
|
|
5
|
+
|
|
6
|
+
<!-- Concentric broadcasting arcs above the lock: the "signal" in SignalK -->
|
|
7
|
+
<g fill="none" stroke="#FFCC00" stroke-linecap="round">
|
|
8
|
+
<path d="M 88 80 A 40 40 0 0 1 168 80" stroke-width="6"/>
|
|
9
|
+
<path d="M 74 78 A 54 54 0 0 1 182 78" stroke-width="6" opacity="0.7"/>
|
|
10
|
+
<path d="M 60 76 A 68 68 0 0 1 196 76" stroke-width="6" opacity="0.45"/>
|
|
11
|
+
</g>
|
|
12
|
+
|
|
13
|
+
<!-- Padlock shackle: rounded inverted-U, drawn after the arcs so it sits on top -->
|
|
14
|
+
<path d="M 96 130 V 102 a 32 32 0 0 1 64 0 V 130" fill="none" stroke="#FFFFFF" stroke-width="14" stroke-linecap="round"/>
|
|
15
|
+
|
|
16
|
+
<!-- Padlock body: rounded rectangle -->
|
|
17
|
+
<rect x="64" y="126" width="128" height="100" rx="14" ry="14" fill="#FFFFFF"/>
|
|
18
|
+
|
|
19
|
+
<!-- Keyhole: circle + tapered stem in SignalK blue, evokes a classic lock -->
|
|
20
|
+
<circle cx="128" cy="166" r="14" fill="#003399"/>
|
|
21
|
+
<path d="M 122 174 L 118 206 H 138 L 134 174 Z" fill="#003399"/>
|
|
22
|
+
</svg>
|