summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@sequoia-pgp.org>2021-10-30 12:13:37 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-10-30 12:14:39 +0300
commit46968d2789667365ae701bcb89a4bacfd0afa43d (patch)
tree26df4539a5cfd3be0aace1865a13cac6f8400540
parente7a4322c46be189766a6d74e640d2f75efa64277 (diff)
downloadsq-user-guide-46968d2789667365ae701bcb89a4bacfd0afa43d.tar.gz
consistently use --foo=bar for sq examples
This is clearer to the reader as it makes it obvious that bar is an argument to the option. Closes #7
-rw-r--r--sq-guide.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/sq-guide.md b/sq-guide.md
index a665607..3b41088 100644
--- a/sq-guide.md
+++ b/sq-guide.md
@@ -27,8 +27,8 @@ chapter distils the main content of this guide into examples showing
a small number of common use cases. No explanations.
```{.sh .numberLines}
-$ sq key generate --userid "My Name <me@example.com>" --export key.pgp
-$ sq key extract-cert --output cert.pgp key.pgp
+$ sq key generate --userid="My Name <me@example.com>" --export=key.pgp
+$ sq key extract-cert --output=cert.pgp key.pgp
$ ls -l
total 8
-rw-rw-r-- 1 liw liw 1772 Oct 15 16:18 cert.pgp
@@ -37,8 +37,8 @@ total 8
```
```{.sh .numberLines}
-$ sq sign --signer-key key.pgp -o foo.pgp foo.md
-$ sq sign --signer-key key.pgp --detached -o foo-sig.pgp foo.md
+$ sq sign --signer-key=key.pgp --output=foo.pgp foo.md
+$ sq sign --signer-key=key.pgp --detached --output=foo-sig.pgp foo.md
$ ls -l foo*
-rw-r--r-- 1 liw liw 1086 Oct 15 16:19 foo.md
-rw-rw-r-- 1 liw liw 1825 Oct 15 16:20 foo.pgp
@@ -46,10 +46,10 @@ $ ls -l foo*
```
```{.sh .numberLines}
-$ sq verify --signer-cert cert.pgp -o checked.md foo.pgp
+$ sq verify --signer-cert=cert.pgp --output=checked.md foo.pgp
Good signature from 84B292ABCE27285B
1 good signature.
-$ sq verify --signer-cert cert.pgp --detached foo-sig.pgp foo.md
+$ sq verify --signer-cert=cert.pgp --detached foo-sig.pgp foo.md
Good signature from 84B292ABCE27285B
1 good signature.
$ ls -l checked*
@@ -59,13 +59,13 @@ $ ls -l checked*
\newpage
```{.sh .numberLines}
-$ sq encrypt --recipient-cert key.pgp --signer-key key.pgp -o bar.pgp foo.md
+$ sq encrypt --recipient-cert=cert.pgp --signer-key=key.pgp --output=bar.pgp foo.md
$ ls -l bar.pgp
-rw-rw-r-- 1 liw liw 2076 Oct 15 16:26 bar.pgp
```
```{.sh .numberLines}
-$ sq decrypt --recipient-key key.pgp --signer-cert key.pgp -o decrypted.md bar.pgp
+$ sq decrypt --recipient-key=key.pgp --signer-cert=cert.pgp --output=decrypted.md bar.pgp
Encrypted using AES with 256-bit key
Compressed using ZIP
Good signature from 84B292ABCE27285B
@@ -491,7 +491,7 @@ expiring keys, or only expire subkeys.
To generate a key with `sq`:
```sh
-sq key generate --userid "My Name <me@example.com>" --export key.pgp
+sq key generate --userid="My Name <me@example.com>" --export=key.pgp
```
The _user id_ should usually have the form "`Name <email@address>`".
@@ -526,7 +526,7 @@ output for the option names.
Given a key, you can extract the certificate linked to it:
```
-sq key extract-cert --output cert.pgp key.pgp
+sq key extract-cert --output=cert.pgp key.pgp
```
The `cert.pgp` file is the certificate (choose whatever name you want
@@ -601,7 +601,7 @@ To sign a file with `sq`, you need your key (not the certificate). The
command to sign is:
```sh
-sq sign --signer-key key.pgp -o foo.pgp foo.md
+sq sign --signer-key=key.pgp --output=foo.pgp foo.md
```
This signs the file `foo.md`, and writes the signed file to `foo.pgp`.
@@ -618,7 +618,7 @@ want to prove your copy is identical.
To make a detached signature:
```
-sq sign --detached --signer-key key.pgp -o foo-sig.pgp foo.md
+sq sign --detached --signer-key=key.pgp --output=foo-sig.pgp foo.md
```
Note the `--detached` option. The signature, but none of the original
@@ -632,7 +632,7 @@ of the original data.
Verifying the signature of a signed file is done like this:
```
-sq verify --signer-cert cert.pgp -o checked.md foo.pgp
+sq verify --signer-cert=cert.pgp --output=checked.md foo.pgp
```
The output will say something like this:
@@ -663,7 +663,7 @@ be a little more verbose and give the names of both the data file and
the signature file:
```
-$ sq verify --detached --signer-cert cert.pgp foo-sig.pgp foo.md
+$ sq verify --detached --signer-cert=cert.pgp foo-sig.pgp foo.md
```
## Trusting a certificate
@@ -701,7 +701,7 @@ into that here.
To encrypt a file using `sq`:
```
-sq encrypt --recipient-cert cert.pgp --output bar.pgp foo.md
+sq encrypt --recipient-cert=cert.pgp --output=bar.pgp foo.md
```
This encrypts the file `foo.md`, using the certificate in `cert.pgp`,
@@ -715,19 +715,19 @@ The output file has a name different from the input file so that the
filename, which is not encrypted, does not reveal anything about the
contents to someone who happens to see it.
-You can optionally also sign the data by adding the `--signer-key
-key.pgp` option to the encryption command.
+You can optionally also sign the data by adding the
+`--signer-key=key.pgp` option to the encryption command.
## Decrypting a file
To decrypt an encrypted file:
```
-sq decrypt --recipient-key key.pgp --output decrypted.md bar.pgp
+sq decrypt --recipient-key=key.pgp --output=decrypted.md bar.pgp
```
The output is written to `decrypted.md`. If the encrypted data was
-also signed, and you add the `--signer-cert cert.pgp` option, the
+also signed, and you add the `--signer-cert=cert.pgp` option, the
decryption will check the signature. If the signature fails to match,
the data is not written into the output file to avoid anyone trusting
an unauthenticated message.