Fix the subplot tests.

This commit is contained in:
Justus Winter 2024-08-15 14:38:42 +02:00
parent c94fb2249d
commit bd69e399e5
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -140,7 +140,7 @@ care of that. Here we merely verify that the new key looks OK.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output key.pgp
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Expiration time: 20" then stdout contains "Expiration time: 20"
@ -157,7 +157,7 @@ any user identifiers._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
then file key.pgp contains "-----BEGIN PGP PRIVATE KEY BLOCK-----" then file key.pgp contains "-----BEGIN PGP PRIVATE KEY BLOCK-----"
~~~ ~~~
@ -169,7 +169,7 @@ more than one user identifier._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --userid '<alice@example.com>' --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --userid '<alice@example.com>' --output key.pgp
then file key.pgp contains "Comment: Alice" then file key.pgp contains "Comment: Alice"
then file key.pgp contains "Comment: <alice@example.com>" then file key.pgp contains "Comment: <alice@example.com>"
~~~ ~~~
@ -184,7 +184,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-sign --cannot-authenticate --cannot-encrypt when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-sign --cannot-authenticate --cannot-encrypt
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout doesn't contain "Key flags: signing" then stdout doesn't contain "Key flags: signing"
@ -201,7 +201,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-sign --cannot-authenticate when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-sign --cannot-authenticate
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout doesn't contain "Key flags: signing" then stdout doesn't contain "Key flags: signing"
@ -216,7 +216,7 @@ for at-rest (storage) encryption._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --can-encrypt=storage when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --can-encrypt=storage
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout doesn't contain "transport encryption" then stdout doesn't contain "transport encryption"
@ -230,7 +230,7 @@ for transport encryption._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --can-encrypt=transport when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --can-encrypt=transport
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: transport encryption" then stdout contains "Key flags: transport encryption"
@ -244,7 +244,7 @@ for signing, and can't be used for encryption._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-encrypt --cannot-authenticate when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-encrypt --cannot-authenticate
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: signing" then stdout contains "Key flags: signing"
@ -262,7 +262,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --can-authenticate --cannot-sign --cannot-encrypt when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --can-authenticate --cannot-sign --cannot-encrypt
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: authentication" then stdout contains "Key flags: authentication"
@ -280,7 +280,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-sign when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-sign
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: authentication" then stdout contains "Key flags: authentication"
@ -298,7 +298,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-authenticate when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-authenticate
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: transport encryption, data-at-rest encryption" then stdout contains "Key flags: transport encryption, data-at-rest encryption"
@ -316,7 +316,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cannot-encrypt when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cannot-encrypt
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout doesn't contain "Key flags: transport encryption, data-at-rest encryption" then stdout doesn't contain "Key flags: transport encryption, data-at-rest encryption"
@ -335,7 +335,7 @@ Note that `sq` always creates a key usable for certification.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Key flags: certification" then stdout contains "Key flags: certification"
then stdout contains "Key flags: authentication" then stdout contains "Key flags: authentication"
@ -354,7 +354,7 @@ the default ever changes.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cipher-suite=cv25519 when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cipher-suite=cv25519
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Public-key algo: EdDSA" then stdout contains "Public-key algo: EdDSA"
then stdout contains "Public-key size: 256 bits" then stdout contains "Public-key size: 256 bits"
@ -366,7 +366,7 @@ _Requirement: We must be able to generate a 3072-bit RSA key._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cipher-suite=rsa3k when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cipher-suite=rsa3k
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Public-key algo: RSA" then stdout contains "Public-key algo: RSA"
then stdout contains "Public-key size: 3072 bits" then stdout contains "Public-key size: 3072 bits"
@ -378,7 +378,7 @@ _Requirement: We must be able to generate a 4096-bit RSA key._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --cipher-suite=rsa4k when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --cipher-suite=rsa4k
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Public-key algo: RSA" then stdout contains "Public-key algo: RSA"
then stdout contains "Public-key size: 4096 bits" then stdout contains "Public-key size: 4096 bits"
@ -396,10 +396,10 @@ cases.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
then file key.pgp.rev contains "Comment: Revocation certificate for" then file key.pgp.rev contains "Comment: Revocation certificate for"
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key2.pgp --rev-cert rev.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key2.pgp --rev-cert rev.pgp
then file rev.pgp contains "Comment: Revocation certificate for" then file rev.pgp contains "Comment: Revocation certificate for"
~~~ ~~~
@ -411,7 +411,7 @@ We generate a key with defaults, and check the key expires.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Expiration time: 20" then stdout contains "Expiration time: 20"
~~~ ~~~
@ -430,7 +430,7 @@ inspect output is the last second of validity.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --expiry=2038-01-19T03:14:07+00:00 when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --expiration=2038-01-19T03:14:07+00:00
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Expiration time: 2038-01-19 03:14" then stdout contains "Expiration time: 2038-01-19 03:14"
when I run sq --no-cert-store --no-key-store inspect --time 2038-01-20T00:00:00+00:00 key.pgp when I run sq --no-cert-store --no-key-store inspect --time 2038-01-20T00:00:00+00:00 key.pgp
@ -444,7 +444,7 @@ given time._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp --expiry=1y when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp --expiration=1y
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Expiration time: 20" then stdout contains "Expiration time: 20"
~~~ ~~~
@ -456,7 +456,7 @@ password._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store inspect key.pgp when I run sq --no-cert-store --no-key-store inspect key.pgp
then stdout contains "Secret key: Unencrypted" then stdout contains "Secret key: Unencrypted"
~~~ ~~~
@ -484,8 +484,8 @@ _Requirement: We must be able to generate a key and add User IDs to it._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store key userid add key.pgp "Juliet" "<juliet@example.org>" --output new.pgp when I run sq --no-cert-store --no-key-store key userid add --cert-file key.pgp --name Juliet --email juliet@example.org --output new.pgp
when I run sq --no-cert-store --no-key-store inspect new.pgp when I run sq --no-cert-store --no-key-store inspect new.pgp
then stdout contains "UserID: Juliet" then stdout contains "UserID: Juliet"
then stdout contains "UserID: <juliet@example.org>" then stdout contains "UserID: <juliet@example.org>"
@ -497,8 +497,8 @@ _Requirement: We must be able to generate a key with a User ID, and then strip t
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid "<juliet@example.org>" --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid "<juliet@example.org>" --output key.pgp
when I run sq --no-cert-store --no-key-store key userid strip --userid "<juliet@example.org>" --output new.pgp key.pgp when I run sq --no-cert-store --no-key-store key userid strip --cert-file key.pgp --userid "<juliet@example.org>" --output new.pgp
when I run sq --no-cert-store --no-key-store inspect new.pgp when I run sq --no-cert-store --no-key-store inspect new.pgp
then stdout doesn't contain "UserID:" then stdout doesn't contain "UserID:"
~~~ ~~~
@ -517,7 +517,7 @@ output._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp
then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then stdout contains "-----END PGP PUBLIC KEY BLOCK-----" then stdout contains "-----END PGP PUBLIC KEY BLOCK-----"
@ -531,8 +531,8 @@ file._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --output key.pgp --userid Alice when I run sq --no-cert-store --no-key-store key generate --without-password --output key.pgp --userid Alice
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
then stdout contains "OpenPGP Certificate." then stdout contains "OpenPGP Certificate."
then stdout contains "Alice" then stdout contains "Alice"
@ -549,7 +549,7 @@ textual certificate. It could certainly be improved.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --binary when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --binary
then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then stdout doesn't contain "-----END PGP PUBLIC KEY BLOCK-----" then stdout doesn't contain "-----END PGP PUBLIC KEY BLOCK-----"
@ -567,7 +567,7 @@ placeholder until Subplot learns a new trick.
~~~ ~~~
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert < key.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert < key.pgp
then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then stdout contains "-----END PGP PUBLIC KEY BLOCK-----" then stdout contains "-----END PGP PUBLIC KEY BLOCK-----"
@ -593,9 +593,9 @@ This is for secret keys, with the output going to stdout in text form.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring list ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring list ring.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -610,9 +610,9 @@ This is for secret keys, with the output going to a file in text form.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
then file ring.pgp contains "-----BEGIN PGP PRIVATE KEY BLOCK-----" then file ring.pgp contains "-----BEGIN PGP PRIVATE KEY BLOCK-----"
then file ring.pgp contains "-----END PGP PRIVATE KEY BLOCK-----" then file ring.pgp contains "-----END PGP PRIVATE KEY BLOCK-----"
when I run sq --no-cert-store --no-key-store inspect ring.pgp when I run sq --no-cert-store --no-key-store inspect ring.pgp
@ -627,9 +627,9 @@ _Requirement: we can join two keys into a keyring in binary form._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp --binary when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp --binary
when I try to run grep PGP ring.pgp when I try to run grep PGP ring.pgp
then command fails then command fails
when I run sq --no-cert-store --no-key-store inspect ring.pgp when I run sq --no-cert-store --no-key-store inspect ring.pgp
@ -648,11 +648,11 @@ so we don't change writing to stdout separately.
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice-cert.pgp bob-cert.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice-cert.pgp bob-cert.pgp --output ring.pgp
when I run cat ring.pgp when I run cat ring.pgp
then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then stdout contains "-----END PGP PUBLIC KEY BLOCK-----" then stdout contains "-----END PGP PUBLIC KEY BLOCK-----"
@ -678,10 +678,10 @@ certificates._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --to-cert ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --to-cert ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "OpenPGP Certificate." then stdout contains "OpenPGP Certificate."
then stdout doesn't contain "Transferable Secret Key." then stdout doesn't contain "Transferable Secret Key."
@ -696,9 +696,9 @@ file._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --to-cert ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --to-cert ring.pgp
then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout contains "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then stdout contains "-----END PGP PUBLIC KEY BLOCK-----" then stdout contains "-----END PGP PUBLIC KEY BLOCK-----"
@ -710,9 +710,9 @@ _Requirement: we can get filter output in binary form._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --binary --to-cert ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --binary --to-cert ring.pgp
then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----"
~~~ ~~~
@ -724,8 +724,8 @@ criteria._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --userid Bob --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --userid Bob --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --prune-certs --name Alice alice.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --prune-certs --name Alice alice.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout doesn't contain "Bob" then stdout doesn't contain "Bob"
@ -738,10 +738,10 @@ specific user id._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --userid Alice ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --userid Alice ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout doesn't contain "Bob" then stdout doesn't contain "Bob"
@ -754,10 +754,10 @@ specific user ids._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --userid Alice --userid Bob ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --userid Alice --userid Bob ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -770,10 +770,10 @@ part of a user ids._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid 'Alice <alice@example.com>' --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Alice <alice@example.com>' --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid 'Bob <bob@example.com>' --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Bob <bob@example.com>' --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --name Alice ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --name Alice ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout doesn't contain "Bob" then stdout doesn't contain "Bob"
@ -786,10 +786,10 @@ several names as part of the user id._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid 'Alice <alice@example.com>' --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Alice <alice@example.com>' --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid 'Bob <bob@example.com>' --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Bob <bob@example.com>' --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --name Alice --name Bob ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --name Alice --name Bob ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -802,10 +802,10 @@ part of a user ids._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid 'Alice <alice@example.com>' --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Alice <alice@example.com>' --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid 'Bob <bob@sequoia-pgp.org>' --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Bob <bob@sequoia-pgp.org>' --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --domain example.com ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --domain example.com ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout doesn't contain "Bob" then stdout doesn't contain "Bob"
@ -818,10 +818,10 @@ several names as part of the user id._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid 'Alice <alice@example.com>' --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Alice <alice@example.com>' --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid 'Bob <bob@sequoia-pgp.org>' --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid 'Bob <bob@sequoia-pgp.org>' --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring filter --domain example.com --domain sequoia-pgp.org ring.pgp -o filtered.pgp when I run sq --no-cert-store --no-key-store toolbox keyring filter --domain example.com --domain sequoia-pgp.org ring.pgp --output filtered.pgp
when I run sq --no-cert-store --no-key-store inspect filtered.pgp when I run sq --no-cert-store --no-key-store inspect filtered.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -838,7 +838,7 @@ _Requirement: If we ask for an unsupported major output version, we get an error
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I try to run sq --output-version=9999 keyring list alice.pgp when I try to run sq --output-version=9999 keyring list alice.pgp
then command fails then command fails
when I try to run env SQ_OUTPUT_VERSION=9999 sq toolbox keyring list alice.pgp when I try to run env SQ_OUTPUT_VERSION=9999 sq toolbox keyring list alice.pgp
@ -851,7 +851,7 @@ _Requirement: If we ask for an unsupported output minor version, we get an error
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I try to run sq --output-version=0.9999 keyring list alice.pgp when I try to run sq --output-version=0.9999 keyring list alice.pgp
then command fails then command fails
~~~ ~~~
@ -862,7 +862,7 @@ _Requirement: If we ask for an unsupported output patch version, we get an error
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I try to run sq --output-version=0.0.9999 keyring list alice.pgp when I try to run sq --output-version=0.0.9999 keyring list alice.pgp
then command fails then command fails
~~~ ~~~
@ -873,9 +873,9 @@ _Requirement: we can list the keys in a keyring._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring list ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring list ring.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -887,11 +887,11 @@ _Requirement: we can list the keys in a keyring in a JSON format._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --userid '<alice@example.com>' --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --userid '<alice@example.com>' --output alice.pgp
when I run sq --no-cert-store --no-key-store inspect alice.pgp when I run sq --no-cert-store --no-key-store inspect alice.pgp
then I remember the fingerprint as ALICE_FINGERPRINT then I remember the fingerprint as ALICE_FINGERPRINT
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store --output-format=json toolbox keyring list ring.pgp when I run sq --no-cert-store --no-key-store --output-format=json toolbox keyring list ring.pgp
then stdout, as JSON, matches pattern keyring-list-pattern.json then stdout, as JSON, matches pattern keyring-list-pattern.json
@ -925,7 +925,7 @@ _Requirement: we can list the keys in a key file._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring list alice.pgp when I run sq --no-cert-store --no-key-store toolbox keyring list alice.pgp
then stdout contains "Alice" then stdout contains "Alice"
then stdout doesn't contain "Bob" then stdout doesn't contain "Bob"
@ -937,7 +937,7 @@ _Requirement: we can list all user ids._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --userid Bob --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --userid Bob --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring list alice.pgp --all-userids when I run sq --no-cert-store --no-key-store toolbox keyring list alice.pgp --all-userids
then stdout contains "Alice" then stdout contains "Alice"
then stdout contains "Bob" then stdout contains "Bob"
@ -963,9 +963,9 @@ is a placeholder.
~~~ ~~~
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp -o ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring merge alice.pgp bob.pgp --output ring.pgp
when I run sq --no-cert-store --no-key-store toolbox keyring split ring.pgp when I run sq --no-cert-store --no-key-store toolbox keyring split ring.pgp
then the resulting files match alice,pgp and bob.pgp then the resulting files match alice,pgp and bob.pgp
~~~ ~~~
@ -988,8 +988,8 @@ in cleartext, just in case.
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o cert.pgp key.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output cert.pgp key.pgp
when I run sq --no-cert-store --no-key-store encrypt --recipient-file cert.pgp hello.txt when I run sq --no-cert-store --no-key-store encrypt --recipient-file cert.pgp hello.txt
then stdout contains "-----BEGIN PGP MESSAGE-----" then stdout contains "-----BEGIN PGP MESSAGE-----"
then stdout doesn't contain "hello, world" then stdout doesn't contain "hello, world"
@ -1007,8 +1007,8 @@ in cleartext, just in case.
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o cert.pgp key.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output cert.pgp key.pgp
when I run sq --no-cert-store --no-key-store encrypt --binary --recipient-file cert.pgp hello.txt when I run sq --no-cert-store --no-key-store encrypt --binary --recipient-file cert.pgp hello.txt
then stdout doesn't contain "-----BEGIN PGP MESSAGE-----" then stdout doesn't contain "-----BEGIN PGP MESSAGE-----"
then stdout doesn't contain "hello, world" then stdout doesn't contain "hello, world"
@ -1029,10 +1029,10 @@ files, etc).
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o cert.pgp key.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output cert.pgp key.pgp
when I run sq --no-cert-store --no-key-store encrypt -o x.pgp --recipient-file cert.pgp hello.txt when I run sq --no-cert-store --no-key-store encrypt --output x.pgp --recipient-file cert.pgp hello.txt
when I run sq --no-cert-store --no-key-store decrypt -o output.txt --recipient-file key.pgp x.pgp when I run sq --no-cert-store --no-key-store decrypt --output output.txt --recipient-file key.pgp x.pgp
then files hello.txt and output.txt match then files hello.txt and output.txt match
~~~ ~~~
@ -1045,17 +1045,17 @@ recipients at a time._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o alice-cert.pgp alice.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output alice-cert.pgp alice.pgp
when I run sq --no-cert-store --no-key-store key generate --no-userids --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o bob-cert.pgp bob.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output bob-cert.pgp bob.pgp
when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --recipient-file bob-cert.pgp hello.txt -o x.pgp when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --recipient-file bob-cert.pgp hello.txt --output x.pgp
when I run sq --no-cert-store --no-key-store decrypt --recipient-file alice.pgp -o alice.txt x.pgp when I run sq --no-cert-store --no-key-store decrypt --recipient-file alice.pgp --output alice.txt x.pgp
then files hello.txt and alice.txt match then files hello.txt and alice.txt match
when I run sq --no-cert-store --no-key-store decrypt --recipient-file bob.pgp -o bob.txt x.pgp when I run sq --no-cert-store --no-key-store decrypt --recipient-file bob.pgp --output bob.txt x.pgp
then files hello.txt and bob.txt match then files hello.txt and bob.txt match
~~~ ~~~
@ -1068,12 +1068,12 @@ same time._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o alice-cert.pgp alice.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output alice-cert.pgp alice.pgp
when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --signer-file alice.pgp hello.txt -o x.pgp when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --signer-file alice.pgp hello.txt --output x.pgp
when I run sq --no-cert-store --no-key-store decrypt --recipient-file alice.pgp -o alice.txt x.pgp --signer-file alice-cert.pgp when I run sq --no-cert-store --no-key-store decrypt --recipient-file alice.pgp --output alice.txt x.pgp --signer-file alice-cert.pgp
then files hello.txt and alice.txt match then files hello.txt and alice.txt match
~~~ ~~~
@ -1087,14 +1087,14 @@ there should be no output._
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file empty given file empty
when I run sq --no-cert-store --no-key-store key generate --no-userids --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o alice-cert.pgp alice.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output alice-cert.pgp alice.pgp
when I run sq --no-cert-store --no-key-store key generate --no-userids --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert -o bob-cert.pgp bob.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert --output bob-cert.pgp bob.pgp
when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --signer-file alice.pgp hello.txt -o x.pgp when I run sq --no-cert-store --no-key-store encrypt --recipient-file alice-cert.pgp --signer-file alice.pgp hello.txt --output x.pgp
when I try to run sq decrypt --recipient-file alice.pgp -o alice.txt x.pgp --signer-file bob-cert.pgp when I try to run sq decrypt --recipient-file alice.pgp --output alice.txt x.pgp --signer-file bob-cert.pgp
then exit code is 1 then exit code is 1
then files alice.txt and empty match then files alice.txt and empty match
~~~ ~~~
@ -1113,15 +1113,15 @@ _Requirement: We can certify a user identity on a key._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp
then stdout doesn't contain "Certifications:" then stdout doesn't contain "Certifications:"
when I run sq --no-cert-store --no-key-store pki certify alice.pgp bob-cert.pgp Bob -o cert.pgp when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp bob-cert.pgp Bob --output cert.pgp
then file cert.pgp contains "-----BEGIN PGP PUBLIC KEY BLOCK-----" then file cert.pgp contains "-----BEGIN PGP PUBLIC KEY BLOCK-----"
then file cert.pgp contains "-----END PGP PUBLIC KEY BLOCK-----" then file cert.pgp contains "-----END PGP PUBLIC KEY BLOCK-----"
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
@ -1134,15 +1134,15 @@ _Requirement: We can certify a user identity on a key._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp
then stdout doesn't contain "Certifications:" then stdout doesn't contain "Certifications:"
when I run sq --no-cert-store --no-key-store pki certify alice.pgp bob-cert.pgp Bob -o cert.pgp --binary when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp bob-cert.pgp Bob --output cert.pgp --binary
when I run cat cert.pgp when I run cat cert.pgp
then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----" then stdout doesn't contain "-----BEGIN PGP PUBLIC KEY BLOCK-----"
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
@ -1156,12 +1156,12 @@ email address._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid "<alice@example.org>" --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid "<alice@example.org>" --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid "<bob@example.org>" --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid "<bob@example.org>" --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store pki certify alice.pgp bob-cert.pgp --email bob@example.org -o cert.pgp when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp bob-cert.pgp --email bob@example.org --output cert.pgp
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
then stdout contains "Certifications: 1," then stdout contains "Certifications: 1,"
~~~ ~~~
@ -1173,18 +1173,18 @@ identified by email address._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid "<alice@example.org>" --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid "<alice@example.org>" --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid "<bob@example.org>" --userid "Bob <bob@example.org>" --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid "<bob@example.org>" --userid "Bob <bob@example.org>" --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store pki certify alice.pgp bob-cert.pgp --email bob@example.org -o cert.pgp when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp bob-cert.pgp --email bob@example.org --output cert.pgp
when I run sq --no-cert-store --no-key-store key userid strip --userid "<bob@example.org>" -o cert.0.pgp cert.pgp when I run sq --no-cert-store --no-key-store key userid strip --cert-file cert.pgp --userid "<bob@example.org>" --output cert.0.pgp
when I run sq --no-cert-store --no-key-store inspect cert.0.pgp when I run sq --no-cert-store --no-key-store inspect cert.0.pgp
then stdout contains "Certifications: 1," then stdout contains "Certifications: 1,"
when I run sq --no-cert-store --no-key-store key userid strip --userid "Bob <bob@example.org>" -o cert.1.pgp cert.pgp when I run sq --no-cert-store --no-key-store key userid strip --cert-file cert.pgp --userid "Bob <bob@example.org>" --output cert.1.pgp
when I run sq --no-cert-store --no-key-store inspect cert.1.pgp when I run sq --no-cert-store --no-key-store inspect cert.1.pgp
then stdout contains "Certifications: 1," then stdout contains "Certifications: 1,"
~~~ ~~~
@ -1197,15 +1197,15 @@ self-signature._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp when I run sq --no-cert-store --no-key-store inspect bob-cert.pgp
then stdout doesn't contain "Certifications:" then stdout doesn't contain "Certifications:"
when I run sq --no-cert-store --no-key-store pki certify --add-userid alice.pgp bob-cert.pgp "My friend Bob" -o cert.pgp when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp --add-userid bob-cert.pgp "My friend Bob" --output cert.pgp
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
then stdout contains "My friend Bob" then stdout contains "My friend Bob"
then stdout contains "Certifications: 1," then stdout contains "Certifications: 1,"
@ -1219,12 +1219,12 @@ self-signature._
~~~scenario ~~~scenario
given an installed sq given an installed sq
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store pki certify --add-userid alice.pgp bob-cert.pgp --email "bob@example.org" -o cert.pgp when I run sq --no-cert-store --no-key-store pki certify --certifier-file alice.pgp --add-userid bob-cert.pgp --email "bob@example.org" --output cert.pgp
when I run sq --no-cert-store --no-key-store inspect cert.pgp when I run sq --no-cert-store --no-key-store inspect cert.pgp
then stdout contains "<bob@example.org>" then stdout contains "<bob@example.org>"
then stdout contains "Certifications: 1," then stdout contains "Certifications: 1,"
@ -1246,7 +1246,7 @@ stdout in ASCII armor form._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt
then stdout contains "-----BEGIN PGP MESSAGE-----" then stdout contains "-----BEGIN PGP MESSAGE-----"
then stdout contains "-----END PGP MESSAGE-----" then stdout contains "-----END PGP MESSAGE-----"
@ -1260,7 +1260,7 @@ stdout in binary form._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt --binary when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt --binary
then stdout doesn't contain "-----BEGIN PGP MESSAGE-----" then stdout doesn't contain "-----BEGIN PGP MESSAGE-----"
then stdout doesn't contain "-----END PGP MESSAGE-----" then stdout doesn't contain "-----END PGP MESSAGE-----"
@ -1274,8 +1274,8 @@ file._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt -o signed.txt when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt --output signed.txt
then file signed.txt contains "-----BEGIN PGP MESSAGE-----" then file signed.txt contains "-----BEGIN PGP MESSAGE-----"
then file signed.txt contains "-----END PGP MESSAGE-----" then file signed.txt contains "-----END PGP MESSAGE-----"
~~~ ~~~
@ -1287,9 +1287,9 @@ _Requirement: We can sign a file and verify the signature._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt -o signed.txt when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt --output signed.txt
when I run sq --no-cert-store --no-key-store verify --signer-file cert.pgp signed.txt when I run sq --no-cert-store --no-key-store verify --signer-file cert.pgp signed.txt
then stdout contains "hello, world" then stdout contains "hello, world"
~~~ ~~~
@ -1306,16 +1306,16 @@ not enough, when we need two.
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt -o signed1.txt when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt --output signed1.txt
when I try to run sq verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=2 signed1.txt when I try to run sq verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=2 signed1.txt
then exit code is 1 then exit code is 1
when I run sq --no-cert-store --no-key-store sign --append --signer-file bob.pgp signed1.txt -o signed2.txt when I run sq --no-cert-store --no-key-store sign --append --signer-file bob.pgp signed1.txt --output signed2.txt
when I run sq --no-cert-store --no-key-store verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=1 signed2.txt when I run sq --no-cert-store --no-key-store verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=1 signed2.txt
then stdout contains "hello, world" then stdout contains "hello, world"
when I run sq --no-cert-store --no-key-store verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=2 signed2.txt when I run sq --no-cert-store --no-key-store verify --signer-file alice-cert.pgp --signer-file bob-cert.pgp --signatures=2 signed2.txt
@ -1336,9 +1336,9 @@ the file by definition can't be valid anymore.
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file sed-in-place given file sed-in-place
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt -o signed.txt when I run sq --no-cert-store --no-key-store sign --signer-file key.pgp hello.txt --output signed.txt
when I run bash sed-in-place 3d signed.txt when I run bash sed-in-place 3d signed.txt
when I try to run sq verify --signer-file cert.pgp signed.txt when I try to run sq verify --signer-file cert.pgp signed.txt
then command fails then command fails
@ -1362,10 +1362,10 @@ included in a readable form._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --cleartext-signature --signer-file key.pgp hello.txt -o signed.txt when I run sq --no-cert-store --no-key-store sign --cleartext-signature --signer-file key.pgp hello.txt --output signed.txt
then file signed.txt contains "-----BEGIN PGP SIGNED MESSAGE-----" then file signed.txt contains "-----BEGIN PGP SIGNED MESSAGE-----"
then file signed.txt contains "hello, world" then file signed.txt contains "hello, world"
then file signed.txt contains "-----END PGP SIGNATURE-----" then file signed.txt contains "-----END PGP SIGNATURE-----"
@ -1383,10 +1383,10 @@ verified._
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file sed-in-place given file sed-in-place
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --cleartext-signature --signer-file key.pgp hello.txt -o signed.txt when I run sq --no-cert-store --no-key-store sign --cleartext-signature --signer-file key.pgp hello.txt --output signed.txt
when I run bash sed-in-place s/hello/HELLO/ signed.txt when I run bash sed-in-place s/hello/HELLO/ signed.txt
when I try to run sq verify --signer-file cert.pgp signed.txt when I try to run sq verify --signer-file cert.pgp signed.txt
then exit code is 1 then exit code is 1
@ -1400,10 +1400,10 @@ data it signs._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt -o sig.txt when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt --output sig.txt
then file sig.txt contains "-----BEGIN PGP SIGNATURE-----" then file sig.txt contains "-----BEGIN PGP SIGNATURE-----"
then file sig.txt contains "-----END PGP SIGNATURE-----" then file sig.txt contains "-----END PGP SIGNATURE-----"
when I run sq --no-cert-store --no-key-store verify --detached=sig.txt --signer-file=cert.pgp hello.txt when I run sq --no-cert-store --no-key-store verify --detached=sig.txt --signer-file=cert.pgp hello.txt
@ -1421,10 +1421,10 @@ modified, the signature can't be verified._
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file sed-in-place given file sed-in-place
when I run sq --no-cert-store --no-key-store key generate --no-userids --output key.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --no-userids --output key.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp -o cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --output cert.pgp
when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt -o sig.txt when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt --output sig.txt
when I run bash sed-in-place s/hello/HELLO/ hello.txt when I run bash sed-in-place s/hello/HELLO/ hello.txt
when I try to run sq verify --detached=sig.txt --signer-file=cert.pgp hello.txt when I try to run sq verify --detached=sig.txt --signer-file=cert.pgp hello.txt
then exit code is 1 then exit code is 1
@ -1439,13 +1439,13 @@ message._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt -o signed1.txt when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt --output signed1.txt
when I run sq --no-cert-store --no-key-store sign --signer-file bob.pgp --append signed1.txt -o signed2.txt when I run sq --no-cert-store --no-key-store sign --signer-file bob.pgp --append signed1.txt --output signed2.txt
when I run sq --no-cert-store --no-key-store verify signed2.txt --signer-file alice-cert.pgp --signer-file bob-cert.pgp when I run sq --no-cert-store --no-key-store verify signed2.txt --signer-file alice-cert.pgp --signer-file bob-cert.pgp
then stdout contains "hello, world" then stdout contains "hello, world"
then stderr matches regex 2.good signatures then stderr matches regex 2.good signatures
@ -1459,14 +1459,14 @@ twice separately._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store key generate --userid Alice --output alice.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Alice --output alice.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp -o alice-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert alice.pgp --output alice-cert.pgp
when I run sq --no-cert-store --no-key-store key generate --userid Bob --output bob.pgp when I run sq --no-cert-store --no-key-store key generate --without-password --userid Bob --output bob.pgp
when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp -o bob-cert.pgp when I run sq --no-cert-store --no-key-store toolbox extract-cert bob.pgp --output bob-cert.pgp
when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt -o signed1.txt when I run sq --no-cert-store --no-key-store sign --signer-file alice.pgp hello.txt --output signed1.txt
when I run sq --no-cert-store --no-key-store sign --signer-file bob.pgp hello.txt -o signed2.txt when I run sq --no-cert-store --no-key-store sign --signer-file bob.pgp hello.txt --output signed2.txt
when I run sq --no-cert-store --no-key-store sign --merge=signed2.txt signed1.txt -o merged.txt when I run sq --no-cert-store --no-key-store sign --merge=signed2.txt signed1.txt --output merged.txt
when I run sq --no-cert-store --no-key-store verify merged.txt --signer-file alice-cert.pgp --signer-file bob-cert.pgp when I run sq --no-cert-store --no-key-store verify merged.txt --signer-file alice-cert.pgp --signer-file bob-cert.pgp
then stdout contains "hello, world" then stdout contains "hello, world"
then stderr matches regex 2.good signatures then stderr matches regex 2.good signatures
@ -1502,7 +1502,7 @@ named file._
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file hello.asc given file hello.asc
when I run sq --no-cert-store --no-key-store toolbox armor hello.txt -o hello.out when I run sq --no-cert-store --no-key-store toolbox armor hello.txt --output hello.out
then files hello.asc and hello.out match then files hello.asc and hello.out match
~~~ ~~~
@ -1550,7 +1550,7 @@ a named file._
given an installed sq given an installed sq
given file hello.txt given file hello.txt
given file hello.asc given file hello.asc
when I run sq --no-cert-store --no-key-store toolbox dearmor hello.asc -o hello.out when I run sq --no-cert-store --no-key-store toolbox dearmor hello.asc --output hello.out
then files hello.txt and hello.out match then files hello.txt and hello.out match
~~~ ~~~
@ -1562,8 +1562,8 @@ back._
~~~scenario ~~~scenario
given an installed sq given an installed sq
given file hello.txt given file hello.txt
when I run sq --no-cert-store --no-key-store toolbox armor hello.txt -o hello.tmp when I run sq --no-cert-store --no-key-store toolbox armor hello.txt --output hello.tmp
when I run sq --no-cert-store --no-key-store toolbox dearmor hello.tmp -o hello.out when I run sq --no-cert-store --no-key-store toolbox dearmor hello.tmp --output hello.out
then files hello.txt and hello.out match then files hello.txt and hello.out match
~~~ ~~~
@ -1578,74 +1578,6 @@ then files hello.txt and hello.out match
a given email address by constructing HTTPS URLs from the email a given email address by constructing HTTPS URLs from the email
address. It is specified in [Internet Draft 14 for WKD][]. address. It is specified in [Internet Draft 14 for WKD][].
The two URLs are called the "advanced" and "direct" URLs. They are the
same, except the advanced one uses a subdomain, and an a subdirectory
named after the domain. This allows the web server where the
certificates are published to be operated separately from any other
services for the parent domain.
The advanced URL is the preferred URL. That is why `wkd wkd url`
prints that, and the other URL is a longer command.
## Advanced WKD URL
_Requirement: Output the advanced URL for an email address._
An advanced URL uses the "openpgpkey" subdomain of the domain in the
email address, and a subdirectory named after the email domain.
~~~scenario
given an installed sq
when I run sq --no-cert-store --no-key-store network wkd url me@example.com
then stdout contains "https://openpgpkey.example.com/.well-known/openpgpkey/example.com/hu/s8y7oh5xrdpu9psba3i5ntk64ohouhga?l=me"
when I run sq --no-cert-store --no-key-store --output-format=json network wkd url me@example.com
then stdout, as JSON, matches pattern wkd.json
~~~
~~~{#wkd.json .file .json .numberLines}
{
"sq_output_version": {
"major": 0,
"minor": 0,
"patch": 0
},
"advanced_url": "https://openpgpkey.example.com/.well-known/openpgpkey/example.com/hu/s8y7oh5xrdpu9psba3i5ntk64ohouhga?l=me",
"direct_url": "https://example.com/.well-known/openpgpkey/hu/s8y7oh5xrdpu9psba3i5ntk64ohouhga?l=me"
}
~~~
## Direct WKD URL
_Requirement: Output the direct URL for an email address._
The direct URL lacks the subdomain and subdirectory of an advanced one.
~~~scenario
given an installed sq
when I run sq --no-cert-store --no-key-store network wkd direct-url me@example.com
then stdout contains "https://example.com/.well-known/openpgpkey/hu/s8y7oh5xrdpu9psba3i5ntk64ohouhga?l=me"
when I run sq --no-cert-store --no-key-store --output-format=json network wkd url me@example.com
then stdout, as JSON, matches pattern wkd.json
~~~
## Email local part in original form in WKD URL
_Requirement: The WKD URL has the local part of an email address as
given in the input, just in case it matters to the server._
An advanced URL uses the "openpgpkey" subdomain of the domain in the
email address, and a subdirectory named after the email domain.
~~~scenario
given an installed sq
when I run sq --no-cert-store --no-key-store network wkd url Joe.Doe@Example.ORG
then stdout contains "https://openpgpkey.example.org/.well-known/openpgpkey/example.org/hu/iy9q119eutrkn8s1mk4r39qejnbu3n5q?l=Joe.Doe"
when I run sq --no-cert-store --no-key-store network wkd direct-url Joe.Doe@Example.ORG
then stdout contains "https://example.org/.well-known/openpgpkey/hu/iy9q119eutrkn8s1mk4r39qejnbu3n5q?l=Joe.Doe"
~~~
# Test data file # Test data file