Commit a61b5a66 authored by gabi-250's avatar gabi-250 🤸
Browse files

doc/keys.md: Un-ignore some of the example snippets

This un-ignores some of the output snippets from the `doc/keys.md` file,
so that our `trycmd` test runner will actually run them. This will force
us to keep the snippet in sync with the code.

This involved adding some extra config for the test C Tor keystore,
and tweaking the output to match what the commands actually print out.
parent c7c9a231
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
allow_running_as_root = true

[storage]
state_dir = "./local"
state_dir = "./local/state-dir"

[storage.permissions]
dangerously_trust_everyone = true
+15 −0
Original line number Diff line number Diff line
[application]
allow_running_as_root = true

[storage]
state_dir = "./local/state-dir"

[storage.permissions]
dangerously_trust_everyone = true

[logging]
console = "warn"

[storage.keystore.ctor.services."allium-cepa"]
path = "./local/ctor-keystore"
id = "ctor"
+32 −24
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ Example usage:
<details>
<summary>With `--keystore-id`:</summary>

```ignore
$ arti -c keys.toml keys list --keystore-id arti
```
$ arti -c with-ctor.toml keys list --keystore-id arti
Role: ks_hsc_desc_enc
Summary: Descriptor decryption key
KeystoreItemType: X25519StaticKeypair
@@ -73,18 +73,20 @@ Extra info:
Broken entries

Location: hss/allium-cepa/unrecognized-entry
Error: Malformed path, no extension: hss/allium-cepa/unrecognized-entry
Error: Key has invalid path: hss/allium-cepa/unrecognized-entry

Location: unrecognized-path-dir/ks_hs_id.ed25519_expanded_private
Error: Unrecognized


```
</details>

<details>
<summary>Default behavior</summary>

```ignore
$ arti -c keys.toml keys list
```
$ arti -c with-ctor.toml keys list
Keystore ID: arti
Role: ks_hsc_desc_enc
Summary: Descriptor decryption key
@@ -101,14 +103,6 @@ Location: hss/allium-cepa/ks_hs_id.ed25519_expanded_private
Extra info:
- nickname: allium-cepa

Keystore ID: ctor
Role: ks_hs_id
Summary: Long-term identity keypair
KeystoreItemType: Ed25519ExpandedKeypair
Location: hs_ed25519_secret_key
Extra info:
- nickname: allium-cepa

Keystore ID: ctor
Role: kp_hs_id
Summary: Public part of the identity key
@@ -117,43 +111,57 @@ Location: hs_ed25519_public_key
Extra info:
- nickname: allium-cepa

Keystore ID: ctor
Role: ks_hs_id
Summary: Long-term identity keypair
KeystoreItemType: Ed25519ExpandedKeypair
Location: hs_ed25519_secret_key
Extra info:
- nickname: allium-cepa


Broken entries

Keystore ID: arti
Location: hss/allium-cepa/unrecognized-entry
Error: Malformed path, no extension: hss/allium-cepa/unrecognized-entry
Keystore ID: ctor
Location: hostname
Error: Key hostname is malformed

Keystore ID: ctor
Location: hs_unrecognized_entry
Error: Key hs_unrecognized_entry is malformed

Keystore ID: ctor
Location: hostname
Error: Key hostname is malformed
Keystore ID: arti
Location: hss/allium-cepa/unrecognized-entry
Error: Key has invalid path: hss/allium-cepa/unrecognized-entry

Keystore ID: *not available*
Location: unrecognized-path-dir/ks_hs_id.ed25519_expanded_private
Error: Unrecognized


```
</details>

<details>
<summary>Compact output</summary>

```ignore
$ arti -c keys.toml keys list --compact
```
$ arti -c with-ctor.toml keys list --compact
client/mnyizjj7m3hpcr7i5afph3zt7maa65johyu2ruis6z7cmnjmaj3h6tad/ks_hsc_desc_enc.x25519_private
hss/allium-cepa/ks_hs_id.ed25519_expanded_private
hs_ed25519_secret_key
hs_ed25519_public_key
hs_ed25519_secret_key

Broken entries

hss/allium-cepa/unrecognized-entry
hs_unrecognized_entry
hostname

hs_unrecognized_entry

hss/allium-cepa/unrecognized-entry

unrecognized-path-dir/ks_hs_id.ed25519_expanded_private

```
</details>