1 @c Copyright (C) 2004, 2008 Free Software Foundation, Inc.
2 @c This is part of the GnuPG manual.
3 @c For copying conditions, see the file GnuPG.texi.
10 GnuPG comes with a couple of smaller tools:
13 * watchgnupg:: Read logs from a socket.
14 * gpgv:: Verify OpenPGP signatures.
15 * addgnupghome:: Create .gnupg home directories.
16 * gpgconf:: Modify .gnupg home directories.
17 * applygnupgdefaults:: Run gpgconf for all users.
18 * gpg-preset-passphrase:: Put a passphrase into the cache.
19 * gpg-connect-agent:: Communicate with a running agent.
20 * dirmngr-client:: How to use the Dirmngr client tool.
21 * gpgparsemail:: Parse a mail message into an annotated format
22 * gpgtar:: Encrypt or sign files into an archive.
23 * gpg-check-pattern:: Check a passphrase on stdin against the patternfile.
31 @section Read logs from a socket
34 \- Read and print logs from a socket
46 Most of the main utilities are able to write their log files to a Unix
47 Domain socket if configured that way. @command{watchgnupg} is a simple
48 listener for such a socket. It ameliorates the output with a time stamp
49 and makes sure that long lines are not interspersed with log output from
50 other utilities. This tool is not available for Windows.
53 @command{watchgnupg} is commonly invoked as
59 which is a shorthand for
62 watchgnupg --force $(gpgconf --list-dirs socketdir)/S.log
65 To watch GnuPG running with a different home directory, use
68 watchgnupg --homedir DIR
73 This starts it on the current terminal for listening on the standard
74 logging socket (this is commonly @file{/var/run/user/UID/gnupg/S.log}
75 or if no such user directory hierarchy exists @file{~/.gnupg/S.log}).
79 @command{watchgnupg} understands these options:
85 Delete an already existing socket file. This option is implicitly used
86 if no socket name has been given on the command line.
88 @item --homedir @var{DIR}
89 If no socket name is given on the command line, pass @var{DIR} to
90 gpgconf so that the socket for a GnuPG running with DIR has its home
91 directory is used. Note that the environment variable @var{GNUPGHOME}
92 is ignored by watchgnupg.
94 @anchor{option watchgnupg --tcp}
96 Instead of reading from a local socket, listen for connects on TCP
97 port @var{n}. A Unix domain socket can optionally also be given as a
98 second source. This option does not use a default socket name.
102 Do not print the date part of the timestamp.
106 Enable extra informational output.
110 Print version of the program and exit.
114 Display a brief help page and exit.
120 @chapheading Examples
123 $ watchgnupg --time-only
126 This waits for connections on the local socket
127 (e.g. @file{/var/run/user/1234/gnupg/S.log}) and shows all log
128 entries. To make this work the option @option{log-file} needs to be
129 used with all modules which logs are to be shown. The suggested entry
130 for the configuration files is:
136 If the default socket as given above and returned by "echo $(gpgconf
137 --list-dirs socketdir)/S.log" is not desired an arbitrary socket name
138 can be specified, for example @file{socket:///home/foo/bar/mysocket}.
139 For debugging purposes it is also possible to do remote logging. Take
140 care if you use this feature because the information is send in the
141 clear over the network. Use this syntax in the conf files:
144 log-file tcp://192.168.1.1:4711
147 You may use any port and not just 4711 as shown above; only IP
148 addresses are supported (v4 and v6) and no host names. You need to
149 start @command{watchgnupg} with the @option{tcp} option. Note that
150 under Windows the registry entry
151 @var{HKCU\Software\GNU\GnuPG:DefaultLogFile} can be used to change the
152 default log output from @code{stderr} to whatever is given by that
153 entry. However the only useful entry is a TCP name for remote
161 @command{gpg-agent}(1),
162 @command{scdaemon}(1)
164 @include see-also-note.texi
176 @manpage addgnupghome.8
178 @section Create .gnupg home directories
181 \- Create .gnupg home directories
188 .IR account_2 ... account_n
192 If GnuPG is installed on a system with existing user accounts, it is
193 sometimes required to populate the GnuPG home directory with existing
194 files. Especially a @file{trustlist.txt} and a keybox with some
195 initial certificates are often desired. This script helps to do this
196 by copying all files from @file{/etc/skel/.gnupg} to the home
197 directories of the accounts given on the command line. It takes care
198 not to overwrite existing GnuPG home directories.
201 @command{addgnupghome} is invoked by root as:
204 addgnupghome account1 account2 ... accountn
213 @section Modify .gnupg home directories
216 \- Modify .gnupg home directories
223 .B \-\-list-components
232 .B \-\-change-options
238 The @command{gpgconf} is a utility to automatically and reasonable
239 safely query and modify configuration files in the @file{.gnupg} home
240 directory. It is designed not to be invoked manually by the user, but
241 automatically by graphical user interfaces (GUI).@footnote{Please note
242 that currently no locking is done, so concurrent access should be
243 avoided. There are some precautions to avoid corruption with
244 concurrent usage, but results may be inconsistent and some changes may
245 get lost. The stateless design makes it difficult to provide more
248 @command{gpgconf} provides access to the configuration of one or more
249 components of the GnuPG system. These components correspond more or
250 less to the programs that exist in the GnuPG framework, like GPG,
251 GPGSM, DirMngr, etc. But this is not a strict one-to-one
252 relationship. Not all configuration options are available through
253 @command{gpgconf}. @command{gpgconf} provides a generic and abstract
254 method to access the most important configuration options that can
255 feasibly be controlled via such a mechanism.
257 @command{gpgconf} can be used to gather and change the options
258 available in each component, and can also provide their default
259 values. @command{gpgconf} will give detailed type information that
260 can be used to restrict the user's input without making an attempt to
263 @command{gpgconf} provides the backend of a configuration editor. The
264 configuration editor would usually be a graphical user interface
265 program that displays the current options, their default
266 values, and allows the user to make changes to the options. These
267 changes can then be made active with @command{gpgconf} again. Such a
268 program that uses @command{gpgconf} in this way will be called GUI
269 throughout this section.
272 * Invoking gpgconf:: List of all commands and options.
273 * Format conventions:: Formatting conventions relevant for all commands.
274 * Listing components:: List all gpgconf components.
275 * Checking programs:: Check all programs known to gpgconf.
276 * Listing options:: List all options of a component.
277 * Changing options:: Changing options of a component.
278 * Listing global options:: List all global options.
279 * Querying versions:: Get and compare software versions.
280 * Files used by gpgconf:: What files are used by gpgconf.
284 @node Invoking gpgconf
285 @subsection Invoking gpgconf
288 One of the following commands must be given:
292 @item --list-components
293 List all components. This is the default command used if none is
296 @item --check-programs
297 List all available backend programs and test whether they are runnable.
299 @item --list-options @var{component}
300 List all options of the component @var{component}.
302 @item --change-options @var{component}
303 Change the options of the component @var{component}.
305 @item --check-options @var{component}
306 Check the options for the component @var{component}.
308 @item --apply-profile @var{file}
309 Apply the configuration settings listed in @var{file} to the
310 configuration files. If @var{file} has no suffix and no slashes the
311 command first tries to read a file with the suffix @code{.prf} from
312 the data directory (@code{gpgconf --list-dirs datadir}) before it
313 reads the file verbatim. A profile is divided into sections using the
314 bracketed component name. Each section then lists the option which
315 shall go into the respective configuration file.
317 @item --apply-defaults
318 Update all configuration files with values taken from the global
319 configuration file (usually @file{/etc/gnupg/gpgconf.conf}).
320 Note: This is a legacy mechanism. Please use global configuration
323 @item --list-dirs [@var{names}]
325 Lists the directories used by @command{gpgconf}. One directory is
326 listed per line, and each line consists of a colon-separated list where
327 the first field names the directory type (for example @code{sysconfdir})
328 and the second field contains the percent-escaped directory. Although
329 they are not directories, the socket file names used by
330 @command{gpg-agent} and @command{dirmngr} are printed as well. Note
331 that the socket file names and the @code{homedir} lines are the default
332 names and they may be overridden by command line switches. If
333 @var{names} are given only the directories or file names specified by
334 the list names are printed without any escaping.
336 @item --list-config [@var{filename}]
337 List the global configuration file in a colon separated format. If
338 @var{filename} is given, check that file instead.
340 @item --check-config [@var{filename}]
341 Run a syntax check on the global configuration file. If @var{filename}
342 is given, check that file instead.
345 @item --query-swdb @var{package_name} [@var{version_string}]
346 Returns the current version for @var{package_name} and if
347 @var{version_string} is given also an indicator on whether an update
348 is available. The actual file with the software version is
349 automatically downloaded and checked by @command{dirmngr}.
350 @command{dirmngr} uses a thresholds to avoid download the file too
351 often and it does this by default only if it can be done via Tor. To
352 force an update of that file this command can be used:
355 gpg-connect-agent --dirmngr 'loadswdb --force' /bye
358 @item --reload [@var{component}]
361 Reload all or the given component. This is basically the same as
362 sending a SIGHUP to the component. Components which don't support
363 reloading are ignored. Without @var{component} or by using "all" for
364 @var{component} all components which are daemons are reloaded.
366 @item --launch [@var{component}]
368 If the @var{component} is not already running, start it.
369 @command{component} must be a daemon. This is in general not required
370 because the system starts these daemons as needed. However, external
371 software making direct use of @command{gpg-agent} or @command{dirmngr}
372 may use this command to ensure that they are started. Using "all" for
373 @var{component} launches all components which are daemons.
375 @item --kill [@var{component}]
378 Kill the given component that runs as a daemon, including
379 @command{gpg-agent}, @command{dirmngr}, and @command{scdaemon}. A
380 @command{component} which does not run as a daemon will be ignored.
381 Using "all" for @var{component} kills all components running as
382 daemons. Note that as of now reload and kill have the same effect for
385 @item --create-socketdir
386 @opindex create-socketdir
387 Create a directory for sockets below /run/user or /var/run/user. This
388 is command is only required if a non default home directory is used
389 and the /run based sockets shall be used. For the default home
390 directory GnUPG creates a directory on the fly.
392 @item --remove-socketdir
393 @opindex remove-socketdir
394 Remove a directory created with command @option{--create-socketdir}.
401 The following options may be used:
406 @itemx --output @var{file}
407 Write output to @var{file}. Default is to write to stdout.
411 Outputs additional information while running. Specifically, this
412 extends numerical field values by human-readable descriptions.
417 Try to be as quiet as possible.
419 @include opt-homedir.texi
421 @item --chuid @var{uid}
423 Change the current user to @var{uid} which may either be a number or a
424 name. This can be used from the root account to get information on
425 the GnuPG environment of the specified user or to start or kill
426 daemons. If @var{uid} is not the current UID a standard PATH is set
427 and the envvar GNUPGHOME is unset. To override the latter the option
428 @option{--homedir} can be used. This option has currently no effect
433 Do not actually change anything. This is currently only implemented
434 for @code{--change-options} and can be used for testing purposes.
438 Only used together with @code{--change-options}. If one of the
439 modified options can be changed in a running daemon process, signal
440 the running daemon to ask it to reparse its configuration file after
443 This means that the changes will take effect at run-time, as far as
444 this is possible. Otherwise, they will take effect at the next start
445 of the respective backend programs.
447 @item --status-fd @var{n}
449 Write special status strings to the file descriptor @var{n}. This
450 program returns the status messages SUCCESS or FAILURE which are
451 helpful when the caller uses a double fork approach and can't easily
452 get the return code of the process.
458 @node Format conventions
459 @subsection Format conventions
461 Some lines in the output of @command{gpgconf} contain a list of
462 colon-separated fields. The following conventions apply:
466 The GUI program is required to strip off trailing newline and/or
467 carriage return characters from the output.
470 @command{gpgconf} will never leave out fields. If a certain version
471 provides a certain field, this field will always be present in all
472 @command{gpgconf} versions from that time on.
475 Future versions of @command{gpgconf} might append fields to the list.
476 New fields will always be separated from the previously last field by
477 a colon separator. The GUI should be prepared to parse the last field
478 it knows about up until a colon or end of line.
481 Not all fields are defined under all conditions. You are required to
482 ignore the content of undefined fields.
485 There are several standard types for the content of a field:
489 Some fields contain strings that are not escaped in any way. Such
490 fields are described to be used @emph{verbatim}. These fields will
491 never contain a colon character (for obvious reasons). No de-escaping
492 or other formatting is required to use the field content. This is for
493 easy parsing of the output, when it is known that the content can
494 never contain any special characters.
496 @item percent-escaped
497 Some fields contain strings that are described to be
498 @emph{percent-escaped}. Such strings need to be de-escaped before
499 their content can be presented to the user. A percent-escaped string
500 is de-escaped by replacing all occurrences of @code{%XY} by the byte
501 that has the hexadecimal value @code{XY}. @code{X} and @code{Y} are
502 from the set @code{0-9a-f}.
505 Some fields contain strings that are described to be @emph{localized}.
506 Such strings are translated to the active language and formatted in
507 the active character set.
509 @item @w{unsigned number}
510 Some fields contain an @emph{unsigned number}. This number will
511 always fit into a 32-bit unsigned integer variable. The number may be
512 followed by a space, followed by a human readable description of that
513 value (if the verbose option is used). You should ignore everything
514 in the field that follows the number.
516 @item @w{signed number}
517 Some fields contain a @emph{signed number}. This number will always
518 fit into a 32-bit signed integer variable. The number may be followed
519 by a space, followed by a human readable description of that value (if
520 the verbose option is used). You should ignore everything in the
521 field that follows the number.
523 @item @w{boolean value}
524 Some fields contain a @emph{boolean value}. This is a number with
525 either the value 0 or 1. The number may be followed by a space,
526 followed by a human readable description of that value (if the verbose
527 option is used). You should ignore everything in the field that follows
528 the number; checking just the first character is sufficient in this
532 Some fields contain an @emph{option} argument. The format of an
533 option argument depends on the type of the option and on some flags:
537 The simplest case is that the option does not take an argument at all
538 (@var{type} @code{0}). Then the option argument is an unsigned number
539 that specifies how often the option occurs. If the @code{list} flag
540 is not set, then the only valid number is @code{1}. Options that do
541 not take an argument never have the @code{default} or @code{optional
545 If the option takes a number argument (@var{alt-type} is @code{2} or
546 @code{3}), and it can only occur once (@code{list} flag is not set),
547 then the option argument is either empty (only allowed if the argument
548 is optional), or it is a number. A number is a string that begins
549 with an optional minus character, followed by one or more digits. The
550 number must fit into an integer variable (unsigned or signed,
551 depending on @var{alt-type}).
554 If the option takes a number argument and it can occur more than once,
555 then the option argument is either empty, or it is a comma-separated
556 list of numbers as described above.
559 If the option takes a string argument (@var{alt-type} is 1), and it
560 can only occur once (@code{list} flag is not set) then the option
561 argument is either empty (only allowed if the argument is optional),
562 or it starts with a double quote character (@code{"}) followed by a
563 percent-escaped string that is the argument value. Note that there is
564 only a leading double quote character, no trailing one. The double
565 quote character is only needed to be able to differentiate between no
566 value and the empty string as value.
569 If the option takes a string argument and it can occur more than once,
570 then the option argument is either empty, or it is a comma-separated
571 list of string arguments as described above.
575 The active language and character set are currently determined from
576 the locale environment of the @command{gpgconf} program.
578 @c FIXME: Document the active language and active character set. Allow
579 @c to change it via the command line?
583 @node Listing components
584 @subsection Listing components
586 The command @code{--list-components} will list all components that can
587 be configured with @command{gpgconf}. Usually, one component will
588 correspond to one GnuPG-related program and contain the options of
589 that program's configuration file that can be modified using
590 @command{gpgconf}. However, this is not necessarily the case. A
591 component might also be a group of selected options from several
592 programs, or contain entirely virtual options that have a special
593 effect rather than changing exactly one option in one configuration
596 A component is a set of configuration options that semantically belong
597 together. Furthermore, several changes to a component can be made in
598 an atomic way with a single operation. The GUI could for example
599 provide a menu with one entry for each component, or a window with one
600 tabulator sheet per component.
602 The command @code{--list-components} lists all available
603 components, one per line. The format of each line is:
605 @code{@var{name}:@var{description}:@var{pgmname}:}
609 This field contains a name tag of the component. The name tag is used
610 to specify the component in all communication with @command{gpgconf}.
611 The name tag is to be used @emph{verbatim}. It is thus not in any
615 The @emph{string} in this field contains a human-readable description
616 of the component. It can be displayed to the user of the GUI for
617 informational purposes. It is @emph{percent-escaped} and
621 The @emph{string} in this field contains the absolute name of the
622 program's file. It can be used to unambiguously invoke that program.
623 It is @emph{percent-escaped}.
628 $ gpgconf --list-components
629 gpg:GPG for OpenPGP:/usr/local/bin/gpg2:
630 gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:
631 scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:
632 gpgsm:GPG for S/MIME:/usr/local/bin/gpgsm:
633 dirmngr:Directory Manager:/usr/local/bin/dirmngr:
638 @node Checking programs
639 @subsection Checking programs
641 The command @code{--check-programs} is similar to
642 @code{--list-components} but works on backend programs and not on
643 components. It runs each program to test whether it is installed and
644 runnable. This also includes a syntax check of all config file options
647 The command @code{--check-programs} lists all available
648 programs, one per line. The format of each line is:
650 @code{@var{name}:@var{description}:@var{pgmname}:@var{avail}:@var{okay}:@var{cfgfile}:@var{line}:@var{error}:}
654 This field contains a name tag of the program which is identical to the
655 name of the component. The name tag is to be used @emph{verbatim}. It
656 is thus not in any escaped format. This field may be empty to indicate
657 a continuation of error descriptions for the last name. The description
658 and pgmname fields are then also empty.
661 The @emph{string} in this field contains a human-readable description
662 of the component. It can be displayed to the user of the GUI for
663 informational purposes. It is @emph{percent-escaped} and
667 The @emph{string} in this field contains the absolute name of the
668 program's file. It can be used to unambiguously invoke that program.
669 It is @emph{percent-escaped}.
672 The @emph{boolean value} in this field indicates whether the program is
673 installed and runnable.
676 The @emph{boolean value} in this field indicates whether the program's
677 config file is syntactically okay.
680 If an error occurred in the configuration file (as indicated by a false
681 value in the field @code{okay}), this field has the name of the failing
682 configuration file. It is @emph{percent-escaped}.
685 If an error occurred in the configuration file, this field has the line
686 number of the failing statement in the configuration file.
687 It is an @emph{unsigned number}.
690 If an error occurred in the configuration file, this field has the error
691 text of the failing statement in the configuration file. It is
692 @emph{percent-escaped} and @emph{localized}.
697 In the following example the @command{dirmngr} is not runnable and the
698 configuration file of @command{scdaemon} is not okay.
701 $ gpgconf --check-programs
702 gpg:GPG for OpenPGP:/usr/local/bin/gpg2:1:1:
703 gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:1:1:
704 scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:1:0:
705 gpgsm:GPG for S/MIME:/usr/local/bin/gpgsm:1:1:
706 dirmngr:Directory Manager:/usr/local/bin/dirmngr:0:0:
710 The command @w{@code{--check-options @var{component}}} will verify the
711 configuration file in the same manner as @code{--check-programs}, but
712 only for the component @var{component}.
715 @node Listing options
716 @subsection Listing options
718 Every component contains one or more options. Options may be gathered
719 into option groups to allow the GUI to give visual hints to the user
720 about which options are related.
722 The command @code{@w{--list-options @var{component}}} lists
723 all options (and the groups they belong to) in the component
724 @var{component}, one per line. @var{component} must be the string in
725 the field @var{name} in the output of the @code{--list-components}
728 There is one line for each option and each group. First come all
729 options that are not in any group. Then comes a line describing a
730 group. Then come all options that belong into each group. Then comes
731 the next group and so on. There does not need to be any group (and in
732 this case the output will stop after the last non-grouped option).
734 The format of each line is:
736 @code{@var{name}:@var{flags}:@var{level}:@var{description}:@var{type}:@var{alt-type}:@var{argname}:@var{default}:@var{argdef}:@var{value}}
740 This field contains a name tag for the group or option. The name tag
741 is used to specify the group or option in all communication with
742 @command{gpgconf}. The name tag is to be used @emph{verbatim}. It is
743 thus not in any escaped format.
746 The flags field contains an @emph{unsigned number}. Its value is the
747 OR-wise combination of the following flag values:
751 If this flag is set, this is a line describing a group and not an
755 The following flag values are only defined for options (that is, if
756 the @code{group} flag is not used).
759 @item optional arg (2)
760 If this flag is set, the argument is optional. This is never set for
761 @var{type} @code{0} (none) options.
764 If this flag is set, the option can be given multiple times.
767 If this flag is set, the option can be changed at runtime.
770 If this flag is set, a default value is available.
772 @item default desc (32)
773 If this flag is set, a (runtime) default is available. This and the
774 @code{default} flag are mutually exclusive.
776 @item no arg desc (64)
777 If this flag is set, and the @code{optional arg} flag is set, then the
778 option has a special meaning if no argument is given.
780 @item no change (128)
781 If this flag is set, @command{gpgconf} ignores requests to change the
782 value. GUI frontends should grey out this option. Note, that manual
783 changes of the configuration files are still possible.
787 This field is defined for options and for groups. It contains an
788 @emph{unsigned number} that specifies the expert level under which
789 this group or option should be displayed. The following expert levels
790 are defined for options (they have analogous meaning for groups):
794 This option should always be offered to the user.
797 This option may be offered to advanced users.
800 This option should only be offered to expert users.
803 This option should normally never be displayed, not even to expert
807 This option is for internal use only. Ignore it.
810 The level of a group will always be the lowest level of all options it
814 This field is defined for options and groups. The @emph{string} in
815 this field contains a human-readable description of the option or
816 group. It can be displayed to the user of the GUI for informational
817 purposes. It is @emph{percent-escaped} and @emph{localized}.
820 This field is only defined for options. It contains an @emph{unsigned
821 number} that specifies the type of the option's argument, if any. The
822 following types are defined:
831 An @emph{unformatted string}.
834 A @emph{signed number}.
837 An @emph{unsigned number}.
844 A @emph{string} that describes the pathname of a file. The file does
845 not necessarily need to exist.
847 @item ldap server (33)
848 A @emph{string} that describes an LDAP server in the format:
850 @code{@var{hostname}:@var{port}:@var{username}:@var{password}:@var{base_dn}}
852 @item key fingerprint (34)
853 A @emph{string} with a 40 digit fingerprint specifying a certificate.
856 A @emph{string} that describes a certificate by user ID, key ID or
860 A @emph{string} that describes a certificate with a key by user ID,
861 key ID or fingerprint.
863 @item alias list (37)
864 A @emph{string} that describes an alias list, like the one used with
865 gpg's group option. The list consists of a key, an equal sign and space
869 More types will be added in the future. Please see the @var{alt-type}
870 field for information on how to cope with unknown types.
873 This field is identical to @var{type}, except that only the types
874 @code{0} to @code{31} are allowed. The GUI is expected to present the
875 user the option in the format specified by @var{type}. But if the
876 argument type @var{type} is not supported by the GUI, it can still
877 display the option in the more generic basic type @var{alt-type}. The
878 GUI must support all the defined basic types to be able to display all
879 options. More basic types may be added in future versions. If the
880 GUI encounters a basic type it doesn't support, it should report an
881 error and abort the operation.
884 This field is only defined for options with an argument type
885 @var{type} that is not @code{0}. In this case it may contain a
886 @emph{percent-escaped} and @emph{localized string} that gives a short
887 name for the argument. The field may also be empty, though, in which
888 case a short name is not known.
891 This field is defined only for options for which the @code{default} or
892 @code{default desc} flag is set. If the @code{default} flag is set,
893 its format is that of an @emph{option argument} (@pxref{Format
894 conventions}, for details). If the default value is empty, then no
895 default is known. Otherwise, the value specifies the default value
896 for this option. If the @code{default desc} flag is set, the field is
897 either empty or contains a description of the effect if the option is
901 This field is defined only for options for which the @code{optional
902 arg} flag is set. If the @code{no arg desc} flag is not set, its
903 format is that of an @emph{option argument} (@pxref{Format
904 conventions}, for details). If the default value is empty, then no
905 default is known. Otherwise, the value specifies the default argument
906 for this option. If the @code{no arg desc} flag is set, the field is
907 either empty or contains a description of the effect of this option if
908 no argument is given.
911 This field is defined only for options. Its format is that of an
912 @emph{option argument}. If it is empty, then the option is not
913 explicitly set in the current configuration, and the default applies
914 (if any). Otherwise, it contains the current value of the option.
915 Note that this field is also meaningful if the option itself does not
916 take a real argument (in this case, it contains the number of times
921 @node Changing options
922 @subsection Changing options
924 The command @w{@code{--change-options @var{component}}} will attempt
925 to change the options of the component @var{component} to the
926 specified values. @var{component} must be the string in the field
927 @var{name} in the output of the @code{--list-components} command. You
928 have to provide the options that shall be changed in the following
929 format on standard input:
931 @code{@var{name}:@var{flags}:@var{new-value}}
935 This is the name of the option to change. @var{name} must be the
936 string in the field @var{name} in the output of the
937 @code{--list-options} command.
940 The flags field contains an @emph{unsigned number}. Its value is the
941 OR-wise combination of the following flag values:
945 If this flag is set, the option is deleted and the default value is
946 used instead (if applicable).
950 The new value for the option. This field is only defined if the
951 @code{default} flag is not set. The format is that of an @emph{option
952 argument}. If it is empty (or the field is omitted), the default
953 argument is used (only allowed if the argument is optional for this
954 option). Otherwise, the option will be set to the specified value.
958 The output of the command is the same as that of
959 @code{--check-options} for the modified configuration file.
963 To set the force option, which is of basic type @code{none (0)}:
966 $ echo 'force:0:1' | gpgconf --change-options dirmngr
969 To delete the force option:
972 $ echo 'force:16:' | gpgconf --change-options dirmngr
975 The @code{--runtime} option can influence when the changes take
979 @node Listing global options
980 @subsection Listing global options
982 Some legacy applications look at the global configuration file for the
983 gpgconf tool itself; this is the file @file{gpgconf.conf}. Modern
984 applications should not use it but use per component global
985 configuration files which are more flexible than the
986 @file{gpgconf.conf}. Using both files is not suggested.
988 The colon separated listing format is record oriented and uses the first
989 field to identify the record type:
993 This describes a key record to start the definition of a new ruleset for
994 a user/group. The format of a key record is:
996 @code{k:@var{user}:@var{group}:}
1000 This is the user field of the key. It is percent escaped. See the
1001 definition of the gpgconf.conf format for details.
1004 This is the group field of the key. It is percent escaped.
1008 This describes a rule record. All rule records up to the next key record
1009 make up a rule set for that key. The format of a rule record is:
1011 @code{r:::@var{component}:@var{option}:@var{flag}:@var{value}:}
1015 This is the component part of a rule. It is a plain string.
1018 This is the option part of a rule. It is a plain string.
1021 This is the flags part of a rule. There may be only one flag per rule
1022 but by using the same component and option, several flags may be
1023 assigned to an option. It is a plain string.
1026 This is the optional value for the option. It is a percent escaped
1027 string with a single quotation mark to indicate a string. The quotation
1028 mark is only required to distinguish between no value specified and an
1035 Unknown record types should be ignored. Note that there is intentionally
1036 no feature to change the global option file through @command{gpgconf}.
1039 @node Querying versions
1040 @subsection Get and compare software versions.
1042 The GnuPG Project operates a server to query the current versions of
1043 software packages related to GnuPG. @command{gpgconf} can be used to
1044 access this online database. To allow for offline operations, this
1045 feature works by having @command{dirmngr} download a file from
1046 @code{https://versions.gnupg.org}, checking the signature of that file
1047 and storing the file in the GnuPG home directory. If
1048 @command{gpgconf} is used and @command{dirmngr} is running, it may ask
1049 @command{dirmngr} to refresh that file before itself uses the file.
1051 The command @option{--query-swdb} returns information for the given
1052 package in a colon delimited format:
1057 This is the name of the package as requested. Note that "gnupg" is a
1058 special name which is replaced by the actual package implementing this
1059 version of GnuPG. For this name it is also not required to specify a
1060 version because @command{gpgconf} takes its own version in this case.
1063 The currently installed version or an empty string. The value is
1064 taken from the command line argument but may be provided by gpg
1068 The status of the software package according to this table:
1071 No information available. This is either because no current version
1072 has been specified or due to an error.
1074 The given name is not known in the online database.
1076 An update of the software is available.
1078 The installed version of the software is current.
1080 The installed version is already newer than the released version.
1084 If the value (the empty string should be considered as zero) is
1085 greater than zero an important update is available.
1088 This returns an @command{gpg-error} error code to distinguish between
1089 various failure modes.
1092 This gives the date of the file with the version numbers in standard
1093 ISO format (@code{yyyymmddThhmmss}). The date has been extracted by
1094 @command{dirmngr} from the signature of the file.
1097 This gives the date in ISO format the file was downloaded. This value
1098 can be used to evaluate the freshness of the information.
1101 This returns the version string for the requested software from the
1105 This returns the release date in ISO format.
1108 This returns the size of the package as decimal number of bytes.
1111 This returns a hexified SHA-2 hash of the package.
1116 More fields may be added in future to the output.
1120 @node Files used by gpgconf
1121 @subsection Files used by gpgconf
1125 @item /etc/gnupg/gpgconf.conf
1126 @cindex gpgconf.conf
1127 If this file exists, it is processed as a global configuration file.
1128 This is a legacy mechanism which should not be used tigether with
1129 the modern global per component configuration files. A commented
1130 example can be found in the @file{examples} directory of the
1133 @item @var{GNUPGHOME}/swdb.lst
1135 A file with current software versions. @command{dirmngr} creates
1136 this file on demand from an online resource.
1145 @command{gpg-agent}(1),
1146 @command{scdaemon}(1),
1147 @command{dirmngr}(1)
1149 @include see-also-note.texi
1154 @c APPLYGNUPGDEFAULTS
1156 @manpage applygnupgdefaults.8
1157 @node applygnupgdefaults
1158 @section Run gpgconf for all users
1160 .B applygnupgdefaults
1161 \- Run gpgconf --apply-defaults for all users.
1166 .B applygnupgdefaults
1169 @mansect description
1170 This is a legacy script. Modern application should use the per
1171 component global configuration files under @file{/etc/gnupg/}.
1173 This script is a wrapper around @command{gpgconf} to run it with the
1174 command @code{--apply-defaults} for all real users with an existing
1175 GnuPG home directory. Admins might want to use this script to update he
1176 GnuPG configuration files for all users after
1177 @file{/etc/gnupg/gpgconf.conf} has been changed. This allows enforcing
1178 certain policies for all users. Note, that this is not a bulletproof way to
1179 force a user to use certain options. A user may always directly edit
1180 the configuration files and bypass gpgconf.
1183 @command{applygnupgdefaults} is invoked by root as:
1191 @c GPG-PRESET-PASSPHRASE
1193 @node gpg-preset-passphrase
1194 @section Put a passphrase into the cache
1195 @manpage gpg-preset-passphrase.1
1197 .B gpg-preset-passphrase
1198 \- Put a passphrase into gpg-agent's cache
1203 .B gpg-preset-passphrase
1209 @mansect description
1210 The @command{gpg-preset-passphrase} is a utility to seed the internal
1211 cache of a running @command{gpg-agent} with passphrases. It is mainly
1212 useful for unattended machines, where the usual @command{pinentry} tool
1213 may not be used and the passphrases for the to be used keys are given at
1216 This program works with GnuPG 2 and later. GnuPG 1.x is not supported.
1218 Passphrases set with this utility don't expire unless the
1219 @option{--forget} option is used to explicitly clear them from the
1220 cache --- or @command{gpg-agent} is either restarted or reloaded (by
1221 sending a SIGHUP to it). Note that the maximum cache time as set with
1222 @option{--max-cache-ttl} is still honored. It is necessary to allow
1223 this passphrase presetting by starting @command{gpg-agent} with the
1224 @option{--allow-preset-passphrase}.
1227 * Invoking gpg-preset-passphrase:: List of all commands and options.
1231 @node Invoking gpg-preset-passphrase
1232 @subsection List of all commands and options
1236 @command{gpg-preset-passphrase} is invoked this way:
1239 gpg-preset-passphrase [options] [command] @var{cacheid}
1242 @var{cacheid} is either a 40 character keygrip of hexadecimal
1243 characters identifying the key for which the passphrase should be set
1244 or cleared. The keygrip is listed along with the key when running the
1245 command: @code{gpgsm --with-keygrip --list-secret-keys}.
1246 Alternatively an arbitrary string may be used to identify a
1247 passphrase; it is suggested that such a string is prefixed with the
1248 name of the application (e.g @code{foo:12346}). Scripts should always
1249 use the option @option{--with-colons}, which provides the keygrip in a
1250 "grp" line (cf. @file{doc/DETAILS})/
1253 One of the following command options must be given:
1258 Preset a passphrase. This is what you usually will
1259 use. @command{gpg-preset-passphrase} will then read the passphrase from
1264 Flush the passphrase for the given cache ID from the cache.
1269 The following additional options may be used:
1275 Output additional information while running.
1277 @item -P @var{string}
1278 @itemx --passphrase @var{string}
1280 Instead of reading the passphrase from @code{stdin}, use the supplied
1281 @var{string} as passphrase. Note that this makes the passphrase visible
1289 @command{gpg-agent}(1),
1290 @command{scdaemon}(1)
1292 @include see-also-note.texi
1298 @c GPG-CONNECT-AGENT
1300 @node gpg-connect-agent
1301 @section Communicate with a running agent
1302 @manpage gpg-connect-agent.1
1304 .B gpg-connect-agent
1305 \- Communicate with a running agent
1310 .B gpg-connect-agent
1311 .RI [ options ] [commands]
1314 @mansect description
1315 The @command{gpg-connect-agent} is a utility to communicate with a
1316 running @command{gpg-agent}. It is useful to check out the commands
1317 @command{gpg-agent} provides using the Assuan interface. It might
1318 also be useful for scripting simple applications. Input is expected
1319 at stdin and output gets printed to stdout.
1321 It is very similar to running @command{gpg-agent} in server mode; but
1322 here we connect to a running instance.
1325 * Invoking gpg-connect-agent:: List of all options.
1326 * Controlling gpg-connect-agent:: Control commands.
1330 @node Invoking gpg-connect-agent
1331 @subsection List of all options
1334 @command{gpg-connect-agent} is invoked this way:
1337 gpg-connect-agent [options] [commands]
1342 The following options may be used:
1347 Connect to a running directory manager (keyserver client) instead of
1348 to the gpg-agent. If a dirmngr is not running, start it.
1352 Connect to a running keybox daemon instead of
1353 to the gpg-agent. If a keyboxd is not running, start it.
1356 @itemx --raw-socket @var{name}
1358 Connect to socket @var{name} assuming this is an Assuan style server.
1359 Do not run any special initializations or environment checks. This may
1360 be used to directly connect to any Assuan style socket server.
1365 Take the rest of the command line as a program and it's arguments and
1366 execute it as an Assuan server. Here is how you would run @command{gpgsm}:
1368 gpg-connect-agent --exec gpgsm --server
1370 Note that you may not use options on the command line in this case.
1375 Output additional information while running.
1381 Try to be as quiet as possible.
1383 @include opt-homedir.texi
1385 @item --chuid @var{uid}
1387 Change the current user to @var{uid} which may either be a number or a
1388 name. This can be used from the root account to run gpg-connect-agent
1389 for another user. If @var{uid} is not the current UID a standard PATH
1390 is set and the envvar GNUPGHOME is unset. To override the latter the
1391 option @option{--homedir} can be used. This option has only an effect
1392 when used on the command line. This option has currently no effect at
1395 @item --no-ext-connect
1396 @opindex no-ext-connect
1397 When using @option{-S} or @option{--exec}, @command{gpg-connect-agent}
1398 connects to the Assuan server in extended mode to allow descriptor
1399 passing. This option makes it use the old mode.
1401 @item --no-autostart
1402 @opindex no-autostart
1403 Do not start the gpg-agent or the dirmngr if it has not yet been
1407 @opindex --no-history
1408 In interactive mode the command line history is usually saved and
1409 restored to and from a file below the GnuPG home directory. This
1410 option inhibits the use of that file.
1412 @item --agent-program @var{file}
1413 @opindex agent-program
1414 Specify the agent program to be started if none is running. The
1415 default value is determined by running @command{gpgconf} with the
1416 option @option{--list-dirs}. Note that the pipe symbol (@code{|}) is
1417 used for a regression test suite hack and may thus not be used in the
1420 @item --dirmngr-program @var{file}
1421 @opindex dirmngr-program
1422 Specify the directory manager (keyserver client) program to be started
1423 if none is running. This has only an effect if used together with the
1424 option @option{--dirmngr}.
1426 @item --keyboxd-program @var{file}
1427 @opindex keyboxd-program
1428 Specify the keybox daemon program to be started if none is running.
1429 This has only an effect if used together with the option
1433 @itemx --run @var{file}
1435 Run the commands from @var{file} at startup and then continue with the
1436 regular input method. Note, that commands given on the command line are
1437 executed after this file.
1442 Run the command @code{/subst} at startup.
1446 Print data lines in a hex format and the ASCII representation of
1447 non-control characters.
1451 Decode data lines. That is to remove percent escapes but make sure that
1452 a new line always starts with a D and a space.
1457 Set stdin and stdout into unbuffered I/O mode. This this sometimes
1458 useful for scripting.
1463 @mansect control commands
1464 @node Controlling gpg-connect-agent
1465 @subsection Control commands
1467 While reading Assuan commands, gpg-agent also allows a few special
1468 commands to control its operation. These control commands all start
1469 with a slash (@code{/}).
1473 @item /echo @var{args}
1474 Just print @var{args}.
1476 @item /let @var{name} @var{value}
1477 Set the variable @var{name} to @var{value}. Variables are only
1478 substituted on the input if the @command{/subst} has been used.
1479 Variables are referenced by prefixing the name with a dollar sign and
1480 optionally include the name in curly braces. The rules for a valid name
1481 are identically to those of the standard bourne shell. This is not yet
1482 enforced but may be in the future. When used with curly braces no
1483 leading or trailing white space is allowed.
1485 If a variable is not found, it is searched in the environment and if
1486 found copied to the table of variables.
1488 Variable functions are available: The name of the function must be
1489 followed by at least one space and the at least one argument. The
1490 following functions are available:
1494 Return a value described by the argument. Available arguments are:
1498 The current working directory.
1502 GnuPG's system configuration directory.
1504 GnuPG's binary directory.
1506 GnuPG's library directory.
1508 GnuPG's library directory for executable files.
1510 GnuPG's data directory.
1512 The PID of the current server. Command @command{/serverpid} must
1513 have been given to return a useful value.
1516 @item unescape @var{args}
1517 Remove C-style escapes from @var{args}. Note that @code{\0} and
1518 @code{\x00} terminate the returned string implicitly. The string to be
1519 converted are the entire arguments right behind the delimiting space of
1522 @item unpercent @var{args}
1523 @itemx unpercent+ @var{args}
1524 Remove percent style escaping from @var{args}. Note that @code{%00}
1525 terminates the string implicitly. The string to be converted are the
1526 entire arguments right behind the delimiting space of the function
1527 name. @code{unpercent+} also maps plus signs to a spaces.
1529 @item percent @var{args}
1530 @itemx percent+ @var{args}
1531 Escape the @var{args} using percent style escaping. Tabs, formfeeds,
1532 linefeeds, carriage returns and colons are escaped. @code{percent+} also
1533 maps spaces to plus signs.
1535 @item errcode @var{arg}
1536 @itemx errsource @var{arg}
1537 @itemx errstring @var{arg}
1538 Assume @var{arg} is an integer and evaluate it using @code{strtol}. Return
1539 the gpg-error error code, error source or a formatted string with the
1540 error code and error source.
1548 Evaluate all arguments as long integers using @code{strtol} and apply
1549 this operator. A division by zero yields an empty string.
1554 Evaluate all arguments as long integers using @code{strtol} and apply
1555 the logical operators NOT, OR or AND. The NOT operator works on the
1562 @item /definq @var{name} @var{var}
1563 Use content of the variable @var{var} for inquiries with @var{name}.
1564 @var{name} may be an asterisk (@code{*}) to match any inquiry.
1567 @item /definqfile @var{name} @var{file}
1568 Use content of @var{file} for inquiries with @var{name}.
1569 @var{name} may be an asterisk (@code{*}) to match any inquiry.
1571 @item /definqprog @var{name} @var{prog}
1572 Run @var{prog} for inquiries matching @var{name} and pass the
1573 entire line to it as command line arguments.
1575 @item /datafile @var{name}
1576 Write all data lines from the server to the file @var{name}. The file
1577 is opened for writing and created if it does not exists. An existing
1578 file is first truncated to 0. The data written to the file fully
1579 decoded. Using a single dash for @var{name} writes to stdout. The
1580 file is kept open until a new file is set using this command or this
1581 command is used without an argument.
1584 Print all definitions
1587 Delete all definitions
1589 @item /sendfd @var{file} @var{mode}
1590 Open @var{file} in @var{mode} (which needs to be a valid @code{fopen}
1591 mode string) and send the file descriptor to the server. This is
1592 usually followed by a command like @code{INPUT FD} to set the
1593 input source for other commands.
1596 Not yet implemented.
1598 @item /open @var{var} @var{file} [@var{mode}]
1599 Open @var{file} and assign the file descriptor to @var{var}. Warning:
1600 This command is experimental and might change in future versions.
1602 @item /close @var{fd}
1603 Close the file descriptor @var{fd}. Warning: This command is
1604 experimental and might change in future versions.
1607 Show a list of open files.
1610 Send the Assuan command @command{GETINFO pid} to the server and store
1611 the returned PID for internal purposes.
1618 Same as the command line option @option{--hex}.
1622 Same as the command line option @option{--decode}.
1626 Enable and disable variable substitution. It defaults to disabled
1627 unless the command line option @option{--subst} has been used.
1628 If /subst as been enabled once, leading whitespace is removed from
1629 input lines which makes scripts easier to read.
1631 @item /while @var{condition}
1633 These commands provide a way for executing loops. All lines between
1634 the @code{while} and the corresponding @code{end} are executed as long
1635 as the evaluation of @var{condition} yields a non-zero value or is the
1636 string @code{true} or @code{yes}. The evaluation is done by passing
1637 @var{condition} to the @code{strtol} function. Example:
1643 /echo loop counter is $i
1648 @item /if @var{condition}
1650 These commands provide a way for conditional execution. All lines between
1651 the @code{if} and the corresponding @code{end} are executed only if
1652 the evaluation of @var{condition} yields a non-zero value or is the
1653 string @code{true} or @code{yes}. The evaluation is done by passing
1654 @var{condition} to the @code{strtol} function.
1656 @item /run @var{file}
1657 Run commands from @var{file}.
1659 @item /history --clear
1660 Clear the command history.
1663 Terminate the connection and the program.
1666 Print a list of available control commands.
1673 @command{gpg-agent}(1),
1674 @command{scdaemon}(1)
1675 @include see-also-note.texi
1681 @node dirmngr-client
1682 @section The Dirmngr Client Tool
1684 @manpage dirmngr-client.1
1687 \- Tool to access the Dirmngr services
1694 .RI [ certfile | pattern ]
1697 @mansect description
1698 The @command{dirmngr-client} is a simple tool to contact a running
1699 dirmngr and test whether a certificate has been revoked --- either by
1700 being listed in the corresponding CRL or by running the OCSP protocol.
1701 If no dirmngr is running, a new instances will be started but this is
1702 in general not a good idea due to the huge performance overhead.
1705 The usual way to run this tool is either:
1708 dirmngr-client @var{acert}
1715 dirmngr-client <@var{acert}
1718 Where @var{acert} is one DER encoded (binary) X.509 certificates to be
1721 The return value of this command is
1724 @mansect return value
1726 @command{dirmngr-client} returns these values:
1731 The certificate under question is valid; i.e. there is a valid CRL
1732 available and it is not listed there or the OCSP request returned that
1733 that certificate is valid.
1736 The certificate has been revoked
1738 @item 2 (and other values)
1739 There was a problem checking the revocation state of the certificate.
1740 A message to stderr has given more detailed information. Most likely
1741 this is due to a missing or expired CRL or due to a network problem.
1747 @command{dirmngr-client} may be called with the following options:
1753 Print the program version and licensing information. Note that you cannot
1754 abbreviate this command.
1758 Print a usage message summarizing the most useful command-line options.
1759 Note that you cannot abbreviate this command.
1763 Make the output extra brief by suppressing any informational messages.
1769 Outputs additional information while running.
1770 You can increase the verbosity by giving several
1771 verbose commands to @sc{dirmngr}, such as @samp{-vv}.
1775 Assume that the given certificate is in PEM (armored) format.
1779 Do the check using the OCSP protocol and ignore any CRLs.
1781 @item --force-default-responder
1782 @opindex force-default-responder
1783 When checking using the OCSP protocol, force the use of the default OCSP
1784 responder. That is not to use the Reponder as given by the certificate.
1788 Check whether the dirmngr daemon is up and running.
1792 Put the given certificate into the cache of a running dirmngr. This is
1793 mainly useful for debugging.
1797 Validate the given certificate using dirmngr's internal validation code.
1798 This is mainly useful for debugging.
1802 This command expects a list of filenames with DER encoded CRL files.
1803 With the option @option{--url} URLs are expected in place of filenames
1804 and they are loaded directly from the given location. All CRLs will be
1805 validated and then loaded into dirmngr's cache.
1809 Take the remaining arguments and run a lookup command on each of them.
1810 The results are Base-64 encoded outputs (without header lines). This
1811 may be used to retrieve certificates from a server. However the output
1812 format is not very well suited if more than one certificate is returned.
1817 Modify the @command{lookup} and @command{load-crl} commands to take an URL.
1822 Let the @command{lookup} command only search the local cache.
1826 Run @sc{dirmngr-client} in a mode suitable as a helper program for
1827 Squid's @option{external_acl_type} option.
1834 @command{dirmngr}(8),
1836 @include see-also-note.texi
1844 @section Parse a mail message into an annotated format
1846 @manpage gpgparsemail.1
1849 \- Parse a mail message into an annotated format
1859 @mansect description
1860 The @command{gpgparsemail} is a utility currently only useful for
1861 debugging. Run it with @code{--help} for usage information.
1869 @section Encrypt or sign files into an archive
1872 \- Encrypt or sign files into an archive
1880 .I [ filename2, ... ]
1882 .I [ directory2, ... ]
1885 @mansect description
1886 @command{gpgtar} encrypts or signs files into an archive. It is an
1887 gpg-ized tar using the same format as used by PGP's PGP Zip.
1891 @command{gpgtar} is invoked this way:
1894 gpgtar [options] @var{filename1} [@var{filename2}, ...] @var{directory} [@var{directory2}, ...]
1899 @command{gpgtar} understands these options:
1905 Put given files and directories into a vanilla ``ustar'' archive.
1909 Extract all files from a vanilla ``ustar'' archive.
1910 If no file name is given (or it is "-") the archive is taken from
1916 Encrypt given files and directories into an archive. This option may
1917 be combined with option @option{--symmetric} for an archive that may
1918 be decrypted via a secret key or a passphrase.
1923 Extract all files from an encrypted archive. If no file name is given
1924 (or it is "-") the archive is taken from stdin.
1928 Make a signed archive from the given files and directories. This can
1929 be combined with option @option{--encrypt} to create a signed and then
1932 @item --list-archive
1934 @opindex list-archive
1935 List the contents of the specified archive. If no file name is given
1936 (or it is "-") the archive is taken from stdin.
1940 Encrypt with a symmetric cipher using a passphrase. The default
1941 symmetric cipher used is @value{GPGSYMENCALGO}, but may be chosen with the
1942 @option{--cipher-algo} option to @command{gpg}.
1944 @item --recipient @var{user}
1945 @itemx -r @var{user}
1947 Encrypt for user id @var{user}. For details see @command{gpg}.
1949 @item --local-user @var{user}
1950 @itemx -u @var{user}
1952 Use @var{user} as the key to sign with. For details see @command{gpg}.
1954 @item --output @var{file}
1955 @itemx -o @var{file}
1957 Write the archive to the specified file @var{file}.
1962 Enable extra informational output.
1967 Try to be as quiet as possible.
1970 @opindex skip-crypto
1971 Skip all crypto operations and create or extract vanilla ``ustar''
1976 Do not actually output the extracted files.
1978 @item --directory @var{dir}
1981 Extract the files into the directory @var{dir}. The default is to
1982 take the directory name from the input filename. If no input filename
1983 is known a directory named @file{GPGARCH} is used. For tarball
1984 creation, switch to directory @var{dir} before performing any
1987 @item --files-from @var{file}
1988 @itemx -T @var{file}
1989 Take the file names to work from the file @var{file}; one file per
1994 Modify option @option{--files-from} to use a binary nul instead of a
1995 linefeed to separate file names.
1997 @item --utf8-strings
1998 @opindex utf8-strings
1999 Assume that the file names read by @option{--files-from} are UTF-8
2000 encoded. This option has an effect only on Windows where the active
2001 code page is otherwise assumed.
2005 This option has no effect because OpenPGP encryption and signing is
2010 This option is reserved and shall not be used. It will eventually be
2011 used to encrypt or sign using the CMS protocol; but that is not yet
2016 Use batch mode. Never ask but use the default action. This option is
2017 passed directly to @command{gpg}.
2021 Assume "yes" on most questions. Often used together with
2022 @option{--batch} to overwrite existing files. This option is passed
2023 directly to @command{gpg}.
2027 Assume "no" on most questions. This option is passed directly to
2030 @item --require-compliance
2031 @opindex require-compliance
2032 This option is passed directly to @command{gpg}.
2034 @item --status-fd @var{n}
2036 Write special status strings to the file descriptor @var{n}.
2037 See the file DETAILS in the documentation for a listing of them.
2041 When extracting an encrypted tarball also write a log file with the
2042 gpg output to a file named after the extraction directory with the
2045 @item --set-filename @var{file}
2046 @opindex set-filename
2047 Use the last component of @var{file} as the output directory. The
2048 default is to take the directory name from the input filename. If no
2049 input filename is known a directory named @file{GPGARCH} is used.
2050 This option is deprecated in favor of option @option{--directory}.
2053 @opindex no-compress
2054 This option tells gpg to disable compression (i.e. using option -z0).
2055 It is useful for archiving only large files which are are already
2056 compressed (e.g. a set of videos).
2058 @item --gpg @var{gpgcmd}
2060 Use the specified command @var{gpgcmd} instead of @command{gpg}.
2062 @item --gpg-args @var{args}
2064 Pass the specified extra options to @command{gpg}.
2066 @item --tar-args @var{args}
2068 Assume @var{args} are standard options of the command @command{tar}
2069 and parse them. The only supported tar options are "--directory",
2070 "--files-from", and "--null" This is an obsolete options because those
2071 supported tar options can also be given directly.
2073 @item --tar @var{command}
2075 This is a dummy option for backward compatibility.
2076 @c ... to the gpg-zip script we provided in the past
2080 Print version of the program and exit.
2084 Display a brief help page and exit.
2088 @mansect diagnostics
2090 The program returns 0 if everything was fine, 1 otherwise.
2100 Encrypt the contents of directory @file{mydocs} for user Bob to file
2104 gpgtar --encrypt --output test1 -r Bob mydocs
2108 List the contents of archive @file{test1}:
2111 gpgtar --list-archive test1
2120 @include see-also-note.texi
2123 @c GPG-CHECK-PATTERN
2125 @manpage gpg-check-pattern.1
2126 @node gpg-check-pattern
2127 @section Check a passphrase on stdin against the patternfile
2129 .B gpg-check-pattern
2130 \- Check a passphrase on stdin against the patternfile
2135 .B gpg\-check\-pattern
2140 @mansect description
2141 @command{gpg-check-pattern} checks a passphrase given on stdin against
2142 a specified pattern file.
2144 The pattern file is line based with comment lines beginning on the
2145 @emph{first} position with a @code{#}. Empty lines and lines with
2146 only white spaces are ignored. The actual pattern lines may either be
2147 verbatim string pattern and match as they are (trailing spaces are
2148 ignored) or extended regular expressions indicated by a @code{/} or
2149 @code{!/} in the first column and terminated by another @code{/} or
2150 end of line. If a regular expression starts with @code{!/} the match
2151 result is reversed. By default all comparisons are case insensitive.
2153 Tag lines may be used to further control the operation of this tool.
2154 The currently defined tags are:
2158 Switch to case insensitive comparison for all further patterns. This
2162 Switch to case sensitive comparison for all further patterns.
2165 Switch to reject mode. This is the default mode.
2168 Switch to accept mode.
2171 In the future more tags may be introduced and thus it is advisable not to
2172 start a plain pattern string with an open bracket. The tags must be
2173 given verbatim on the line with no spaces to the left or any non white
2174 space characters to the right.
2176 In reject mode the program exits on the first match with an exit code
2177 of 1 (failure). If at the end of the pattern list the reject mode is
2178 still active the program exits with code 0 (success).
2180 In accept mode blocks of patterns are used. A block starts at the
2181 next pattern after an "accept" tag and ends with the last pattern
2182 before the next "accept" or "reject" tag or at the end of the pattern
2183 list. If all patterns in a block match the program exits with an exit
2184 code of 0 (success). If any pattern in a block do not match the next
2185 pattern block is evaluated. If at the end of the pattern list the
2186 accept mode is still active the program exits with code 1 (failure).
2196 Enable extra informational output.
2200 Run only a syntax check on the patternfile.
2204 Input is expected to be null delimited.
2210 @command{gpg-agent}(1),
2212 @include see-also-note.texi