Linux "gpgv" Command Line Options and Examples
Verify OpenPGP signatures
gpgv is an OpenPGP signature verification tool. This program is actually a stripped-down version of gpg which is only able to check signatures. It is somewhat smaller than the fully-blown gpg and uses a different (and simpler) way to check that the public keys used to make the signature are valid.
gpgv [options] signed_files
Command Line Options:
Gives more information during processing. If used twice, the input data is listed in detail.
gpgv -v ...
Try to be as quiet as possible.
gpgv -q ...
Add file to the list of keyrings. If file begins with a tilde and a slash, these are replaced by the HOME directory. If thefilename does not contain a slash, it is assumed to be in the home-directory ("~/.gnupg" if --homedir is not used).
gpgv --keyring ...
Write output to file; to write to stdout use -. This option can be used to get the signed text from a cleartext or binarysignature; it also works for detached signatures, but in that case this option is in general not useful. Note that an exist‐ing file will be overwritten.
gpgv -o ...
Write special status strings to the file descriptor n. See the file DETAILS in the documentation for a listing of them.
gpgv --status-fd ...
Write log output to file descriptor n and not to stderr.
gpgv --logger-fd ...
Same as --logger-fd, except the logger data is written to file file. Use ‘socket://’ to log to socket.
gpgv --log-file ...
GnuPG normally checks that the timestamps associated with keys and signatures have plausible values. However, sometimes a sig‐nature seems to be older than the key due to clock problems. This option turns these checks into warnings.
gpgv --ignore-time-conflict ...
Set the name of the home directory to dir. If this option is not used, the home directory defaults to ‘~/.gnupg’. It is onlyrecognized when given on the command line. It also overrides any home directory stated through the environment variable‘GNUPGHOME’ or (on Windows systems) by means of the Registry entry HKCU\Software\GNU\GnuPG:HomeDir.On Windows systems it is possible to install GnuPG as a portable application. In this case only this command line option isconsidered, all other ways to set a home directory are ignored.To install GnuPG as a portable application under Windows, create an empty file named ‘gpgconf.ctl’ in the same directory asthe tool ‘gpgconf.exe’. The root of the installation is then that directory; or, if ‘gpgconf.exe’ has been installed directlybelow a directory named ‘bin’, its parent directory. You also need to make sure that the following directories exist and arewritable: ‘ROOT/home’ for the GnuPG home and ‘ROOT/var/cache/gnupg’ for internal cache files.
gpgv --homedir ...
Treat the specified digest algorithm as weak. Signatures made over weak digests algorithms are normally rejected. This optioncan be supplied multiple times if multiple algorithms should be considered weak. MD5 is always considered weak, and does notneed to be listed explicitly.
gpgv --weak-digest ...
This option enables a mode in which filenames of the form ‘-&n’, where n is a non-negative decimal number, refer to the filedescriptor n and not to a file with that name.EXAMPLESgpgv pgpfilegpgv sigfile [datafile]Verify the signature of the file. The second form is used for detached signatures, where sigfile is the detached signature(either ASCII-armored or binary) and datafile contains the signed data; if datafile is "-" the signed data is expected onstdin; if datafile is not given the name of the file holding the signed data is constructed by cutting off the extension(".asc", ".sig" or ".sign") from sigfile.FILES~/.gnupg/trustedkeys.gpgThe default keyring with the allowed keys.ENVIRONMENTHOME Used to locate the default home directory.GNUPGHOMEIf set directory used instead of "~/.gnupg".
gpgv --enable-special-filenames ...