Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support learn mode #7135

Merged
merged 23 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
82061db
feat: support learn mode
AlCalzone Aug 29, 2024
c231cbc
fix: stop, callback
AlCalzone Aug 30, 2024
102d3d0
fix: handle SUD ID changes
AlCalzone Aug 30, 2024
54f2065
fix: handle ZWavePlus query after being included
AlCalzone Aug 30, 2024
941117d
fix: update controller info after joining network
AlCalzone Aug 30, 2024
4183751
fix: only assume primary if also SUC, switch network caches
AlCalzone Aug 30, 2024
da8a342
fix: query protocol information in secondary mode
AlCalzone Aug 30, 2024
ee8a3a0
feat: support getting S2 bootstrapped
AlCalzone Sep 3, 2024
c4c98de
feat: cache and restore keys on startup
AlCalzone Sep 3, 2024
d0cc28c
test: add duplex mode debugging configuration
AlCalzone Sep 3, 2024
5f5ab77
fix: handling of controller flags
AlCalzone Sep 4, 2024
2edcb6b
fix: use correct key pair for learn mode, persist private key
AlCalzone Sep 5, 2024
dc104ad
fix: authenticated bootstrapping
AlCalzone Sep 6, 2024
4e99ab1
feat: support S0 bootstrapping
AlCalzone Sep 6, 2024
851d797
fix: remove other join strategies for now
AlCalzone Sep 6, 2024
96ef717
test: update script to test learn mode
AlCalzone Sep 6, 2024
58624d9
feat: expose DSK using application callbacks
AlCalzone Sep 6, 2024
e54a1e1
fix: set controller flags during testing
AlCalzone Sep 6, 2024
6c8cb6e
test: pass PIN between drivers internally
AlCalzone Sep 6, 2024
ef831da
refactor: add Default join strategy, temporarily remove S2 strategy
AlCalzone Sep 6, 2024
c062fbf
feat: getDSK method
AlCalzone Sep 6, 2024
c66bf5f
docs: docs
AlCalzone Sep 6, 2024
1be7734
refactor: make key pair generation and reading DSK sync
AlCalzone Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@
"sourceMaps": true
// "preLaunchTask": "npm: build"
},
{
"type": "node",
"request": "launch",
"name": "Debug primary and secondary",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"node",
"--async-stack-traces",
"-r",
"./maintenance/esbuild-register.js",
"--conditions=@@dev",
"${workspaceFolder}/test/run_duplex.ts"
],
"env": {
"NODE_ENV": "development"
// "NO_CACHE": "true"
// "LOGLEVEL": "info"
},
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
"sourceMaps": true
// "preLaunchTask": "npm: build"
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/CCs/FirmwareUpdateMetaData.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async reportMetaData(
```ts
async requestUpdate(
options: FirmwareUpdateMetaDataCCRequestGetOptions,
): Promise<FirmwareUpdateRequestStatus>;
): Promise<FirmwareUpdateInitResult>;
```

Requests the device to start the firmware update process.
Expand Down
12 changes: 12 additions & 0 deletions docs/api/CCs/Security.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ The return value indicates whether a nonce was successfully sent.
async getSecurityScheme(): Promise<[0]>;
```

### `reportSecurityScheme`

```ts
async reportSecurityScheme(encapsulated: boolean): Promise<void>;
```

### `inheritSecurityScheme`

```ts
Expand All @@ -48,6 +54,12 @@ async inheritSecurityScheme(): Promise<void>;
async setNetworkKey(networkKey: Buffer): Promise<void>;
```

### `verifyNetworkKey`

```ts
async verifyNetworkKey(): Promise<void>;
```

### `getSupportedCommands`

```ts
Expand Down
51 changes: 47 additions & 4 deletions docs/api/CCs/Security2.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ async reportSupportedCommands(
async getKeyExchangeParameters(): Promise<Pick<Security2CCKEXReport, "requestCSA" | "echo" | "supportedKEXSchemes" | "supportedECDHProfiles" | "requestedKeys" | "_reserved"> | undefined>;
```

### `requestKeys`

```ts
async requestKeys(
params: Omit<Security2CCKEXReportOptions, "echo">,
): Promise<void>;
```

Requests the given keys from an including node.

### `grantKeys`

```ts
Expand All @@ -73,15 +83,25 @@ async grantKeys(

Grants the joining node the given keys.

### `confirmGrantedKeys`
### `confirmRequestedKeys`

```ts
async confirmGrantedKeys(
async confirmRequestedKeys(
params: Omit<Security2CCKEXReportOptions, "echo">,
): Promise<void>;
```

Confirms the keys that were granted to a node.
Confirms the keys that were requested by a node.

### `confirmGrantedKeys`

```ts
async confirmGrantedKeys(
params: Omit<Security2CCKEXSetOptions, "echo">,
): Promise<Security2CCKEXReport | Security2CCKEXFail | undefined>;
```

Confirms the keys that were granted by the including node.

### `abortKeyExchange`

Expand All @@ -94,7 +114,18 @@ Notifies the other node that the ongoing key exchange was aborted.
### `sendPublicKey`

```ts
async sendPublicKey(publicKey: Buffer): Promise<void>;
async sendPublicKey(
publicKey: Buffer,
includingNode: boolean = true,
): Promise<void>;
```

### `requestNetworkKey`

```ts
async requestNetworkKey(
securityClass: SecurityClass,
): Promise<void>;
```

### `sendNetworkKey`
Expand All @@ -106,8 +137,20 @@ async sendNetworkKey(
): Promise<void>;
```

### `verifyNetworkKey`

```ts
async verifyNetworkKey(): Promise<void>;
```

### `confirmKeyVerification`

```ts
async confirmKeyVerification(): Promise<void>;
```

### `endKeyExchange`

```ts
async endKeyExchange(): Promise<void>;
```
Loading
Loading