I see no way to decrypt an archive passed to gpgtar via stdin.
```
$ gpgtar --version
gpgtar (GnuPG) 2.4.1-beta7
$ gpgtar --decrypt --dry-run <~/dev/g10/testdata/decrypt-me-sym.tar.asc
Usage: gpgtar [options] [files] [directories] (-h for help)
$ gpgtar --decrypt --dry-run - <~/dev/g10/testdata/decrypt-me-sym.tar.asc
gpg: decrypt_message failed: Unknown system error
gpgtar: error reading '[?]': premature EOF (size of last record: 0)
$ ls -lR -- -_1_
-_1_:
total 0
```
The following patch avoids the usage message, but it doesn't work:
```
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index 8461666b9..252d80c1d 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -531,7 +531,7 @@ main (int argc, char **argv)
break;
case aDecrypt:
- if (argc != 1)
+ if (argc > 1)
gpgrt_usage (1);
if (opt.outfile)
log_info ("note: ignoring option --output\n");
```
```
$ gpgtar --decrypt --dry-run <~/dev/g10/testdata/decrypt-me-sym.tar.asc
gpg: AES256.CFB encrypted data
gpg: WARNING: server 'gpg-agent' is older than us (2.3.8 < 2.4.1-beta7)
gpg: Note: Outdated servers may lack important security fixes.
gpg: Note: Use the command "gpgconf --kill all" to restart them.
gpg: encrypted with 1 passphrase
gpg: Signature made Di 24 Jan 2023 09:33:30 CET
gpg: using RSA key D0C16E12A3A5E7857F6FC1D30F5BE42A23C91CE3
gpg: Can't check signature: No public key
$ ls -lR GPGARCH_1_/
GPGARCH_1_/:
total 0
```
gpg/pinentry doesn't ask for the passphrase (symmetric encrypted archive).
Update: If I omit the `--dry-run` option, then passing no filename to gpgtar works. So, applying the above patch fixes the problem and matches the check for `--list-archive` and the behavior of gpgtar without crypto operations.