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 As a special feature a line @code{include-default} will include a global
483 list of trusted certificates (e.g. @file{/etc/gnupg/trustlist.txt}).
484 This global list is also used if the local list ios not available.
489 This file is used when support for the secure shell agent protocol has
490 been enabled (@pxref{option --enable-ssh-support}). Only keys present in
491 this file are used in the SSH protocol. The @command{ssh-add} tool y be
492 used to add new entries to this file; you may also add them manually.
493 Comment lines, indicated by a leading hash mark, as well as empty lines
494 are ignored. An entry starts with optional white spaces, followed by
495 the keygrip of the key given as 40 hex digits, optionally followed by
496 the caching TTL in seconds and another optional field for arbitrary
497 flags. A @code{!} may be prepended to the keygrip to disable this
500 The follwoing example lists exactly one key. Note that keys available
501 through a OpenPGP smartcard in the active smartcard reader are implictly
502 added to this list; i.e. there is no need to list them.
505 # Key added on 2005-02-25 15:08:29
506 5A6592BF45DC73BD876874A28FD4639282E29B52 0
509 @item private-keys-v1.d/
511 This is the directory where gpg-agent stores the private keys. Each
512 key is stored in a file with the name made up of the keygrip and the
518 Note that on larger installations, it is useful to put predefined
519 files into the directory @file{/etc/skel/.gnupg/} so that newly created
520 users start up with a working configuration. For existing users the
521 a small helper script is provied to create these files (@pxref{addgnupghome}).
530 @section Use of some signals.
531 A running @command{gpg-agent} may be controlled by signals, i.e. using
532 the @command{kill} command to send a signal to the process.
534 Here is a list of supported signals:
540 This signal flushes all chached passphrases and if the program has been
541 started with a configuration file, the configuration file is read again.
542 Only certain options are honored: @code{quiet}, @code{verbose},
543 @code{debug}, @code{debug-all}, @code{debug-level}, @code{no-grab},
544 @code{pinentry-program}, @code{default-cache-ttl}, @code{max-cache-ttl},
545 @code{ignore-cache-for-signing}, @code{allow-mark-trusted} and
546 @code{disable-scdaemon}. @code{scdaemon-program} is also supported but
547 due to the current implementation, which calls the scdaemon only once,
548 it is not of much use unless you manually kill the scdaemon.
553 Shuts down the process but waits until all current requests are
554 fulfilled. If the process has received 3 of these signals and requests
555 are still pending, a shutdown is forced.
559 Shuts down the process immediately.
563 Dump internal information to the log file.
567 This signal is used for internal purposes.
578 The usual way to invoke @command{gpg-agent} is
581 $ eval `gpg-agent --daemon`
584 An alternative way is by replacing @command{ssh-agent} with
585 @command{gpg-agent}. If for example @command{ssh-agent} is started as
586 part of the Xsession intialization you may simply replace
587 @command{ssh-agent} by a script like:
593 exec /usr/local/bin/gpg-agent --enable-ssh-support --daemon \
594 --write-env-file $@{HOME@}/.gpg-agent-info "$@@"
599 and add something like (for Bourne shells)
603 if [ -f "$@{HOME@}/.gpg-agent-info" ]; then
604 . "$@{HOME@}/.gpg-agent-info"
605 export GPG_AGENT_INFO
613 to your shell initialization file (e.g. @file{~/.bashrc}).
620 @section Agent's Assuan Protocol
622 Note: this section does only document the protocol, which is used by
623 GnuPG components; it does not deal with the ssh-agent protocol.
625 The @command{gpg-agent} should be started by the login shell and set an
626 environment variable to tell clients about the socket to be used.
627 Clients should deny to access an agent with a socket name which does
628 not match its own configuration. An application may choose to start
629 an instance of the gpgagent if it does not figure that any has been
630 started; it should not do this if a gpgagent is running but not
631 usable. Because @command{gpg-agent} can only be used in background mode, no
632 special command line option is required to activate the use of the
635 To identify a key we use a thing called keygrip which is the SHA-1 hash
636 of an canoncical encoded S-Expression of the the public key as used in
637 Libgcrypt. For the purpose of this interface the keygrip is given as a
638 hex string. The advantage of using this and not the hash of a
639 certificate is that it will be possible to use the same keypair for
640 different protocols, thereby saving space on the token used to keep the
644 * Agent PKDECRYPT:: Decrypting a session key
645 * Agent PKSIGN:: Signing a Hash
646 * Agent GENKEY:: Generating a Key
647 * Agent IMPORT:: Importing a Secret Key
648 * Agent EXPORT:: Exporting a Secret Key
649 * Agent ISTRUSTED:: Importing a Root Certificate
650 * Agent GET_PASSPHRASE:: Ask for a passphrase
651 * Agent GET_CONFIRMATION:: Ask for confirmation
652 * Agent HAVEKEY:: Check whether a key is available
653 * Agent LEARN:: Register a smartcard
654 * Agent PASSWD:: Change a Passphrase
655 * Agent UPDATESTARTUPTTY:: Change the Standard Display
658 @node Agent PKDECRYPT
659 @subsection Decrypting a session key
661 The client asks the server to decrypt a session key. The encrypted
662 session key should have all information needed to select the
663 appropriate secret key or to delegate it to a smartcard.
669 Tell the server about the key to be used for decryption. If this is
670 not used, @command{gpg-agent} may try to figure out the key by trying to
671 decrypt the message with each key available.
677 The agent checks whether this command is allowed and then does an
678 INQUIRY to get the ciphertext the client should then send the cipher
682 S: INQUIRE CIPHERTEXT
688 Please note that the server may send status info lines while reading the
689 data lines from the client. The data send is a SPKI like S-Exp with
695 (<param_name1> <mpi>)
697 (<param_namen> <mpi>)))
700 Where algo is a string with the name of the algorithm; see the libgcrypt
701 documentation for a list of valid algorithms. The number and names of
702 the parameters depend on the algorithm. The agent does return an error
703 if there is an inconsistency.
705 If the decryption was successful the decrypted data is returned by
708 Here is an example session:
712 S: INQUIRE CIPHERTEXT
713 C: D (enc-val elg (a 349324324)
714 C: D (b 3F444677CA)))
716 S: # session key follows
717 S: D (value 1234567890ABCDEF0)
718 S: OK descryption successful
723 @subsection Signing a Hash
725 The client ask the agent to sign a given hash value. A default key
726 will be chosen if no key has been set. To set a key a client first
733 This can be used multiple times to create multiple signature, the list
734 of keys is reset with the next PKSIGN command or a RESET. The server
735 test whether the key is a valid key to sign something and responds with
742 The client can use this command to tell the server about the data
743 (which usually is a hash) to be signed.
745 The actual signing is done using
751 Options are not yet defined, but my later be used to choosen among
752 different algorithms (e.g. pkcs 1.5)
754 The agent does then some checks, asks for the passphrase and
755 if SETHASH has not been used asks the client for the data to sign:
759 C: D ABCDEF012345678901234
763 As a result the server returns the signature as an SPKI like S-Exp
769 (<param_name1> <mpi>)
771 (<param_namen> <mpi>)))
775 The operation is affected by the option
778 OPTION use-cache-for-signing=0|1
781 The default of @code{1} uses the cache. Setting this option to @code{0}
782 will lead @command{gpg-agent} to ignore the passphrase cache. Note, that there is
783 also a global command line option for @command{gpg-agent} to globally disable the
787 Here is an example session:
795 S: # I did ask the user whether he really wants to sign
796 S: # I did ask the user for the passphrase
798 C: D ABCDEF012345678901234
800 S: # signature follows
801 S: D (sig-val rsa (s 45435453654612121212))
807 @subsection Generating a Key
809 This is used to create a new keypair and store the secret key inside the
810 active PSE -w which is in most cases a Soft-PSE. An not yet defined
811 option allows to choose the storage location. To get the secret key out
812 of the PSE, a special export tool has to be used.
818 Invokes the key generation process and the server will then inquire
819 on the generation parameters, like:
823 C: D (genkey (rsa (nbits 1024)))
827 The format of the key parameters which depends on the algorithm is of
833 (parameter_name_1 ....)
835 (parameter_name_n ....)))
838 If everything succeeds, the server returns the *public key* in a SPKI
839 like S-Expression like this:
848 Here is an example session:
853 C: D (genkey (rsa (nbits 1024)))
856 S: D (rsa (n 326487324683264) (e 10001)))
861 @subsection Importing a Secret Key
863 This operation is not yet supportted by GpgAgent. Specialized tools
864 are to be used for this.
866 There is no actual need because we can expect that secret keys
867 created by a 3rd party are stored on a smartcard. If we have
868 generated the key ourself, we do not need to import it.
871 @subsection Export a Secret Key
875 Should be done by an extra tool.
877 @node Agent ISTRUSTED
878 @subsection Importing a Root Certificate
880 Actually we do not import a Root Cert but provide a way to validate
881 any piece of data by storing its Hash along with a description and
882 an identifier in the PSE. Here is the interface desription:
885 ISTRUSTED <fingerprint>
888 Check whether the OpenPGP primary key or the X.509 certificate with the
889 given fingerprint is an ultimately trusted key or a trusted Root CA
890 certificate. The fingerprint should be given as a hexstring (without
891 any blanks or colons or whatever in between) and may be left padded with
892 00 in case of an MD5 fingerprint. GPGAgent will answer with:
898 The key is in the table of trusted keys.
901 ERR 304 (Not Trusted)
904 The key is not in this table.
906 Gpg needs the entire list of trusted keys to maintain the web of
907 trust; the following command is therefore quite helpful:
913 GpgAgent returns a list of trusted keys line by line:
916 S: D 000000001234454556565656677878AF2F1ECCFF P
917 S: D 340387563485634856435645634856438576457A P
918 S: D FEDC6532453745367FD83474357495743757435D S
922 The first item on a line is the hexified fingerprint where MD5
923 ingerprints are @code{00} padded to the left and the second item is a
924 flag to indicate the type of key (so that gpg is able to only take care
925 of PGP keys). P = OpenPGP, S = S/MIME. A client should ignore the rest
926 of the line, so that we can extend the format in the future.
928 Finally a client should be able to mark a key as trusted:
931 MARKTRUSTED @var{fingerprint} "P"|"S"
934 The server will then pop up a window to ask the user whether she
935 really trusts this key. For this it will probably ask for a text to
936 be displayed like this:
940 C: D Do you trust the key with the fingerprint @@FPR@@
941 C: D bla fasel blurb.
946 Known sequences with the pattern @@foo@@ are replaced according to this
951 Format the fingerprint according to gpg rules for a v3 keys.
953 Format the fingerprint according to gpg rules for a v4 keys.
955 Choose an appropriate format to format the fingerprint.
957 Replaced by a single @code{@@}
960 @node Agent GET_PASSPHRASE
961 @subsection Ask for a passphrase
963 This function is usually used to ask for a passphrase to be used for
964 conventional encryption, but may also be used by programs which need
965 special handling of passphrases. This command uses a syntax which helps
966 clients to use the agent with minimum effort.
969 GET_PASSPHRASE @var{cache_id} [@var{error_message} @var{prompt} @var{description}]
972 @var{cache_id} is expected to be a hex string used for caching a
973 passphrase. Use a @code{X} to bypass the cache. With no other
974 arguments the agent returns a cached passphrase or an error.
976 @var{error_message} is either a single @code{X} for no error message or
977 a string to be shown as an error message like (e.g. "invalid
978 passphrase"). Blanks must be percent escaped or replaced by @code{+}'.
980 @var{prompt} is either a single @code{X} for a default prompt or the
981 text to be shown as the prompt. Blanks must be percent escaped or
982 replaced by @code{+}.
984 @var{description} is a text shown above the entry field. Blanks must be
985 percent escaped or replaced by @code{+}.
987 The agent either returns with an error or with a OK followed by the
988 hex encoded passphrase. Note that the length of the strings is
989 implicitly limited by the maximum length of a command.
992 CLEAR_PASSPHRASE @var{cache_id}
995 may be used to invalidate the cache entry for a passphrase. The
996 function returns with OK even when there is no cached passphrase.
999 @node Agent GET_CONFIRMATION
1000 @subsection Ask for confirmation
1002 This command may be used to ask for a simple confirmation by
1003 presenting a text and 2 bottonts: Okay and Cancel.
1006 GET_CONFIRMATION @var{description}
1009 @var{description}is displayed along with a Okay and Cancel
1010 button. Blanks must be percent escaped or replaced by @code{+}. A
1011 @code{X} may be used to display confirmation dialog with a default
1014 The agent either returns with an error or with a OK. Note, that the
1015 length of @var{description} is implicitly limited by the maximum
1016 length of a command.
1021 @subsection Check whether a key is available
1023 This can be used to see whether a secret key is available. It does
1024 not return any information on whether the key is somehow protected.
1027 HAVEKEY @var{keygrip}
1030 The Agent answers either with OK or @code{No_Secret_Key} (208). The
1031 caller may want to check for other error codes as well.
1035 @subsection Register a smartcard
1041 This command is used to register a smartcard. With the --send
1042 option given the certificates are send back.
1046 @subsection Change a Passphrase
1049 PASSWD @var{keygrip}
1052 This command is used to interactively change the passphrase of the key
1053 indentified by the hex string @var{keygrip}.
1056 @node Agent UPDATESTARTUPTTY
1057 @subsection Change the standard display
1063 Set the startup TTY and X-DISPLAY variables to the values of this
1064 session. This command is useful to direct future pinentry invocations
1065 to another screen. It is only required because there is no way in the
1066 ssh-agent protocol to convey this information.
1073 @command{gpg-connect-agent}(1),
1074 @command{scdaemon}(1)
1076 @include see-also-note.texi