1GPG-AGENT(1)                 GNU Privacy Guard 2.3                GPG-AGENT(1)
2
3
4

NAME

6       gpg-agent - Secret key management for GnuPG
7

SYNOPSIS

9       gpg-agent [--homedir dir] [--options file] [options]
10       gpg-agent [--homedir dir] [--options file] [options] --server
11       gpg-agent  [--homedir  dir]  [--options  file] [options] --daemon [com‐
12       mand_line]
13
14

DESCRIPTION

16       gpg-agent is a daemon to manage  secret  (private)  keys  independently
17       from  any  protocol.  It is used as a backend for gpg and gpgsm as well
18       as for a couple of other utilities.
19
20       The agent is automatically started on demand by gpg, gpgsm, gpgconf, or
21       gpg-connect-agent.   Thus  there is no reason to start it manually.  In
22       case you want to use the included Secure Shell Agent you may start  the
23       agent using:
24
25
26         gpg-connect-agent /bye
27
28
29       If  you want to manually terminate the currently-running agent, you can
30       safely do so with:
31
32         gpgconf --kill gpg-agent
33
34
35       You should always add the following lines to your .bashrc  or  whatever
36       initialization file is used for all shell invocations:
37
38         GPG_TTY=$(tty)
39         export GPG_TTY
40
41
42       It is important that this environment variable always reflects the out‐
43       put of the tty command.  For W32 systems this option is not required.
44
45       Please make sure that a proper pinentry program has been installed  un‐
46       der  the default filename (which is system dependent) or use the option
47       pinentry-program to specify the full name of that program.  It is often
48       useful  to  install a symbolic link from the actual used pinentry (e.g.
49/usr/bin/pinentry-gtk’) to the  expected  one  (e.g.  ‘/usr/bin/pinen‐
50       try’).
51
52
53
54

COMMANDS

56       Commands  are  not  distinguished from options except for the fact that
57       only one command is allowed.
58
59
60       --version
61              Print the program version and licensing information.  Note  that
62              you cannot abbreviate this command.
63
64
65       --help
66       -h     Print  a  usage message summarizing the most useful command-line
67              options.  Note that you cannot abbreviate this command.
68
69
70       --dump-options
71              Print a list of all available options and commands.   Note  that
72              you cannot abbreviate this command.
73
74
75       --server
76              Run  in server mode and wait for commands on the stdin.  The de‐
77              fault mode is to create a socket and listen for commands there.
78
79
80       --daemon [command line]
81              Start the gpg-agent as a daemon; that is,  detach  it  from  the
82              console and run it in the background.
83
84              As  an  alternative  you  may create a new process as a child of
85              gpg-agent: gpg-agent --daemon /bin/sh.  This way you get  a  new
86              shell  with  the environment setup properly; after you exit from
87              this shell, gpg-agent terminates within a few seconds.
88
89
90       --supervised
91              Run in the foreground, sending logs by default  to  stderr,  and
92              listening  on  provided  file descriptors, which must already be
93              bound to listening sockets.  This option is deprecated  and  not
94              supported on Windows.
95
96              If  in  ‘common.conf’  the option no-autostart is set, any start
97              attempts will be ignored.
98
99              In --supervised mode, different file descriptors can be provided
100              for  use  as different socket types (e.g. ssh, extra) as long as
101              they are identified in the environment  variable  LISTEN_FDNAMES
102              (see  sd_listen_fds(3)  on some Linux distributions for more in‐
103              formation on this convention).
104

OPTIONS

106       Options may either be used on the command line or, after stripping  off
107       the two leading dashes, in the configuration file.
108
109
110
111
112       --options file
113              Reads  configuration  from file instead of from the default per-
114              user configuration file.   The  default  configuration  file  is
115              named  ‘gpg-agent.conf’  and  expected in the ‘.gnupg’ directory
116              directly below the home directory of the user.  This  option  is
117              ignored if used in an options file.
118
119
120
121       --homedir dir
122              Set the name of the home directory to dir. If this option is not
123              used, the home directory defaults to  ‘~/.gnupg’.   It  is  only
124              recognized  when  given  on the command line.  It also overrides
125              any home  directory  stated  through  the  environment  variable
126GNUPGHOME’ or (on Windows systems) by means of the Registry en‐
127              try HKCU\Software\GNU\GnuPG:HomeDir.
128
129              On Windows systems it is possible to install GnuPG as a portable
130              application.  In this case only this command line option is con‐
131              sidered, all other ways to set a home directory are ignored.
132
133              To install GnuPG as a portable application under Windows, create
134              an  empty  file named ‘gpgconf.ctl’ in the same directory as the
135              tool ‘gpgconf.exe’.  The root of the installation is  then  that
136              directory;  or, if ‘gpgconf.exe’ has been installed directly be‐
137              low a directory named ‘bin’, its  parent  directory.   You  also
138              need  to  make sure that the following directories exist and are
139              writable:    ‘ROOT/home’    for    the    GnuPG     home     and
140ROOT/var/cache/gnupg’ for internal cache files.
141
142
143
144       -v
145       --verbose
146              Outputs  additional information while running.  You can increase
147              the verbosity by giving several verbose commands  to  gpg-agent,
148              such as ‘-vv’.
149
150
151       -q
152       --quiet
153              Try to be as quiet as possible.
154
155
156       --batch
157              Don't  invoke  a  pinentry or do any other thing requiring human
158              interaction.
159
160
161       --faked-system-time epoch
162              This option is only useful for testing; it sets the system  time
163              back  or  forth  to epoch which is the number of seconds elapsed
164              since the year 1970.
165
166
167       --debug-level level
168              Select the debug level for investigating problems. level may  be
169              a numeric value or a keyword:
170
171
172              none   No  debugging at all.  A value of less than 1 may be used
173                     instead of the keyword.
174
175              basic  Some basic debug messages.  A value between 1 and  2  may
176                     be used instead of the keyword.
177
178              advanced
179                     More verbose debug messages.  A value between 3 and 5 may
180                     be used instead of the keyword.
181
182              expert Even more detailed messages.  A value between 6 and 8 may
183                     be used instead of the keyword.
184
185              guru   All  of  the  debug messages you can get. A value greater
186                     than 8 may be used instead of the keyword.  The  creation
187                     of  hash  tracing files is only enabled if the keyword is
188                     used.
189
190       How these messages are mapped to the  actual  debugging  flags  is  not
191       specified  and may change with newer releases of this program. They are
192       however carefully selected to best aid in debugging.
193
194
195       --debug flags
196              Set debug flags.  All flags are or-ed and flags may be given  in
197              C  syntax  (e.g.  0x0042)  or  as a comma separated list of flag
198              names.  To get a list of all supported  flags  the  single  word
199              "help" can be used. This option is only useful for debugging and
200              the behavior may change at any time without notice.
201
202
203       --debug-all
204              Same as --debug=0xffffffff
205
206
207       --debug-wait n
208              When running in server mode, wait n seconds before entering  the
209              actual  processing  loop  and print the pid.  This gives time to
210              attach a debugger.
211
212
213       --debug-quick-random
214              This option inhibits the use of the very secure  random  quality
215              level (Libgcrypt’s GCRY_VERY_STRONG_RANDOM) and degrades all re‐
216              quest down to standard random quality.   It  is  only  used  for
217              testing  and should not be used for any production quality keys.
218              This option is only effective when given on the command line.
219
220              On GNU/Linux, another way to quickly generate insecure  keys  is
221              to use rngd to fill the kernel's entropy pool with lower quality
222              random data.  rngd is typically provided by the rng-tools  pack‐
223              age.  It can be run as follows: ‘sudo rngd -f -r /dev/urandom’.
224
225
226       --debug-pinentry
227              This  option  enables  extra debug information pertaining to the
228              Pinentry.  As of now it is only  useful  when  used  along  with
229              --debug 1024.
230
231
232       --no-detach
233              Don't  detach the process from the console.  This is mainly use‐
234              ful for debugging.
235
236
237       --steal-socket
238              In --daemon mode, gpg-agent detects an already running gpg-agent
239              and  does  not allow to start a new instance. This option can be
240              used to override this check: the new gpg-agent process will  try
241              to  take over the communication sockets from the already running
242              process and start anyway.  This option should in general not  be
243              used.
244
245
246
247       -s
248       --sh
249       -c
250       --csh  Format  the info output in daemon mode for use with the standard
251              Bourne shell or the C-shell respectively.   The  default  is  to
252              guess  it  based on the environment variable SHELL which is cor‐
253              rect in almost all cases.
254
255
256
257       --grab
258       --no-grab
259              Tell the pinentry to grab the keyboard and mouse.   This  option
260              should be used on X-Servers to avoid X-sniffing attacks. Any use
261              of the option --grab overrides an used  option  --no-grab.   The
262              default is --no-grab.
263
264
265
266       --log-file file
267              Append all logging output to file.  This is very helpful in see‐
268              ing what the agent actually does.  Use  ‘socket://’  to  log  to
269              socket.   If  neither  a  log file nor a log file descriptor has
270              been set on a Windows platform, the  Registry  entry  HKCU\Soft‐
271              ware\GNU\GnuPG:DefaultLogFile,  if  set,  is used to specify the
272              logging output.
273
274
275
276
277       --no-allow-mark-trusted
278              Do not allow clients to mark keys as trusted, i.e. put them into
279              the ‘trustlist.txt’ file.  This makes it harder for users to in‐
280              advertently accept Root-CA keys.
281
282
283
284
285       --no-user-trustlist
286              Entirely ignore the user trust list and consider only the global
287              trustlist  (‘/etc/gnupg/trustlist.txt’).   This implies the [op‐
288              tion --no-allow-mark-trusted].
289
290
291       --sys-trustlist-name file
292              Changes  the  default  name  for  the  global   trustlist   from
293              "trustlist.txt"  to  file.  If file does not contain any slashes
294              and does not start with "~/" it is searched in the  system  con‐
295              figuration directory (‘/etc/gnupg’).
296
297
298
299       --allow-preset-passphrase
300              This  option allows the use of gpg-preset-passphrase to seed the
301              internal cache of gpg-agent with passphrases.
302
303
304
305       --no-allow-loopback-pinentry
306
307       --allow-loopback-pinentry
308              Disallow or allow clients to use the loopback pinentry features;
309              see the option pinentry-mode for details.  Allow is the default.
310
311              The --force option of the Assuan command DELETE_KEY is also con‐
312              trolled by this option: The option  is  ignored  if  a  loopback
313              pinentry is disallowed.
314
315
316       --no-allow-external-cache
317              Tell Pinentry not to enable features which use an external cache
318              for passphrases.
319
320              Some desktop environments prefer to unlock all credentials  with
321              one  master password and may have installed a Pinentry which em‐
322              ploys an additional external cache to implement such  a  policy.
323              By  using this option the Pinentry is advised not to make use of
324              such a cache and instead always ask the user for  the  requested
325              passphrase.
326
327
328       --allow-emacs-pinentry
329              Tell  Pinentry  to allow features to divert the passphrase entry
330              to a running Emacs instance.  How this is  exactly  handled  de‐
331              pends on the version of the used Pinentry.
332
333
334       --ignore-cache-for-signing
335              This  option  will let gpg-agent bypass the passphrase cache for
336              all signing operation.  Note that there is  also  a  per-session
337              option  to  control  this  behavior but this command line option
338              takes precedence.
339
340
341       --default-cache-ttl n
342              Set the time a cache entry is valid to n seconds.   The  default
343              is  600  seconds.   Each time a cache entry is accessed, the en‐
344              try's timer is reset.  To set an entry's maximum  lifetime,  use
345              max-cache-ttl.  Note that a cached passphrase may not be evicted
346              immediately from memory if no client requests a cache operation.
347              This  is  due to an internal housekeeping function which is only
348              run every few seconds.
349
350
351       --default-cache-ttl-ssh n
352              Set the time a cache entry used for SSH keys is valid to n  sec‐
353              onds.   The default is 1800 seconds.  Each time a cache entry is
354              accessed, the entry's timer is reset.  To set an entry's maximum
355              lifetime, use max-cache-ttl-ssh.
356
357
358       --max-cache-ttl n
359              Set the maximum time a cache entry is valid to n seconds.  After
360              this time a cache entry will be expired even if it has been  ac‐
361              cessed  recently  or  has  been set using gpg-preset-passphrase.
362              The default is 2 hours (7200 seconds).
363
364
365       --max-cache-ttl-ssh n
366              Set the maximum time a cache entry used for SSH keys is valid to
367              n  seconds.   After this time a cache entry will be expired even
368              if it has been accessed recently or has been set using  gpg-pre‐
369              set-passphrase.  The default is 2 hours (7200 seconds).
370
371
372       --enforce-passphrase-constraints
373              Enforce  the  passphrase constraints by not allowing the user to
374              bypass them using the ``Take it anyway'' button.
375
376
377       --min-passphrase-len n
378              Set the minimal length of a passphrase.   When  entering  a  new
379              passphrase  shorter than this value a warning will be displayed.
380              Defaults to 8.
381
382
383       --min-passphrase-nonalpha n
384              Set the minimal number of digits or special characters  required
385              in  a passphrase.  When entering a new passphrase with less than
386              this number of digits or special characters a  warning  will  be
387              displayed.  Defaults to 1.
388
389
390       --check-passphrase-pattern file
391       --check-sym-passphrase-pattern file
392              Check  the  passphrase  against the pattern given in file.  When
393              entering a new passphrase matching one of these pattern a  warn‐
394              ing will be displayed.  If file does not contain any slashes and
395              does not start with "~/" it is searched in the system configura‐
396              tion  directory  (‘/etc/gnupg’).   The default is not to use any
397              pattern file.  The second version of this option  is  only  used
398              when  creating a new symmetric key to allow the use of different
399              patterns for such passphrases.
400
401              Security note: It is known that checking a passphrase against  a
402              list  of  pattern  or  even against a complete dictionary is not
403              very effective to enforce good  passphrases.   Users  will  soon
404              figure  up  ways to bypass such a policy.  A better policy is to
405              educate users on good security behavior and optionally to run  a
406              passphrase  cracker  regularly on all users passphrases to catch
407              the very simple ones.
408
409
410       --max-passphrase-days n
411              Ask the user to change the passphrase  if  n  days  have  passed
412              since  the  last  change.  With --enforce-passphrase-constraints
413              set the user may not bypass this check.
414
415
416       --enable-passphrase-history
417              This option does nothing yet.
418
419
420       --pinentry-invisible-char char
421              This option asks the Pinentry to use char for displaying  hidden
422              characters.   char must be one character UTF-8 string.  A Pinen‐
423              try may or may not honor this request.
424
425
426       --pinentry-timeout n
427              This option asks the Pinentry to timeout after n seconds with no
428              user input.  The default value of 0 does not ask the pinentry to
429              timeout, however a Pinentry may  use  its  own  default  timeout
430              value  in  this  case.  A Pinentry may or may not honor this re‐
431              quest.
432
433
434       --pinentry-formatted-passphrase
435              This option asks the Pinentry to  enable  passphrase  formatting
436              when  asking  the  user  for a new passphrase and masking of the
437              passphrase is turned off.
438
439              If passphrase formatting is enabled, then all non-breaking space
440              characters are stripped from the entered passphrase.  Passphrase
441              formatting is mostly useful in combination with passphrases gen‐
442              erated  with  the  GENPIN feature of some Pinentries.  Note that
443              such a generated passphrase, if not modified by the user,  skips
444              all  passphrase  constraints  checking  because such constraints
445              would actually weaken the generated passphrase.
446
447
448       --pinentry-program filename
449              Use program filename as the PIN entry.  The default is installa‐
450              tion  dependent.  With the default configuration the name of the
451              default pinentry is ‘pinentry’; if that file does not exist  but
452              a ‘pinentry-basic’ exist the latter is used.
453
454              On  a  Windows platform the default is to use the first existing
455              program      from      this      list:       ‘bin\pinentry.exe’,
456..\Gpg4win\bin\pinentry.exe’,        ‘..\Gpg4win\pinentry.exe’,
457..\GNU\GnuPG\pinentry.exe’,          ‘..\GNU\bin\pinentry.exe’,
458bin\pinentry-basic.exe’  where  the  file names are relative to
459              the GnuPG installation directory.
460
461
462
463       --pinentry-touch-file filename
464              By default the filename of the socket gpg-agent is listening for
465              requests  is  passed to Pinentry, so that it can touch that file
466              before exiting (it does this only in curses mode).  This  option
467              changes  the  file  passed to Pinentry to filename.  The special
468              name /dev/null may be used to completely disable  this  feature.
469              Note  that  Pinentry  will  not  create  that file, it will only
470              change the modification and access time.
471
472
473
474       --scdaemon-program filename
475              Use program filename as the Smartcard daemon.   The  default  is
476              installation  dependent  and  can be shown with the gpgconf com‐
477              mand.
478
479
480       --disable-scdaemon
481              Do not make use of the scdaemon tool.  This option has  the  ef‐
482              fect of disabling the ability to do smartcard operations.  Note,
483              that enabling this option at runtime does not  kill  an  already
484              forked scdaemon.
485
486
487       --disable-check-own-socket
488              gpg-agent  employs  a  periodic  self-test  to  detect  a stolen
489              socket.  This usually means a second instance of  gpg-agent  has
490              taken  over the socket and gpg-agent will then terminate itself.
491              This option may be used to disable this self-test for  debugging
492              purposes.
493
494
495       --use-standard-socket
496       --no-use-standard-socket
497       --use-standard-socket-p
498              Since  GnuPG  2.1 the standard socket is always used.  These op‐
499              tions have no more effect.  The  command  gpg-agent  --use-stan‐
500              dard-socket-p will thus always return success.
501
502
503       --display string
504       --ttyname string
505       --ttytype string
506       --lc-ctype string
507       --lc-messages string
508       --xauthority string
509              These options are used with the server mode to pass localization
510              information.
511
512
513       --keep-tty
514       --keep-display
515              Ignore requests to change the current tty or X  window  system's
516              DISPLAY  variable  respectively.   This  is  useful  to lock the
517              pinentry to pop up at the tty or display you started the agent.
518
519
520       --listen-backlog n
521              Set the size of the queue for pending connections.  The  default
522              is 64.
523
524
525
526       --extra-socket name
527              The  extra socket is created by default, you may use this option
528              to change the name of the socket.  To disable  the  creation  of
529              the socket use ``none'' or ``/dev/null'' for name.
530
531              Also listen on native gpg-agent connections on the given socket.
532              The intended use for this extra socket is to setup a Unix domain
533              socket  forwarding  from  a remote machine to this socket on the
534              local machine.  A gpg running on the  remote  machine  may  then
535              connect  to  the local gpg-agent and use its private keys.  This
536              enables decrypting or signing data on a remote  machine  without
537              exposing the private keys to the remote machine.
538
539
540       --enable-extended-key-format
541       --disable-extended-key-format
542              Since  version  2.3 keys are created in the extended private key
543              format.  Changing the passphrase of a key will also convert  the
544              key  to that new format.  This new key format is supported since
545              GnuPG version 2.1.12 and thus there should be no need to disable
546              it.  The disable option allows to revert to the old behavior for
547              new keys; be aware that keys are never migrated back to the  old
548              format.   However if the enable option has been used the disable
549              option won't have an effect.  The advantage of the extended pri‐
550              vate  key  format  is  that it is text based and can carry addi‐
551              tional meta data.
552
553
554
555       --enable-ssh-support
556       --enable-putty-support
557
558              The OpenSSH Agent protocol is always enabled, but gpg-agent will
559              only set the SSH_AUTH_SOCK variable if this flag is given.
560
561              In this mode of operation, the agent does not only implement the
562              gpg-agent protocol, but also the agent protocol used by  OpenSSH
563              (through  a separate socket).  Consequently, it should be possi‐
564              ble to use the gpg-agent as a drop-in replacement for  the  well
565              known ssh-agent.
566
567              SSH  Keys,  which  are  to be used through the agent, need to be
568              added to the gpg-agent initially through  the  ssh-add  utility.
569              When  a  key  is added, ssh-add will ask for the password of the
570              provided key file and send the unprotected key material  to  the
571              agent;  this causes the gpg-agent to ask for a passphrase, which
572              is to be used for encrypting the newly received key and  storing
573              it in a gpg-agent specific directory.
574
575              Once  a  key  has been added to the gpg-agent this way, the gpg-
576              agent will be ready to use the key.
577
578              Note: in case the gpg-agent receives a  signature  request,  the
579              user might need to be prompted for a passphrase, which is neces‐
580              sary for decrypting the stored key.  Since the ssh-agent  proto‐
581              col  does not contain a mechanism for telling the agent on which
582              display/terminal it is running, gpg-agent's ssh-support will use
583              the  TTY  or  X  display  where  gpg-agent has been started.  To
584              switch this display to the current one,  the  following  command
585              may be used:
586
587         gpg-connect-agent updatestartuptty /bye
588
589       Although  all  GnuPG  components  try to start the gpg-agent as needed,
590       this is not possible for the ssh support  because  ssh  does  not  know
591       about it.  Thus if no GnuPG tool which accesses the agent has been run,
592       there is no guarantee that ssh is able to use gpg-agent for authentica‐
593       tion.   To fix this you may start gpg-agent if needed using this simple
594       command:
595
596         gpg-connect-agent /bye
597
598       Adding the --verbose shows the progress of starting the agent.
599
600       The --enable-putty-support is only available under Windows  and  allows
601       the  use of gpg-agent with the ssh implementation putty.  This is simi‐
602       lar to the regular ssh-agent support but makes use of  Windows  message
603       queue as required by putty.
604
605
606
607       --ssh-fingerprint-digest
608
609              Select  the  digest  algorithm  used to compute ssh fingerprints
610              that are communicated to the user,  e.g.  in  pinentry  dialogs.
611              OpenSSH  has  transitioned  from  using  MD5  to the more secure
612              SHA256.
613
614
615
616       --auto-expand-secmem n
617              Allow Libgcrypt to expand its secure memory  area  as  required.
618              The  optional value n is a non-negative integer with a suggested
619              size in bytes of each additionally allocated secure memory area.
620              The  value  is rounded up to the next 32 KiB; usual C style pre‐
621              fixes are allowed.  For an heavy loaded gpg-agent with many con‐
622              current connection this option avoids sign or decrypt errors due
623              to out of secure memory error returns.
624
625
626       --s2k-calibration milliseconds
627              Change the default calibration time to milliseconds.  The  given
628              value  is  capped at 60 seconds; a value of 0 resets to the com‐
629              piled-in default.  This option is re-read on a SIGHUP  (or  gpg‐
630              conf  --reload  gpg-agent)  and  the  S2K count is then re-cali‐
631              brated.
632
633
634       --s2k-count n
635              Specify the iteration count  used  to  protect  the  passphrase.
636              This option can be used to override the auto-calibration done by
637              default.  The auto-calibration computes a count  which  requires
638              by  default 100ms to mangle a given passphrase.  See also --s2k-
639              calibration.
640
641              To view the actually used iteration count and  the  milliseconds
642              required for an S2K operation use:
643
644         gpg-connect-agent 'GETINFO s2k_count' /bye
645         gpg-connect-agent 'GETINFO s2k_time' /bye
646
647       To view the auto-calibrated count use:
648
649         gpg-connect-agent 'GETINFO s2k_count_cal' /bye
650
651
652

EXAMPLES

654       It  is  important to set the environment variable GPG_TTY in your login
655       shell, for example in the ‘~/.bashrc’ init script:
656
657           export GPG_TTY=$(tty)
658
659       If you enabled the Ssh Agent Support, you also need to tell  ssh  about
660       it by adding this to your init script:
661
662         unset SSH_AGENT_PID
663         if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
664           export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
665         fi
666
667
668
669

FILES

671       There  are  a  few  configuration files needed for the operation of the
672       agent. By default they may all be found in the current  home  directory
673       (see: [option --homedir]).
674
675
676
677       gpg-agent.conf
678                This is the standard configuration file read by gpg-agent on
679                startup.  It may contain any valid long option; the leading
680                two dashes may not be entered and the option may not be abbre‐
681              viated.
682                This file is also read after a SIGHUP however only a few
683                options will actually have an effect.  This default  name  may
684              be
685                changed on the command line (see: [option --options]).
686                You should backup this file.
687
688
689       trustlist.txt
690                This  is  the  list  of  trusted keys.  You should backup this
691              file.
692
693                Comment lines, indicated by a leading hash mark,  as  well  as
694              empty
695                lines are ignored.  To mark a key as trusted you need to enter
696              its
697                fingerprint followed by  a  space  and  a  capital  letter  S.
698              Colons
699                may optionally be used to separate the bytes of a fingerprint;
700              this
701                enables cutting and pasting the fingerprint from a key listing
702              output.  If
703                the line is prefixed with a ! the key is explicitly marked as
704                not trusted.
705
706                Here  is  an  example  where two keys are marked as ultimately
707              trusted
708                and one as not trusted:
709
710                  .RS 2
711                # CN=Wurzel ZS 3,O=Intevation GmbH,C=DE
712                A6935DD34EF3087973C706FC311AA2CCF733765B S
713
714                # CN=PCA-1-Verwaltung-02/O=PKI-1-Verwaltung/C=DE
715                DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S
716
717                # CN=Root-CA/O=Schlapphuete/L=Pullach/C=DE
718                !14:56:98:D3:FE:9C:CA:5A:31:6E:BC:81:D3:11:4E:00:90:A3:44:C2 S
719                .fi
720
721       Before entering a key into this file, you need to ensure its
722       authenticity.  How to do this depends on your organisation; your
723       administrator might have already entered those keys which are deemed
724       trustworthy enough into this file.  Places where to look for the
725       fingerprint of a root certificate are letters received from the CA or
726       the website of the CA (after making 100% sure that this is indeed the
727       website of that CA).  You may want to consider disallowing interactive
728       updates of this file by using the [option --no-allow-mark-trusted].
729       It might even be advisable to change the permissions to read-only so
730       that this file can't be changed inadvertently.
731
732       As a special feature a line include-default will include a global
733       list of trusted certificates (e.g. ‘/etc/gnupg/trustlist.txt’).
734       This global list is also used if the local list is not available;
735       the [option --no-user-trustlist] enforces the use of only
736       this global list.
737
738       It is possible to add further flags after the S for use by the
739       caller:
740
741
742
743              relax  Relax checking of some root certificate requirements.  As of now this
744                     flag allows the use of root certificates with a missing basicConstraints
745                     attribute (despite that it is a MUST for CA certificates) and disables
746                     CRL checking for the root certificate.
747
748
749              cm     If validation of a certificate finally issued by a CA with this flag set
750                     fails, try again using the chain validation model.
751
752
753              qual   The CA is allowed to issue certificates for qualified signatures.
754                     This flag has an effect only if used in the global list.  This is now
755                     the preferred way to mark such CA; the old way of having a separate
756                     file ‘qualified.txt’ is still supported.
757
758
759
760
761       sshcontrol
762              This file is used when support for the secure shell agent protocol has
763              been enabled (see: [option --enable-ssh-support]). Only keys present in
764              this file are used in the SSH protocol.  You should backup this file.
765
766              The ssh-add tool may be used to add new entries to this file;
767              you may also add them manually.  Comment lines, indicated by a leading
768              hash mark, as well as empty lines are ignored.  An entry starts with
769              optional whitespace, followed by the keygrip of the key given as 40 hex
770              digits, optionally followed by the caching TTL in seconds and another
771              optional field for arbitrary flags.  A non-zero TTL overrides the global
772              default as set by --default-cache-ttl-ssh.
773
774              The only flag support is confirm.  If this flag is found for a
775              key, each use of the key will pop up a pinentry to confirm the use of
776              that key.  The flag is automatically set if a new key was loaded into
777              gpg-agent using the option -c of the ssh-add
778              command.
779
780              The keygrip may be prefixed with a ! to disable an entry.
781
782              The following example lists exactly one key.  Note that keys available
783              through a OpenPGP smartcard in the active smartcard reader are
784              implicitly added to this list; i.e. there is no need to list them.
785
786                # Key added on: 2011-07-20 20:38:46
787                # Fingerprint:  5e:8d:c4:ad:e7:af:6e:27:8a:d6:13:e4:79:ad:0b:81
788                34B62F25E277CF13D3C6BCEBFD3F85D08F0A864B 0 confirm
789
790
791       private-keys-v1.d/
792
793                This is the directory where gpg-agent stores the private keys.
794              Each
795                key  is  stored in a file with the name made up of the keygrip
796              and the
797                suffix ‘key’.  You should backup all files in this directory
798                and take great care to keep this backup closed away.
799
800
801
802       Note that on larger installations, it is useful to put predefined files
803       into the directory ‘/etc/skel/.gnupg’ so that newly created users start
804       up with a working configuration.  For existing users the a small helper
805       script is provided to create these files (see: [addgnupghome]).
806
807
808
809
810

SIGNALS

812       A  running  gpg-agent may be controlled by signals, i.e. using the kill
813       command to send a signal to the process.
814
815       Here is a list of supported signals:
816
817
818
819       SIGHUP This signal flushes all cached passphrases and  if  the  program
820              has  been  started  with a configuration file, the configuration
821              file is read again.  Only certain options  are  honored:  quiet,
822              verbose, debug, debug-all, debug-level, debug-pinentry, no-grab,
823              pinentry-program,  pinentry-invisible-char,   default-cache-ttl,
824              max-cache-ttl, ignore-cache-for-signing, s2k-count, no-allow-ex‐
825              ternal-cache, allow-emacs-pinentry, no-allow-mark-trusted,  dis‐
826              able-scdaemon,  and  disable-check-own-socket.  scdaemon-program
827              is also supported but due to the current  implementation,  which
828              calls  the  scdaemon only once, it is not of much use unless you
829              manually kill the scdaemon.
830
831
832
833       SIGTERM
834              Shuts down the process but waits until all current requests  are
835              fulfilled.   If  the process has received 3 of these signals and
836              requests are still pending, a shutdown is forced.
837
838
839       SIGINT Shuts down the process immediately.
840
841
842       SIGUSR1
843              Dump internal information to the log file.
844
845
846       SIGUSR2
847              This signal is used for internal purposes.
848
849

SEE ALSO

851       gpg(1), gpgsm(1), gpgconf(1), gpg-connect-agent(1), scdaemon(1)
852
853       The full documentation for this tool is maintained as a Texinfo manual.
854       If  GnuPG and the info program are properly installed at your site, the
855       command
856
857         info gnupg
858
859       should give you access to the complete manual including a  menu  struc‐
860       ture and an index.
861
862
863
864GnuPG 2.4.0                       2022-12-16                      GPG-AGENT(1)
Impressum