Skip to main content

Module command

Module command 

Source
Expand description

The device’s side of commands to a machine (#88): see teter_common::command. Split in steps so a caller (or a test) can hold a challenge, a sealed command and the channel apart.

Structs§

Challenge
A challenge the machine signed.
Channel
A command channel to one machine, joined on its relay session.

Constants§

ANSWER_TIMEOUT
How long the device waits for each answer of the machine: past what a command that ends a session may take on the machine (reaching its socket, then waiting for its process to go: 35 s), with room for the relay.

Functions§

check_challenge
The challenge nonce and key, if signature is machine machine’s (whose public key is machine_key) of them.
open_reply
The outcome in machine machine’s reply to the command bound to nonce: checked against its signature by machine_key, and opened with account.
seal_command
command signed by account for machine and challenge, sealed to the challenge’s one-time key.