1 @c Copyright (C) 2002 Free Software Foundation, Inc.
2 @c This is part of the GnuPG manual.
3 @c For copying conditions, see the file gnupg.texi.
5 @node Invoking GPG-AGENT
6 @chapter Invoking GPG-AGENT
7 @cindex GPG-AGENT command options
8 @cindex command options
9 @cindex options, GPG-AGENT command
14 \- Secret key management for GnuPG
45 @command{gpg-agent} is a daemon to manage secret (private) keys
46 independently from any protocol. It is used as a backend for
47 @command{gpg} and @command{gpgsm} as well as for a couple of other
51 The usual way to run the agent is from the @code{~/.xsession} file:
54 eval `gpg-agent --daemon`
58 If you don't use an X server, you can also put this into your regular
59 startup file @code{~/.profile} or @code{.bash_profile}. It is best not
60 to run multiple instance of the @command{gpg-agent}, so you should make
61 sure that only one is running: @command{gpg-agent} uses an environment
62 variable to inform clients about the communication parameters. You can
63 write the content of this environment variable to a file so that you can
64 test for a running agent. This short script may do the job:
67 if test -f $HOME/.gpg-agent-info && \
68 kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null; then
69 GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info`
72 eval `gpg-agent --daemon`
73 echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
78 Note that the new option @option{--write-env-file} may be used instead.
82 You should always add the following lines to your @code{.bashrc} or
83 whatever initialization file is used for all shell invocations:
91 It is important that this environment variable always reflects the
92 output of the @code{tty} command. For W32 systems this option is not
95 Please make sure that a proper pinentry program has been installed
96 under the default filename (which is system dependant) or use the
97 option @code{pinentry-pgm} to specify the full name of that program.
98 It is often useful to install a symbolic link from the actual used
99 pinentry (e.g. @file{/usr/bin/pinentry-gtk}) to the expected
100 one (e.g. @file{/usr/bin/pinentry}).
104 @xref{Option Index},for an index to @command{GPG-AGENT}'s commands and options.
108 * Agent Commands:: List of all commands.
109 * Agent Options:: List of all options.
110 * Agent Configuration:: Configuration files.
111 * Agent Signals:: Use of some signals.
112 * Agent Examples:: Some usage examples.
113 * Agent Protocol:: The protocol the agent uses.
120 Commands are not distinguished from options execpt for the fact that
121 only one one command is allowed.
126 Print the program version and licensing information. Not that you can
127 abbreviate this command.
132 Print a usage message summarizing the most useful command-line options.
133 Not that you can abbreviate this command.
136 @opindex dump-options
137 Print a list of all available options and commands. Not that you can
138 abbreviate this command.
142 Run in server mode and wait for commands on the @code{stdin}. The
143 default mode is to create a socket and listen for commands there.
145 @item --daemon [@var{command line}]
147 Run the program in the background. This option is required to prevent
148 it from being accidently running in the background. A common way to do
152 $ eval `gpg-agent --daemon`
158 @section Option Summary
162 @anchor{option --options}
163 @item --options @var{file}
165 Reads configuration from @var{file} instead of from the default
166 per-user configuration file. The default configuration file is named
167 @file{gpg-agent.conf} and expected in the @file{.gnupg} directory directly
168 below the home directory of the user.
170 @anchor{option --homedir}
171 @include opt-homedir.texi
178 Outputs additional information while running.
179 You can increase the verbosity by giving several
180 verbose commands to @command{gpgsm}, such as @samp{-vv}.
186 Try to be as quiet as possible.
190 Don't invoke a pinentry or do any other thing requiring human interaction.
192 @item --faked-system-time @var{epoch}
193 @opindex faked-system-time
194 This option is only useful for testing; it sets the system time back or
195 forth to @var{epoch} which is the number of seconds elapsed since the year
198 @item --debug-level @var{level}
200 Select the debug level for investigating problems. @var{level} may be
207 some basic debug messages
209 more verbose debug messages
211 even more detailed messages
213 all of the debug messages you can get
216 How these messages are mapped to the actual debugging flags is not
217 specified and may change with newer releaes of this program. They are
218 however carefully selected to best aid in debugging.
220 @item --debug @var{flags}
222 This option is only useful for debugging and the behaviour may change at
223 any time without notice. FLAGS are bit encoded and may be given in
224 usual C-Syntax. The currently defined bits are:
228 X.509 or OpenPGP protocol related data
230 values of big number integers
232 low level crypto operations
238 show memory statistics.
240 write hashed data to files named @code{dbgmd-000*}
242 trace Assuan protocol
244 bypass all certificate validation
249 Same as @code{--debug=0xffffffff}
251 @item --debug-wait @var{n}
253 When running in server mode, wait @var{n} seconds before entering the
254 actual processing loop and print the pid. This gives time to attach a
259 Don't detach the process from the console. This is manly usefule for
270 Format the info output in daemon mode for use with the standard Bourne
271 shell respective the C-shell . The default ist to guess it based on the
272 environment variable @code{SHELL} which is in almost all cases
275 @item --write-env-file @var{file}
276 @opindex write-env-file
277 Often it is required to connect to the agent from a process not being an
278 inferior of @command{gpg-agent} and thus the environment variable with
279 the socket name is not available. To help setting up those variables in
280 other sessions, this option may be used to write the information into
281 @var{file}. If @var{file} is not specified the default name
282 @file{$@{HOME@}/.gpg-agent-info} will be used. The format is suitable
283 to be evaluated by a Bourne shell like in this simple example:
286 eval `cat @var{file}`
287 eval `cut -d= -f 1 < @var{file} | xargs echo export`
294 Tell the pinentryo not to grab the keyboard and mouse. This option
295 should in general not be used to avaoid X-sniffing attacks.
297 @item --log-file @var{file}
299 Append all logging output to @var{file}. This is very helpful in
300 seeing what the agent actually does.
302 @anchor{option --allow-mark-trusted}
303 @item --allow-mark-trusted
304 @opindex allow-mark-trusted
305 Allow clients to mark keys as trusted, i.e. put them into the
306 @file{trustlist.txt} file. This is by default not allowed to make it
307 harder for users to inadvertly accept Root-CA keys.
309 @item --ignore-cache-for-signing
310 @opindex ignore-cache-for-signing
311 This option will let @command{gpg-agent} bypass the passphrase cache for all
312 signing operation. Note that there is also a per-session option to
313 control this behaviour but this command line option takes precedence.
315 @item --default-cache-ttl @var{n}
316 @opindex default-cache-ttl
317 Set the time a cache entry is valid to @var{n} seconds. The default are
320 @item --default-cache-ttl-ssh @var{n}
321 @opindex default-cache-ttl
322 Set the time a cache entry used for SSH keys is valid to @var{n}
323 seconds. The default are 1800 seconds.
325 @item --max-cache-ttl @var{n}
326 @opindex max-cache-ttl
327 Set the maximum time a cache entry is valid to @var{n} seconds. After
328 this time a cache entry will get expired even if it has been accessed
329 recently. The default are 2 hours (7200 seconds).
331 @item --max-cache-ttl-ssh @var{n}
332 @opindex max-cache-ttl-ssh
333 Set the maximum time a cache entry used for SSH keys is valid to @var{n}
334 seconds. After this time a cache entry will get expired even if it has
335 been accessed recently. The default are 2 hours (7200 seconds).
337 @item --pinentry-program @var{filename}
338 @opindex pinentry-program
339 Use program @var{filename} as the PIN entry. The default is installation
340 dependend and can be shown with the @code{--version} command.
342 @item --scdaemon-program @var{filename}
343 @opindex scdaemon-program
344 Use program @var{filename} as the Smartcard daemon. The default is
345 installation dependend and can be shown with the @code{--version}
348 @item --disable-scdaemon
349 @opindex disable-scdaemon
350 Do not make use of the scdaemon tool. This option has the effect of
351 disabling the ability to do smartcard operations. Note, that enabling
352 this option at runtime does not kill an already forked scdaemon.
354 @item --use-standard-socket
355 @itemx --no-use-standard-socket
356 @opindex use-standard-socket
357 @opindex no-use-standard-socket
358 By enabling this option @command{gpg-agent} will listen on the socket
359 named @file{S.gpg-agent}, located in the home directory, and not create
360 a random socket below a temporary directory. Tools connecting to
361 @command{gpg-agent} should first try to connect to the socket given in
362 environment variable @var{GPG_AGENT_INFO} and the fall back to this
363 socket. This option may not be used if the home directory is mounted as
364 a remote file system.
367 Note, that as of now, W32 systems default to this option.
370 @item --display @var{string}
371 @itemx --ttyname @var{string}
372 @itemx --ttytype @var{string}
373 @itemx --lc-type @var{string}
374 @itemx --lc-messages @var{string}
380 These options are used with the server mode to pass localization
384 @itemx --keep-display
386 @opindex keep-display
387 Ignore requests to change change the current @code{tty} respective the X
388 window system's @code{DISPLAY} variable. This is useful to lock the
389 pinentry to pop up at the @code{tty} or display you started the agent.
391 @anchor{option --enable-ssh-support}
392 @item --enable-ssh-support
393 @opindex enable-ssh-support
395 Enable emulation of the OpenSSH Agent protocol.
397 In this mode of operation, the agent does not only implement the
398 gpg-agent protocol, but also the agent protocol used by OpenSSH
399 (through a seperate socket). Consequently, it should possible to use
400 the gpg-agent as a drop-in replacement for the well known ssh-agent.
402 SSH Keys, which are to be used through the agent, need to be added to
403 the gpg-agent initially through the ssh-add utility. When a key is
404 added, ssh-add will ask for the password of the provided key file and
405 send the unprotected key material to the agent; this causes the
406 gpg-agent to ask for a passphrase, which is to be used for encrypting
407 the newly received key and storing it in a gpg-agent specific
410 Once, a key has been added to the gpg-agent this way, the gpg-agent
411 will be ready to use the key.
413 Note: in case the gpg-agent receives a signature request, the user might
414 need to be prompted for a passphrase, which is necessary for decrypting
415 the stored key. Since the ssh-agent protocol does not contain a
416 mechanism for telling the agent on which display/terminal it is running,
417 gpg-agent's ssh-support will use the TTY or X display where gpg-agent
418 has been started. To switch this display to the current one, the
419 follwing command may be used:
422 echo UPDATESTARTUPTTY | gpg-connect-agent
429 All the long options may also be given in the configuration file after
430 stripping off the two leading dashes.
434 @node Agent Configuration
435 @section Configuration
437 There are a few configuration files needed for the operation of the
438 agent. By default they may all be found in the current home directory
439 (@pxref{option --homedir}).
444 @cindex gpg-agent.conf
445 This is the standard configuration file read by @command{gpg-agent} on
446 startup. It may contain any valid long option; the leading
447 two dashes may not be entered and the option may not be abbreviated.
448 This file is also read after a @code{SIGHUP} however only a few
449 options will actually have an effect. This default name may be
450 changed on the command line (@pxref{option --options}).
453 This is the list of trusted keys. Comment lines, indicated by a leading
454 hash mark, as well as empty lines are ignored. To mark a key as trusted
455 you need to enter its fingerprint followed by a space and a capital
456 letter @code{S}. Colons may optionally be used to separate the bytes of
457 a fingerprint; this allows to cut and paste the fingerprint from a key
460 Here is an example where two keys are marked as ultimately trusted:
463 # CN=Wurzel ZS 3,O=Intevation GmbH,C=DE
464 A6935DD34EF3087973C706FC311AA2CCF733765B S
466 # CN=PCA-1-Verwaltung-02/O=PKI-1-Verwaltung/C=DE
467 DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S
470 Before entering a key into this file, you need to ensure its
471 authenticity. How to do this depends on your organisation; your
472 administrator might have already entered those keys which are deemed
473 trustworthy enough into this file. Places where to look for the
474 fingerprint of a root certificate are letters received from the CA or
475 the website of the CA (after making 100% sure that this is indeed the
476 website of that CA). You may want to consider allowing interactive
477 updates of this file by using the @xref{option --allow-mark-trusted}.
478 This is however not as secure as maintaining this file manually. It is
479 even advisable to change the permissions to read-only so that this file
480 can't be changed inadvertently.
482 It is possible to add further flags after the @code{S} for use by the
483 caller. The only flag currently defined is @code{relax} to relax
484 checking of some root certificate requirements.
486 As a special feature a line @code{include-default} will include a global
487 list of trusted certificates (e.g. @file{/etc/gnupg/trustlist.txt}).
488 This global list is also used if the local list ios not available.
493 This file is used when support for the secure shell agent protocol has
494 been enabled (@pxref{option --enable-ssh-support}). Only keys present in
495 this file are used in the SSH protocol. The @command{ssh-add} tool y be
496 used to add new entries to this file; you may also add them manually.
497 Comment lines, indicated by a leading hash mark, as well as empty lines
498 are ignored. An entry starts with optional white spaces, followed by
499 the keygrip of the key given as 40 hex digits, optionally followed by
500 the caching TTL in seconds and another optional field for arbitrary
501 flags. A @code{!} may be prepended to the keygrip to disable this
504 The follwoing example lists exactly one key. Note that keys available
505 through a OpenPGP smartcard in the active smartcard reader are implictly
506 added to this list; i.e. there is no need to list them.
509 # Key added on 2005-02-25 15:08:29
510 5A6592BF45DC73BD876874A28FD4639282E29B52 0
513 @item private-keys-v1.d/
515 This is the directory where gpg-agent stores the private keys. Each
516 key is stored in a file with the name made up of the keygrip and the
522 Note that on larger installations, it is useful to put predefined
523 files into the directory @file{/etc/skel/.gnupg/} so that newly created
524 users start up with a working configuration. For existing users the
525 a small helper script is provied to create these files (@pxref{addgnupghome}).
534 @section Use of some signals.
535 A running @command{gpg-agent} may be controlled by signals, i.e. using
536 the @command{kill} command to send a signal to the process.
538 Here is a list of supported signals:
544 This signal flushes all chached passphrases and if the program has been
545 started with a configuration file, the configuration file is read again.
546 Only certain options are honored: @code{quiet}, @code{verbose},
547 @code{debug}, @code{debug-all}, @code{debug-level}, @code{no-grab},
548 @code{pinentry-program}, @code{default-cache-ttl}, @code{max-cache-ttl},
549 @code{ignore-cache-for-signing}, @code{allow-mark-trusted} and
550 @code{disable-scdaemon}. @code{scdaemon-program} is also supported but
551 due to the current implementation, which calls the scdaemon only once,
552 it is not of much use unless you manually kill the scdaemon.
557 Shuts down the process but waits until all current requests are
558 fulfilled. If the process has received 3 of these signals and requests
559 are still pending, a shutdown is forced.
563 Shuts down the process immediately.
567 Dump internal information to the log file.
571 This signal is used for internal purposes.
582 The usual way to invoke @command{gpg-agent} is
585 $ eval `gpg-agent --daemon`
588 An alternative way is by replacing @command{ssh-agent} with
589 @command{gpg-agent}. If for example @command{ssh-agent} is started as
590 part of the Xsession intialization you may simply replace
591 @command{ssh-agent} by a script like:
597 exec /usr/local/bin/gpg-agent --enable-ssh-support --daemon \
598 --write-env-file $@{HOME@}/.gpg-agent-info "$@@"
603 and add something like (for Bourne shells)
607 if [ -f "$@{HOME@}/.gpg-agent-info" ]; then
608 . "$@{HOME@}/.gpg-agent-info"
609 export GPG_AGENT_INFO
617 to your shell initialization file (e.g. @file{~/.bashrc}).
624 @section Agent's Assuan Protocol
626 Note: this section does only document the protocol, which is used by
627 GnuPG components; it does not deal with the ssh-agent protocol.
629 The @command{gpg-agent} should be started by the login shell and set an
630 environment variable to tell clients about the socket to be used.
631 Clients should deny to access an agent with a socket name which does
632 not match its own configuration. An application may choose to start
633 an instance of the gpgagent if it does not figure that any has been
634 started; it should not do this if a gpgagent is running but not
635 usable. Because @command{gpg-agent} can only be used in background mode, no
636 special command line option is required to activate the use of the
639 To identify a key we use a thing called keygrip which is the SHA-1 hash
640 of an canoncical encoded S-Expression of the the public key as used in
641 Libgcrypt. For the purpose of this interface the keygrip is given as a
642 hex string. The advantage of using this and not the hash of a
643 certificate is that it will be possible to use the same keypair for
644 different protocols, thereby saving space on the token used to keep the
648 * Agent PKDECRYPT:: Decrypting a session key
649 * Agent PKSIGN:: Signing a Hash
650 * Agent GENKEY:: Generating a Key
651 * Agent IMPORT:: Importing a Secret Key
652 * Agent EXPORT:: Exporting a Secret Key
653 * Agent ISTRUSTED:: Importing a Root Certificate
654 * Agent GET_PASSPHRASE:: Ask for a passphrase
655 * Agent GET_CONFIRMATION:: Ask for confirmation
656 * Agent HAVEKEY:: Check whether a key is available
657 * Agent LEARN:: Register a smartcard
658 * Agent PASSWD:: Change a Passphrase
659 * Agent UPDATESTARTUPTTY:: Change the Standard Display
662 @node Agent PKDECRYPT
663 @subsection Decrypting a session key
665 The client asks the server to decrypt a session key. The encrypted
666 session key should have all information needed to select the
667 appropriate secret key or to delegate it to a smartcard.
673 Tell the server about the key to be used for decryption. If this is
674 not used, @command{gpg-agent} may try to figure out the key by trying to
675 decrypt the message with each key available.
681 The agent checks whether this command is allowed and then does an
682 INQUIRY to get the ciphertext the client should then send the cipher
686 S: INQUIRE CIPHERTEXT
692 Please note that the server may send status info lines while reading the
693 data lines from the client. The data send is a SPKI like S-Exp with
699 (<param_name1> <mpi>)
701 (<param_namen> <mpi>)))
704 Where algo is a string with the name of the algorithm; see the libgcrypt
705 documentation for a list of valid algorithms. The number and names of
706 the parameters depend on the algorithm. The agent does return an error
707 if there is an inconsistency.
709 If the decryption was successful the decrypted data is returned by
712 Here is an example session:
716 S: INQUIRE CIPHERTEXT
717 C: D (enc-val elg (a 349324324)
718 C: D (b 3F444677CA)))
720 S: # session key follows
721 S: D (value 1234567890ABCDEF0)
722 S: OK descryption successful
727 @subsection Signing a Hash
729 The client ask the agent to sign a given hash value. A default key
730 will be chosen if no key has been set. To set a key a client first
737 This can be used multiple times to create multiple signature, the list
738 of keys is reset with the next PKSIGN command or a RESET. The server
739 test whether the key is a valid key to sign something and responds with
743 SETHASH --hash=<name>|<algo> <hexstring>
746 The client can use this command to tell the server about the data <hexstring>
747 (which usually is a hash) to be signed. <algo> is the decimal encoded hash
748 algorithm number as used by Libgcrypt. Either <algo> or --hash=<name>
749 must be given. Valid names for <name> are:
760 The actual signing is done using
766 Options are not yet defined, but my later be used to choosen among
767 different algorithms. The agent does then some checks, asks for the
768 passphrase and as a result the server returns the signature as an SPKI
769 like S-expression in "D" lines:
774 (<param_name1> <mpi>)
776 (<param_namen> <mpi>)))
780 The operation is affected by the option
783 OPTION use-cache-for-signing=0|1
786 The default of @code{1} uses the cache. Setting this option to @code{0}
787 will lead @command{gpg-agent} to ignore the passphrase cache. Note, that there is
788 also a global command line option for @command{gpg-agent} to globally disable the
792 Here is an example session:
800 S: # I did ask the user whether he really wants to sign
801 S: # I did ask the user for the passphrase
803 C: D ABCDEF012345678901234
805 S: # signature follows
806 S: D (sig-val rsa (s 45435453654612121212))
812 @subsection Generating a Key
814 This is used to create a new keypair and store the secret key inside the
815 active PSE -w which is in most cases a Soft-PSE. An not yet defined
816 option allows to choose the storage location. To get the secret key out
817 of the PSE, a special export tool has to be used.
823 Invokes the key generation process and the server will then inquire
824 on the generation parameters, like:
828 C: D (genkey (rsa (nbits 1024)))
832 The format of the key parameters which depends on the algorithm is of
838 (parameter_name_1 ....)
840 (parameter_name_n ....)))
843 If everything succeeds, the server returns the *public key* in a SPKI
844 like S-Expression like this:
853 Here is an example session:
858 C: D (genkey (rsa (nbits 1024)))
861 S: D (rsa (n 326487324683264) (e 10001)))
866 @subsection Importing a Secret Key
868 This operation is not yet supportted by GpgAgent. Specialized tools
869 are to be used for this.
871 There is no actual need because we can expect that secret keys
872 created by a 3rd party are stored on a smartcard. If we have
873 generated the key ourself, we do not need to import it.
876 @subsection Export a Secret Key
880 Should be done by an extra tool.
882 @node Agent ISTRUSTED
883 @subsection Importing a Root Certificate
885 Actually we do not import a Root Cert but provide a way to validate
886 any piece of data by storing its Hash along with a description and
887 an identifier in the PSE. Here is the interface desription:
890 ISTRUSTED <fingerprint>
893 Check whether the OpenPGP primary key or the X.509 certificate with the
894 given fingerprint is an ultimately trusted key or a trusted Root CA
895 certificate. The fingerprint should be given as a hexstring (without
896 any blanks or colons or whatever in between) and may be left padded with
897 00 in case of an MD5 fingerprint. GPGAgent will answer with:
903 The key is in the table of trusted keys.
906 ERR 304 (Not Trusted)
909 The key is not in this table.
911 Gpg needs the entire list of trusted keys to maintain the web of
912 trust; the following command is therefore quite helpful:
918 GpgAgent returns a list of trusted keys line by line:
921 S: D 000000001234454556565656677878AF2F1ECCFF P
922 S: D 340387563485634856435645634856438576457A P
923 S: D FEDC6532453745367FD83474357495743757435D S
927 The first item on a line is the hexified fingerprint where MD5
928 ingerprints are @code{00} padded to the left and the second item is a
929 flag to indicate the type of key (so that gpg is able to only take care
930 of PGP keys). P = OpenPGP, S = S/MIME. A client should ignore the rest
931 of the line, so that we can extend the format in the future.
933 Finally a client should be able to mark a key as trusted:
936 MARKTRUSTED @var{fingerprint} "P"|"S"
939 The server will then pop up a window to ask the user whether she
940 really trusts this key. For this it will probably ask for a text to
941 be displayed like this:
945 C: D Do you trust the key with the fingerprint @@FPR@@
946 C: D bla fasel blurb.
951 Known sequences with the pattern @@foo@@ are replaced according to this
956 Format the fingerprint according to gpg rules for a v3 keys.
958 Format the fingerprint according to gpg rules for a v4 keys.
960 Choose an appropriate format to format the fingerprint.
962 Replaced by a single @code{@@}
965 @node Agent GET_PASSPHRASE
966 @subsection Ask for a passphrase
968 This function is usually used to ask for a passphrase to be used for
969 conventional encryption, but may also be used by programs which need
970 special handling of passphrases. This command uses a syntax which helps
971 clients to use the agent with minimum effort.
974 GET_PASSPHRASE [--data] @var{cache_id} [@var{error_message} @var{prompt} @var{description}]
977 @var{cache_id} is expected to be a string used to identify a cached
978 passphrase. Use a @code{X} to bypass the cache. With no other
979 arguments the agent returns a cached passphrase or an error. By
980 convention either the hexified fingerprint of the key shall be used for
981 @var{cache_id} or an arbitrary string prefixed with the name of the
982 calling application and a colon: Like @code{gpg:somestring}.
984 @var{error_message} is either a single @code{X} for no error message or
985 a string to be shown as an error message like (e.g. "invalid
986 passphrase"). Blanks must be percent escaped or replaced by @code{+}'.
988 @var{prompt} is either a single @code{X} for a default prompt or the
989 text to be shown as the prompt. Blanks must be percent escaped or
990 replaced by @code{+}.
992 @var{description} is a text shown above the entry field. Blanks must be
993 percent escaped or replaced by @code{+}.
995 The agent either returns with an error or with a OK followed by the hex
996 encoded passphrase. Note that the length of the strings is implicitly
997 limited by the maximum length of a command. If the option
998 @option{--data} is used, the passphrase is not returned on the OK line
999 but by regular data lines; this is the preferred method.
1002 CLEAR_PASSPHRASE @var{cache_id}
1005 may be used to invalidate the cache entry for a passphrase. The
1006 function returns with OK even when there is no cached passphrase.
1009 @node Agent GET_CONFIRMATION
1010 @subsection Ask for confirmation
1012 This command may be used to ask for a simple confirmation by
1013 presenting a text and 2 bottonts: Okay and Cancel.
1016 GET_CONFIRMATION @var{description}
1019 @var{description}is displayed along with a Okay and Cancel
1020 button. Blanks must be percent escaped or replaced by @code{+}. A
1021 @code{X} may be used to display confirmation dialog with a default
1024 The agent either returns with an error or with a OK. Note, that the
1025 length of @var{description} is implicitly limited by the maximum
1026 length of a command.
1031 @subsection Check whether a key is available
1033 This can be used to see whether a secret key is available. It does
1034 not return any information on whether the key is somehow protected.
1037 HAVEKEY @var{keygrip}
1040 The Agent answers either with OK or @code{No_Secret_Key} (208). The
1041 caller may want to check for other error codes as well.
1045 @subsection Register a smartcard
1051 This command is used to register a smartcard. With the --send
1052 option given the certificates are send back.
1056 @subsection Change a Passphrase
1059 PASSWD @var{keygrip}
1062 This command is used to interactively change the passphrase of the key
1063 indentified by the hex string @var{keygrip}.
1066 @node Agent UPDATESTARTUPTTY
1067 @subsection Change the standard display
1073 Set the startup TTY and X-DISPLAY variables to the values of this
1074 session. This command is useful to direct future pinentry invocations
1075 to another screen. It is only required because there is no way in the
1076 ssh-agent protocol to convey this information.
1083 @command{gpg-connect-agent}(1),
1084 @command{scdaemon}(1)
1086 @include see-also-note.texi