1This is gnupg.info, produced by makeinfo version 6.5 from gnupg.texi.
2
3This is the 'The GNU Privacy Guard Manual' (version 2.3.3-beta5, October
42021).
5
6   (C) 2002, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
7(C) 2013, 2014, 2015 Werner Koch.
8(C) 2015, 2016, 2017 g10 Code GmbH.
9
10     Permission is granted to copy, distribute and/or modify this
11     document under the terms of the GNU General Public License as
12     published by the Free Software Foundation; either version 3 of the
13     License, or (at your option) any later version.  The text of the
14     license can be found in the section entitled "Copying".
15INFO-DIR-SECTION GNU Utilities
16START-INFO-DIR-ENTRY
17* gpg2: (gnupg).           OpenPGP encryption and signing tool.
18* gpgsm: (gnupg).          S/MIME encryption and signing tool.
19* gpg-agent: (gnupg).      The secret key daemon.
20* dirmngr: (gnupg).        X.509 CRL and OCSP server.
21* dirmngr-client: (gnupg). X.509 CRL and OCSP client.
22END-INFO-DIR-ENTRY
23
24
25File: gnupg.info,  Node: GPGSM Examples,  Next: Unattended Usage,  Prev: GPGSM Configuration,  Up: Invoking GPGSM
26
275.4 Examples
28============
29
30     $ gpgsm -er goo@bar.net <plaintext >ciphertext
31
32
33File: gnupg.info,  Node: Unattended Usage,  Next: GPGSM Protocol,  Prev: GPGSM Examples,  Up: Invoking GPGSM
34
355.5 Unattended Usage
36====================
37
38'gpgsm' is often used as a backend engine by other software.  To help
39with this a machine interface has been defined to have an unambiguous
40way to do this.  This is most likely used with the '--server' command
41but may also be used in the standard operation mode by using the
42'--status-fd' option.
43
44* Menu:
45
46* Automated signature checking::  Automated signature checking.
47* CSR and certificate creation::  CSR and certificate creation.
48
49
50File: gnupg.info,  Node: Automated signature checking,  Next: CSR and certificate creation,  Up: Unattended Usage
51
525.5.1 Automated signature checking
53----------------------------------
54
55It is very important to understand the semantics used with signature
56verification.  Checking a signature is not as simple as it may sound and
57so the operation is a bit complicated.  In most cases it is required to
58look at several status lines.  Here is a table of all cases a signed
59message may have:
60
61The signature is valid
62     This does mean that the signature has been successfully verified,
63     the certificates are all sane.  However there are two subcases with
64     important information: One of the certificates may have expired or
65     a signature of a message itself as expired.  It is a sound practise
66     to consider such a signature still as valid but additional
67     information should be displayed.  Depending on the subcase 'gpgsm'
68     will issue these status codes:
69     signature valid and nothing did expire
70          'GOODSIG', 'VALIDSIG', 'TRUST_FULLY'
71     signature valid but at least one certificate has expired
72          'EXPKEYSIG', 'VALIDSIG', 'TRUST_FULLY'
73     signature valid but expired
74          'EXPSIG', 'VALIDSIG', 'TRUST_FULLY' Note, that this case is
75          currently not implemented.
76
77The signature is invalid
78     This means that the signature verification failed (this is an
79     indication of a transfer error, a program error or tampering with
80     the message).  'gpgsm' issues one of these status codes sequences:
81     'BADSIG'
82     'GOODSIG, VALIDSIG TRUST_NEVER'
83
84Error verifying a signature
85     For some reason the signature could not be verified, i.e.  it
86     cannot be decided whether the signature is valid or invalid.  A
87     common reason for this is a missing certificate.
88
89
90File: gnupg.info,  Node: CSR and certificate creation,  Prev: Automated signature checking,  Up: Unattended Usage
91
925.5.2 CSR and certificate creation
93----------------------------------
94
95The command '--generate-key' may be used along with the option '--batch'
96to either create a certificate signing request (CSR) or an X.509
97certificate.  This is controlled by a parameter file; the format of this
98file is as follows:
99
100   * Text only, line length is limited to about 1000 characters.
101   * UTF-8 encoding must be used to specify non-ASCII characters.
102   * Empty lines are ignored.
103   * Leading and trailing while space is ignored.
104   * A hash sign as the first non white space character indicates a
105     comment line.
106   * Control statements are indicated by a leading percent sign, the
107     arguments are separated by white space from the keyword.
108   * Parameters are specified by a keyword, followed by a colon.
109     Arguments are separated by white space.
110   * The first parameter must be 'Key-Type', control statements may be
111     placed anywhere.
112   * The order of the parameters does not matter except for 'Key-Type'
113     which must be the first parameter.  The parameters are only used
114     for the generated CSR/certificate; parameters from previous sets
115     are not used.  Some syntactically checks may be performed.
116   * Key generation takes place when either the end of the parameter
117     file is reached, the next 'Key-Type' parameter is encountered or at
118     the control statement '%commit' is encountered.
119
120Control statements:
121
122%echo TEXT
123     Print TEXT as diagnostic.
124
125%dry-run
126     Suppress actual key generation (useful for syntax checking).
127
128%commit
129     Perform the key generation.  Note that an implicit commit is done
130     at the next Key-Type parameter.
131
132General Parameters:
133
134Key-Type: ALGO
135     Starts a new parameter block by giving the type of the primary key.
136     The algorithm must be capable of signing.  This is a required
137     parameter.  The supported values for ALGO are 'rsa', 'ecdsa', and
138     'eddsa'.
139
140Key-Length: NBITS
141     The requested length of a generated key in bits.  Defaults to 3072.
142     The value is ignored for ECC algorithms.
143
144Key-Grip: HEXSTRING
145     This is optional and used to generate a CSR or certificate for an
146     already existing key.  Key-Length will be ignored when given.
147
148Key-Usage: USAGE-LIST
149     Space or comma delimited list of key usage, allowed values are
150     'encrypt', 'sign' and 'cert'.  This is used to generate the
151     keyUsage extension.  Please make sure that the algorithm is capable
152     of this usage.  Default is to allow encrypt and sign.
153
154Name-DN: SUBJECT-NAME
155     This is the Distinguished Name (DN) of the subject in RFC-2253
156     format.
157
158Name-Email: STRING
159     This is an email address for the altSubjectName.  This parameter is
160     optional but may occur several times to add several email addresses
161     to a certificate.
162
163Name-DNS: STRING
164     The is an DNS name for the altSubjectName.  This parameter is
165     optional but may occur several times to add several DNS names to a
166     certificate.
167
168Name-URI: STRING
169     This is an URI for the altSubjectName.  This parameter is optional
170     but may occur several times to add several URIs to a certificate.
171
172Additional parameters used to create a certificate (in contrast to a
173certificate signing request):
174
175Serial: SN
176     If this parameter is given an X.509 certificate will be generated.
177     SN is expected to be a hex string representing an unsigned integer
178     of arbitrary length.  The special value 'random' can be used to
179     create a 64 bit random serial number.
180
181Issuer-DN: ISSUER-NAME
182     This is the DN name of the issuer in RFC-2253 format.  If it is not
183     set it will default to the subject DN and a special GnuPG extension
184     will be included in the certificate to mark it as a standalone
185     certificate.
186
187Creation-Date: ISO-DATE
188Not-Before: ISO-DATE
189     Set the notBefore date of the certificate.  Either a date like
190     '1986-04-26' or '1986-04-26 12:00' or a standard ISO timestamp like
191     '19860426T042640' may be used.  The time is considered to be UTC.
192     If it is not given the current date is used.
193
194Expire-Date: ISO-DATE
195Not-After: ISO-DATE
196     Set the notAfter date of the certificate.  Either a date like
197     '2063-04-05' or '2063-04-05 17:00' or a standard ISO timestamp like
198     '20630405T170000' may be used.  The time is considered to be UTC.
199     If it is not given a default value in the not too far future is
200     used.
201
202Signing-Key: KEYGRIP
203     This gives the keygrip of the key used to sign the certificate.  If
204     it is not given a self-signed certificate will be created.  For
205     compatibility with future versions, it is suggested to prefix the
206     keygrip with a '&'.
207
208Hash-Algo: HASH-ALGO
209     Use HASH-ALGO for this CSR or certificate.  The supported hash
210     algorithms are: 'sha1', 'sha256', 'sha384' and 'sha512'; they may
211     also be specified with uppercase letters.  The default is 'sha256'.
212
213Authority-Key-Id: HEXSTRING
214     Insert the decoded value of HEXSTRING as authorityKeyIdentifier.
215     If this is not given and an ECC algorithm is used the public part
216     of the certified public key is used as authorityKeyIdentifier.  To
217     inhibit any authorityKeyIdentifier use the special value 'none' for
218     HEXSTRING.
219
220Subject-Key-Id: HEXSTRING
221     Insert the decoded value of HEXSTRING as subjectKeyIdentifier.  If
222     this is not given and an ECC algorithm is used the public part of
223     the signing key is used as authorityKeyIdentifier.  To inhibit any
224     subjectKeyIdentifier use the special value 'none' for HEXSTRING.
225
226
227File: gnupg.info,  Node: GPGSM Protocol,  Prev: Unattended Usage,  Up: Invoking GPGSM
228
2295.6 The Protocol the Server Mode Uses
230=====================================
231
232Description of the protocol used to access 'GPGSM'.  'GPGSM' does
233implement the Assuan protocol and in addition provides a regular command
234line interface which exhibits a full client to this protocol (but uses
235internal linking).  To start 'gpgsm' as a server the command line the
236option '--server' must be used.  Additional options are provided to
237select the communication method (i.e.  the name of the socket).
238
239   We assume that the connection has already been established; see the
240Assuan manual for details.
241
242* Menu:
243
244* GPGSM ENCRYPT::         Encrypting a message.
245* GPGSM DECRYPT::         Decrypting a message.
246* GPGSM SIGN::            Signing a message.
247* GPGSM VERIFY::          Verifying a message.
248* GPGSM GENKEY::          Generating a key.
249* GPGSM LISTKEYS::        List available keys.
250* GPGSM EXPORT::          Export certificates.
251* GPGSM IMPORT::          Import certificates.
252* GPGSM DELETE::          Delete certificates.
253* GPGSM GETAUDITLOG::     Retrieve an audit log.
254* GPGSM GETINFO::         Information about the process
255* GPGSM OPTION::          Session options.
256
257
258File: gnupg.info,  Node: GPGSM ENCRYPT,  Next: GPGSM DECRYPT,  Up: GPGSM Protocol
259
2605.6.1 Encrypting a Message
261--------------------------
262
263Before encryption can be done the recipient must be set using the
264command:
265
266       RECIPIENT USERID
267
268   Set the recipient for the encryption.  USERID should be the internal
269representation of the key; the server may accept any other way of
270specification.  If this is a valid and trusted recipient the server does
271respond with OK, otherwise the return is an ERR with the reason why the
272recipient cannot be used, the encryption will then not be done for this
273recipient.  If the policy is not to encrypt at all if not all recipients
274are valid, the client has to take care of this.  All 'RECIPIENT'
275commands are cumulative until a 'RESET' or an successful 'ENCRYPT'
276command.
277
278       INPUT FD[=N] [--armor|--base64|--binary]
279
280   Set the file descriptor for the message to be encrypted to N.
281Obviously the pipe must be open at that point, the server establishes
282its own end.  If the server returns an error the client should consider
283this session failed.  If N is not given, this commands uses the last
284file descriptor passed to the application.  *Note the assuan_sendfd
285function: (assuan)fun-assuan_sendfd, on how to do descriptor passing.
286
287   The '--armor' option may be used to advise the server that the input
288data is in PEM format, '--base64' advises that a raw base-64 encoding is
289used, '--binary' advises of raw binary input (BER).  If none of these
290options is used, the server tries to figure out the used encoding, but
291this may not always be correct.
292
293       OUTPUT FD[=N] [--armor|--base64]
294
295   Set the file descriptor to be used for the output (i.e.  the
296encrypted message).  Obviously the pipe must be open at that point, the
297server establishes its own end.  If the server returns an error the
298client should consider this session failed.
299
300   The option '--armor' encodes the output in PEM format, the '--base64'
301option applies just a base-64 encoding.  No option creates binary output
302(BER).
303
304   The actual encryption is done using the command
305
306       ENCRYPT
307
308   It takes the plaintext from the 'INPUT' command, writes to the
309ciphertext to the file descriptor set with the 'OUTPUT' command, take
310the recipients from all the recipients set so far.  If this command
311fails the clients should try to delete all output currently done or
312otherwise mark it as invalid.  'GPGSM' does ensure that there will not
313be any security problem with leftover data on the output in this case.
314
315   This command should in general not fail, as all necessary checks have
316been done while setting the recipients.  The input and output pipes are
317closed.
318
319
320File: gnupg.info,  Node: GPGSM DECRYPT,  Next: GPGSM SIGN,  Prev: GPGSM ENCRYPT,  Up: GPGSM Protocol
321
3225.6.2 Decrypting a message
323--------------------------
324
325Input and output FDs are set the same way as in encryption, but 'INPUT'
326refers to the ciphertext and 'OUTPUT' to the plaintext.  There is no
327need to set recipients.  'GPGSM' automatically strips any S/MIME headers
328from the input, so it is valid to pass an entire MIME part to the INPUT
329pipe.
330
331   The decryption is done by using the command
332
333       DECRYPT
334
335   It performs the decrypt operation after doing some check on the
336internal state (e.g.  that all needed data has been set).  Because it
337utilizes the GPG-Agent for the session key decryption, there is no need
338to ask the client for a protecting passphrase - GpgAgent takes care of
339this by requesting this from the user.
340
341
342File: gnupg.info,  Node: GPGSM SIGN,  Next: GPGSM VERIFY,  Prev: GPGSM DECRYPT,  Up: GPGSM Protocol
343
3445.6.3 Signing a Message
345-----------------------
346
347Signing is usually done with these commands:
348
349       INPUT FD[=N] [--armor|--base64|--binary]
350
351   This tells 'GPGSM' to read the data to sign from file descriptor N.
352
353       OUTPUT FD[=M] [--armor|--base64]
354
355   Write the output to file descriptor M.  If a detached signature is
356requested, only the signature is written.
357
358       SIGN [--detached]
359
360   Sign the data set with the 'INPUT' command and write it to the sink
361set by 'OUTPUT'.  With '--detached', a detached signature is created
362(surprise).
363
364   The key used for signing is the default one or the one specified in
365the configuration file.  To get finer control over the keys, it is
366possible to use the command
367
368       SIGNER USERID
369
370   to set the signer's key.  USERID should be the internal
371representation of the key; the server may accept any other way of
372specification.  If this is a valid and trusted recipient the server does
373respond with OK, otherwise the return is an ERR with the reason why the
374key cannot be used, the signature will then not be created using this
375key.  If the policy is not to sign at all if not all keys are valid, the
376client has to take care of this.  All 'SIGNER' commands are cumulative
377until a 'RESET' is done.  Note that a 'SIGN' does not reset this list of
378signers which is in contrast to the 'RECIPIENT' command.
379
380
381File: gnupg.info,  Node: GPGSM VERIFY,  Next: GPGSM GENKEY,  Prev: GPGSM SIGN,  Up: GPGSM Protocol
382
3835.6.4 Verifying a Message
384-------------------------
385
386To verify a message the command:
387
388       VERIFY
389
390   is used.  It does a verify operation on the message send to the input
391FD. The result is written out using status lines.  If an output FD was
392given, the signed text will be written to that.  If the signature is a
393detached one, the server will inquire about the signed material and the
394client must provide it.
395
396
397File: gnupg.info,  Node: GPGSM GENKEY,  Next: GPGSM LISTKEYS,  Prev: GPGSM VERIFY,  Up: GPGSM Protocol
398
3995.6.5 Generating a Key
400----------------------
401
402This is used to generate a new keypair, store the secret part in the PSE
403and the public key in the key database.  We will probably add optional
404commands to allow the client to select whether a hardware token is used
405to store the key.  Configuration options to 'GPGSM' can be used to
406restrict the use of this command.
407
408       GENKEY
409
410   'GPGSM' checks whether this command is allowed and then does an
411INQUIRY to get the key parameters, the client should then send the key
412parameters in the native format:
413
414         S: INQUIRE KEY_PARAM native
415         C: D foo:fgfgfg
416         C: D bar
417         C: END
418
419   Please note that the server may send Status info lines while reading
420the data lines from the client.  After this the key generation takes
421place and the server eventually does send an ERR or OK response.  Status
422lines may be issued as a progress indicator.
423
424
425File: gnupg.info,  Node: GPGSM LISTKEYS,  Next: GPGSM EXPORT,  Prev: GPGSM GENKEY,  Up: GPGSM Protocol
426
4275.6.6 List available keys
428-------------------------
429
430To list the keys in the internal database or using an external key
431provider, the command:
432
433       LISTKEYS  PATTERN
434
435   is used.  To allow multiple patterns (which are ORed during the
436search) quoting is required: Spaces are to be translated into "+" or
437into "%20"; in turn this requires that the usual escape quoting rules
438are done.
439
440       LISTSECRETKEYS PATTERN
441
442   Lists only the keys where a secret key is available.
443
444   The list commands are affected by the option
445
446       OPTION list-mode=MODE
447
448   where mode may be:
449'0'
450     Use default (which is usually the same as 1).
451'1'
452     List only the internal keys.
453'2'
454     List only the external keys.
455'3'
456     List internal and external keys.
457
458   Note that options are valid for the entire session.
459
460
461File: gnupg.info,  Node: GPGSM EXPORT,  Next: GPGSM IMPORT,  Prev: GPGSM LISTKEYS,  Up: GPGSM Protocol
462
4635.6.7 Export certificates
464-------------------------
465
466To export certificate from the internal key database the command:
467
468       EXPORT [--data [--armor] [--base64]] [--] PATTERN
469
470   is used.  To allow multiple patterns (which are ORed) quoting is
471required: Spaces are to be translated into "+" or into "%20"; in turn
472this requires that the usual escape quoting rules are done.
473
474   If the '--data' option has not been given, the format of the output
475depends on what was set with the 'OUTPUT' command.  When using PEM
476encoding a few informational lines are prepended.
477
478   If the '--data' has been given, a target set via 'OUTPUT' is ignored
479and the data is returned inline using standard 'D'-lines.  This avoids
480the need for an extra file descriptor.  In this case the options
481'--armor' and '--base64' may be used in the same way as with the
482'OUTPUT' command.
483
484
485File: gnupg.info,  Node: GPGSM IMPORT,  Next: GPGSM DELETE,  Prev: GPGSM EXPORT,  Up: GPGSM Protocol
486
4875.6.8 Import certificates
488-------------------------
489
490To import certificates into the internal key database, the command
491
492       IMPORT [--re-import]
493
494   is used.  The data is expected on the file descriptor set with the
495'INPUT' command.  Certain checks are performed on the certificate.  Note
496that the code will also handle PKCS#12 files and import private keys; a
497helper program is used for that.
498
499   With the option '--re-import' the input data is expected to a be a
500linefeed separated list of fingerprints.  The command will re-import the
501corresponding certificates; that is they are made permanent by removing
502their ephemeral flag.
503
504
505File: gnupg.info,  Node: GPGSM DELETE,  Next: GPGSM GETAUDITLOG,  Prev: GPGSM IMPORT,  Up: GPGSM Protocol
506
5075.6.9 Delete certificates
508-------------------------
509
510To delete a certificate the command
511
512       DELKEYS PATTERN
513
514   is used.  To allow multiple patterns (which are ORed) quoting is
515required: Spaces are to be translated into "+" or into "%20"; in turn
516this requires that the usual escape quoting rules are done.
517
518   The certificates must be specified unambiguously otherwise an error
519is returned.
520
521
522File: gnupg.info,  Node: GPGSM GETAUDITLOG,  Next: GPGSM GETINFO,  Prev: GPGSM DELETE,  Up: GPGSM Protocol
523
5245.6.10 Retrieve an audit log
525----------------------------
526
527This command is used to retrieve an audit log.
528
529     GETAUDITLOG [--data] [--html]
530
531   If '--data' is used, the audit log is send using D-lines instead of
532being sent to the file descriptor given by an 'OUTPUT' command.  If
533'--html' is used, the output is formatted as an XHTML block.  This is
534designed to be incorporated into a HTML document.
535
536
537File: gnupg.info,  Node: GPGSM GETINFO,  Next: GPGSM OPTION,  Prev: GPGSM GETAUDITLOG,  Up: GPGSM Protocol
538
5395.6.11 Return information about the process
540-------------------------------------------
541
542This is a multipurpose function to return a variety of information.
543
544     GETINFO WHAT
545
546   The value of WHAT specifies the kind of information returned:
547'version'
548     Return the version of the program.
549'pid'
550     Return the process id of the process.
551'agent-check'
552     Return OK if the agent is running.
553'cmd_has_option CMD OPT'
554     Return OK if the command CMD implements the option OPT.  The
555     leading two dashes usually used with OPT shall not be given.
556'offline'
557     Return OK if the connection is in offline mode.  This may be either
558     due to a 'OPTION offline=1' or due to 'gpgsm' being started with
559     option '--disable-dirmngr'.
560
561
562File: gnupg.info,  Node: GPGSM OPTION,  Prev: GPGSM GETINFO,  Up: GPGSM Protocol
563
5645.6.12 Session options
565----------------------
566
567The standard Assuan option handler supports these options.
568
569     OPTION NAME[=VALUE]
570
571   These NAMEs are recognized:
572
573'putenv'
574     Change the session's environment to be passed via gpg-agent to
575     Pinentry.  VALUE is a string of the form '<KEY>[=[<STRING>]]'.  If
576     only '<KEY>' is given the environment variable '<KEY>' is removed
577     from the session environment, if '<KEY>=' is given that environment
578     variable is set to the empty string, and if '<STRING>' is given it
579     is set to that string.
580
581'display'
582     Set the session environment variable 'DISPLAY' is set to VALUE.
583'ttyname'
584     Set the session environment variable 'GPG_TTY' is set to VALUE.
585'ttytype'
586     Set the session environment variable 'TERM' is set to VALUE.
587'lc-ctype'
588     Set the session environment variable 'LC_CTYPE' is set to VALUE.
589'lc-messages'
590     Set the session environment variable 'LC_MESSAGES' is set to VALUE.
591'xauthority'
592     Set the session environment variable 'XAUTHORITY' is set to VALUE.
593'pinentry-user-data'
594     Set the session environment variable 'PINENTRY_USER_DATA' is set to
595     VALUE.
596
597'include-certs'
598     This option overrides the command line option '--include-certs'.  A
599     VALUE of -2 includes all certificates except for the root
600     certificate, -1 includes all certificates, 0 does not include any
601     certificates, 1 includes only the signers certificate and all other
602     positive values include up to VALUE certificates starting with the
603     signer cert.
604
605'list-mode'
606     *Note gpgsm-cmd listkeys::.
607
608'list-to-output'
609     If VALUE is true the output of the list commands (*note gpgsm-cmd
610     listkeys::) is written to the file descriptor set with the last
611     'OUTPUT' command.  If VALUE is false the output is written via data
612     lines; this is the default.
613
614'with-validation'
615     If VALUE is true for each listed certificate the validation status
616     is printed.  This may result in the download of a CRL or the user
617     being asked about the trustworthiness of a root certificate.  The
618     default is given by a command line option (*note gpgsm-option
619     --with-validation::).
620
621'with-secret'
622     If VALUE is true certificates with a corresponding private key are
623     marked by the list commands.
624
625'validation-model'
626     This option overrides the command line option 'validation-model'
627     for the session.  (*Note gpgsm-option --validation-model::.)
628
629'with-key-data'
630     This option globally enables the command line option
631     '--with-key-data'.  (*Note gpgsm-option --with-key-data::.)
632
633'enable-audit-log'
634     If VALUE is true data to write an audit log is gathered.  (*Note
635     gpgsm-cmd getauditlog::.)
636
637'allow-pinentry-notify'
638     If this option is used notifications about the launch of a Pinentry
639     are passed back to the client.
640
641'with-ephemeral-keys'
642     If VALUE is true ephemeral certificates are included in the output
643     of the list commands.
644
645'no-encrypt-to'
646     If this option is used all keys set by the command line option
647     '--encrypt-to' are ignored.
648
649'offline'
650     If VALUE is true or VALUE is not given all network access is
651     disabled for this session.  This is the same as the command line
652     option '--disable-dirmngr'.
653
654
655File: gnupg.info,  Node: Invoking SCDAEMON,  Next: Specify a User ID,  Prev: Invoking GPGSM,  Up: Top
656
6576 Invoking the SCDAEMON
658***********************
659
660The 'scdaemon' is a daemon to manage smartcards.  It is usually invoked
661by 'gpg-agent' and in general not used directly.
662
663   *Note Option Index::, for an index to 'scdaemon''s commands and
664options.
665
666* Menu:
667
668* Scdaemon Commands::      List of all commands.
669* Scdaemon Options::       List of all options.
670* Card applications::      Description of card applications.
671* Scdaemon Configuration:: Configuration files.
672* Scdaemon Examples::      Some usage examples.
673* Scdaemon Protocol::      The protocol the daemon uses.
674
675
676File: gnupg.info,  Node: Scdaemon Commands,  Next: Scdaemon Options,  Up: Invoking SCDAEMON
677
6786.1 Commands
679============
680
681Commands are not distinguished from options except for the fact that
682only one command is allowed.
683
684'--version'
685     Print the program version and licensing information.  Note that you
686     cannot abbreviate this command.
687
688'--help, -h'
689     Print a usage message summarizing the most useful command-line
690     options.  Note that you cannot abbreviate this command.
691
692'--dump-options'
693     Print a list of all available options and commands.  Note that you
694     cannot abbreviate this command.
695
696'--server'
697     Run in server mode and wait for commands on the 'stdin'.  The
698     default mode is to create a socket and listen for commands there.
699
700'--multi-server'
701     Run in server mode and wait for commands on the 'stdin' as well as
702     on an additional Unix Domain socket.  The server command 'GETINFO'
703     may be used to get the name of that extra socket.
704
705'--daemon'
706     Run the program in the background.  This option is required to
707     prevent it from being accidentally running in the background.
708
709
710File: gnupg.info,  Node: Scdaemon Options,  Next: Card applications,  Prev: Scdaemon Commands,  Up: Invoking SCDAEMON
711
7126.2 Option Summary
713==================
714
715'--options FILE'
716     Reads configuration from FILE instead of from the default per-user
717     configuration file.  The default configuration file is named
718     'scdaemon.conf' and expected in the '.gnupg' directory directly
719     below the home directory of the user.
720
721'--homedir DIR'
722     Set the name of the home directory to DIR.  If this option is not
723     used, the home directory defaults to '~/.gnupg'.  It is only
724     recognized when given on the command line.  It also overrides any
725     home directory stated through the environment variable 'GNUPGHOME'
726     or (on Windows systems) by means of the Registry entry
727     HKCU\SOFTWARE\GNU\GNUPG:HOMEDIR.
728
729     On Windows systems it is possible to install GnuPG as a portable
730     application.  In this case only this command line option is
731     considered, all other ways to set a home directory are ignored.
732
733     To install GnuPG as a portable application under Windows, create an
734     empty file named 'gpgconf.ctl' in the same directory as the tool
735     'gpgconf.exe'.  The root of the installation is then that
736     directory; or, if 'gpgconf.exe' has been installed directly below a
737     directory named 'bin', its parent directory.  You also need to make
738     sure that the following directories exist and are writable:
739     'ROOT/home' for the GnuPG home and 'ROOT/usr/local/var/cache/gnupg'
740     for internal cache files.
741
742'-v'
743'--verbose'
744     Outputs additional information while running.  You can increase the
745     verbosity by giving several verbose commands to 'gpgsm', such as
746     '-vv'.
747
748'--debug-level LEVEL'
749     Select the debug level for investigating problems.  LEVEL may be a
750     numeric value or a keyword:
751
752     'none'
753          No debugging at all.  A value of less than 1 may be used
754          instead of the keyword.
755     'basic'
756          Some basic debug messages.  A value between 1 and 2 may be
757          used instead of the keyword.
758     'advanced'
759          More verbose debug messages.  A value between 3 and 5 may be
760          used instead of the keyword.
761     'expert'
762          Even more detailed messages.  A value between 6 and 8 may be
763          used instead of the keyword.
764     'guru'
765          All of the debug messages you can get.  A value greater than 8
766          may be used instead of the keyword.  The creation of hash
767          tracing files is only enabled if the keyword is used.
768
769     How these messages are mapped to the actual debugging flags is not
770     specified and may change with newer releases of this program.  They
771     are however carefully selected to best aid in debugging.
772
773          Note: All debugging options are subject to change and thus
774          should not be used by any application program.  As the name
775          says, they are only used as helpers to debug problems.
776
777'--debug FLAGS'
778     Set debug flags.  All flags are or-ed and FLAGS may be given in C
779     syntax (e.g.  0x0042) or as a comma separated list of flag names.
780     To get a list of all supported flags the single word "help" can be
781     used.  This option is only useful for debugging and the behavior
782     may change at any time without notice.
783
784'--debug-all'
785     Same as '--debug=0xffffffff'
786
787'--debug-wait N'
788     When running in server mode, wait N seconds before entering the
789     actual processing loop and print the pid.  This gives time to
790     attach a debugger.
791
792'--debug-ccid-driver'
793     Enable debug output from the included CCID driver for smartcards.
794     Using this option twice will also enable some tracing of the T=1
795     protocol.  Note that this option may reveal sensitive data.
796
797'--debug-disable-ticker'
798     This option disables all ticker functions like checking for card
799     insertions.
800
801'--debug-allow-core-dump'
802     For security reasons we won't create a core dump when the process
803     aborts.  For debugging purposes it is sometimes better to allow
804     core dump.  This option enables it and also changes the working
805     directory to '/tmp' when running in '--server' mode.
806
807'--debug-log-tid'
808     This option appends a thread ID to the PID in the log output.
809
810'--debug-assuan-log-cats CATS'
811     Changes the active Libassuan logging categories to CATS.  The value
812     for CATS is an unsigned integer given in usual C-Syntax.  A value
813     of 0 switches to a default category.  If this option is not used
814     the categories are taken from the environment variable
815     'ASSUAN_DEBUG'.  Note that this option has only an effect if the
816     Assuan debug flag has also been with the option '--debug'.  For a
817     list of categories see the Libassuan manual.
818
819'--no-detach'
820     Don't detach the process from the console.  This is mainly useful
821     for debugging.
822
823'--listen-backlog N'
824     Set the size of the queue for pending connections.  The default is
825     64.  This option has an effect only if '--multi-server' is also
826     used.
827
828'--log-file FILE'
829     Append all logging output to FILE.  This is very helpful in seeing
830     what the agent actually does.  Use 'socket://' to log to socket.
831
832'--pcsc-shared'
833     Use shared mode to access the card via PC/SC. This is a somewhat
834     dangerous option because Scdaemon assumes exclusive access to the
835     card and for example caches certain information from the card.  Use
836     this option only if you know what you are doing.
837
838'--pcsc-driver LIBRARY'
839     Use LIBRARY to access the smartcard reader.  The current default is
840     'libpcsclite.so'.  Instead of using this option you might also want
841     to install a symbolic link to the default file name (e.g.  from
842     'libpcsclite.so.1').
843
844'--ctapi-driver LIBRARY'
845     Use LIBRARY to access the smartcard reader.  The current default is
846     'libtowitoko.so'.  Note that the use of this interface is
847     deprecated; it may be removed in future releases.
848
849'--disable-ccid'
850     Disable the integrated support for CCID compliant readers.  This
851     allows falling back to one of the other drivers even if the
852     internal CCID driver can handle the reader.  Note, that CCID
853     support is only available if libusb was available at build time.
854
855'--reader-port NUMBER_OR_STRING'
856     This option may be used to specify the port of the card terminal.
857     A value of 0 refers to the first serial device; add 32768 to access
858     USB devices.  The default is 32768 (first USB device).  PC/SC or
859     CCID readers might need a string here; run the program in verbose
860     mode to get a list of available readers.  The default is then the
861     first reader found.
862
863     To get a list of available CCID readers you may use this command:
864            echo scd getinfo reader_list \
865              | gpg-connect-agent --decode | awk '/^D/ {print $2}'
866
867'--card-timeout N'
868     This option is deprecated.  In GnuPG 2.0, it used to be used for
869     DISCONNECT command to control timing issue.  Since DISCONNECT
870     command works synchronously, it has no effect.
871
872'--enable-pinpad-varlen'
873     Please specify this option when the card reader supports variable
874     length input for pinpad (default is no).  For known readers (listed
875     in ccid-driver.c and apdu.c), this option is not needed.  Note that
876     if your card reader doesn't supports variable length input but you
877     want to use it, you need to specify your pinpad request on your
878     card.
879
880'--disable-pinpad'
881     Even if a card reader features a pinpad, do not try to use it.
882
883'--deny-admin'
884     This option disables the use of admin class commands for card
885     applications where this is supported.  Currently we support it for
886     the OpenPGP card.  This option is useful to inhibit accidental
887     access to admin class command which could ultimately lock the card
888     through wrong PIN numbers.  Note that GnuPG versions older than
889     2.0.11 featured an '--allow-admin' option which was required to use
890     such admin commands.  This option has no more effect today because
891     the default is now to allow admin commands.
892
893'--disable-application NAME'
894     This option disables the use of the card application named NAME.
895     This is mainly useful for debugging or if a application with lower
896     priority should be used by default.
897
898'--application-priority NAMELIST'
899     This option allows to change the order in which applications of a
900     card a tried if no specific application was requested.  NAMELIST is
901     a space or comma delimited list of application names.  Unknown
902     names are simply skipped.  Applications not mentioned in the list
903     are put in the former order at the end of the new priority list.
904
905     To get the list of current active applications, use
906              gpg-connect-agent 'scd getinfo app_list' /bye
907
908   All the long options may also be given in the configuration file
909after stripping off the two leading dashes.
910
911
912File: gnupg.info,  Node: Card applications,  Next: Scdaemon Configuration,  Prev: Scdaemon Options,  Up: Invoking SCDAEMON
913
9146.3 Description of card applications
915====================================
916
917'scdaemon' supports the card applications as described below.
918
919* Menu:
920
921* OpenPGP Card::          The OpenPGP card application
922* NKS Card::              The Telesec NetKey card application
923* DINSIG Card::           The DINSIG card application
924* PKCS#15 Card::          The PKCS#15 card application
925* Geldkarte Card::        The Geldkarte application
926* SmartCard-HSM::         The SmartCard-HSM application
927* Undefined Card::        The Undefined stub application
928
929
930File: gnupg.info,  Node: OpenPGP Card,  Next: NKS Card,  Up: Card applications
931
9326.3.1 The OpenPGP card application "openpgp"
933--------------------------------------------
934
935This application is currently only used by 'gpg' but may in future also
936be useful with 'gpgsm'.  Version 1 and version 2 of the card is
937supported.
938
939The specifications for these cards are available at
940<http://g10code.com/docs/openpgp-card-1.0.pdf> and
941<http://g10code.com/docs/openpgp-card-2.0.pdf>.
942
943
944File: gnupg.info,  Node: NKS Card,  Next: DINSIG Card,  Prev: OpenPGP Card,  Up: Card applications
945
9466.3.2 The Telesec NetKey card "nks"
947-----------------------------------
948
949This is the main application of the Telesec cards as available in
950Germany.  It is a superset of the German DINSIG card.  The card is used
951by 'gpgsm'.
952
953
954File: gnupg.info,  Node: DINSIG Card,  Next: PKCS#15 Card,  Prev: NKS Card,  Up: Card applications
955
9566.3.3 The DINSIG card application "dinsig"
957------------------------------------------
958
959This is an application as described in the German draft standard _DIN V
96066291-1_.  It is intended to be used by cards supporting the German
961signature law and its bylaws (SigG and SigV).
962
963
964File: gnupg.info,  Node: PKCS#15 Card,  Next: Geldkarte Card,  Prev: DINSIG Card,  Up: Card applications
965
9666.3.4 The PKCS#15 card application "p15"
967----------------------------------------
968
969This is common framework for smart card applications.  It is used by
970'gpgsm'.
971
972
973File: gnupg.info,  Node: Geldkarte Card,  Next: SmartCard-HSM,  Prev: PKCS#15 Card,  Up: Card applications
974
9756.3.5 The Geldkarte card application "geldkarte"
976------------------------------------------------
977
978This is a simple application to display information of a German
979Geldkarte.  The Geldkarte is a small amount debit card application which
980comes with almost all German banking cards.
981
982
983File: gnupg.info,  Node: SmartCard-HSM,  Next: Undefined Card,  Prev: Geldkarte Card,  Up: Card applications
984
9856.3.6 The SmartCard-HSM card application "sc-hsm"
986-------------------------------------------------
987
988This application adds read-only support for keys and certificates stored
989on a SmartCard-HSM (http://www.smartcard-hsm.com).
990
991   To generate keys and store certificates you may use OpenSC
992(https://github.com/OpenSC/OpenSC/wiki/SmartCardHSM) or the tools from
993OpenSCDP (http://www.openscdp.org).
994
995   The SmartCard-HSM cards requires a card reader that supports Extended
996Length APDUs.
997
998
999File: gnupg.info,  Node: Undefined Card,  Prev: SmartCard-HSM,  Up: Card applications
1000
10016.3.7 The Undefined card application "undefined"
1002------------------------------------------------
1003
1004This is a stub application to allow the use of the APDU command even if
1005no supported application is found on the card.  This application is not
1006used automatically but must be explicitly requested using the SERIALNO
1007command.
1008
1009
1010File: gnupg.info,  Node: Scdaemon Configuration,  Next: Scdaemon Examples,  Prev: Card applications,  Up: Invoking SCDAEMON
1011
10126.4 Configuration files
1013=======================
1014
1015There are a few configuration files to control certain aspects of
1016'scdaemons''s operation.  Unless noted, they are expected in the current
1017home directory (*note option --homedir::).
1018
1019'scdaemon.conf'
1020     This is the standard configuration file read by 'scdaemon' on
1021     startup.  It may contain any valid long option; the leading two
1022     dashes may not be entered and the option may not be abbreviated.
1023     This default name may be changed on the command line (*note option
1024     --options::).
1025
1026'scd-event'
1027     If this file is present and executable, it will be called on every
1028     card reader's status change.  An example of this script is provided
1029     with the distribution
1030
1031'reader_N.status'
1032     This file is created by 'scdaemon' to let other applications now
1033     about reader status changes.  Its use is now deprecated in favor of
1034     'scd-event'.
1035
1036
1037File: gnupg.info,  Node: Scdaemon Examples,  Next: Scdaemon Protocol,  Prev: Scdaemon Configuration,  Up: Invoking SCDAEMON
1038
10396.5 Examples
1040============
1041
1042     $ scdaemon --server -v
1043
1044
1045File: gnupg.info,  Node: Scdaemon Protocol,  Prev: Scdaemon Examples,  Up: Invoking SCDAEMON
1046
10476.6 Scdaemon's Assuan Protocol
1048==============================
1049
1050The SC-Daemon should be started by the system to provide access to
1051external tokens.  Using Smartcards on a multi-user system does not make
1052much sense except for system services, but in this case no regular user
1053accounts are hosted on the machine.
1054
1055   A client connects to the SC-Daemon by connecting to the socket named
1056'/usr/local/var/run/gnupg/scdaemon/socket', configuration information is
1057read from /ETC/GNUPG/SCDAEMON.CONF
1058
1059   Each connection acts as one session, SC-Daemon takes care of
1060synchronizing access to a token between sessions.
1061
1062* Menu:
1063
1064* Scdaemon SERIALNO::     Return the serial number.
1065* Scdaemon LEARN::        Read all useful information from the card.
1066* Scdaemon READCERT::     Return a certificate.
1067* Scdaemon READKEY::      Return a public key.
1068* Scdaemon PKSIGN::       Signing data with a Smartcard.
1069* Scdaemon PKDECRYPT::    Decrypting data with a Smartcard.
1070* Scdaemon GETATTR::      Read an attribute's value.
1071* Scdaemon SETATTR::      Update an attribute's value.
1072* Scdaemon WRITEKEY::     Write a key to a card.
1073* Scdaemon GENKEY::       Generate a new key on-card.
1074* Scdaemon RANDOM::       Return random bytes generated on-card.
1075* Scdaemon PASSWD::       Change PINs.
1076* Scdaemon CHECKPIN::     Perform a VERIFY operation.
1077* Scdaemon RESTART::      Restart connection
1078* Scdaemon APDU::         Send a verbatim APDU to the card
1079
1080
1081File: gnupg.info,  Node: Scdaemon SERIALNO,  Next: Scdaemon LEARN,  Up: Scdaemon Protocol
1082
10836.6.1 Return the serial number
1084------------------------------
1085
1086This command should be used to check for the presence of a card.  It is
1087special in that it can be used to reset the card.  Most other commands
1088will return an error when a card change has been detected and the use of
1089this function is therefore required.
1090
1091   Background: We want to keep the client clear of handling card changes
1092between operations; i.e.  the client can assume that all operations are
1093done on the same card unless he call this function.
1094
1095       SERIALNO
1096
1097   Return the serial number of the card using a status response like:
1098
1099       S SERIALNO D27600000000000000000000
1100
1101   The serial number is the hex encoded value identified by the '0x5A'
1102tag in the GDO file (FIX=0x2F02).
1103
1104
1105File: gnupg.info,  Node: Scdaemon LEARN,  Next: Scdaemon READCERT,  Prev: Scdaemon SERIALNO,  Up: Scdaemon Protocol
1106
11076.6.2 Read all useful information from the card
1108-----------------------------------------------
1109
1110       LEARN [--force]
1111
1112   Learn all useful information of the currently inserted card.  When
1113used without the '--force' option, the command might do an INQUIRE like
1114this:
1115
1116           INQUIRE KNOWNCARDP <hexstring_with_serialNumber>
1117
1118   The client should just send an 'END' if the processing should go on
1119or a 'CANCEL' to force the function to terminate with a cancel error
1120message.  The response of this command is a list of status lines
1121formatted as this:
1122
1123          S KEYPAIRINFO HEXSTRING_WITH_KEYGRIP HEXSTRING_WITH_ID
1124
1125   If there is no certificate yet stored on the card a single "X" is
1126returned in HEXSTRING_WITH_KEYGRIP.
1127
1128
1129File: gnupg.info,  Node: Scdaemon READCERT,  Next: Scdaemon READKEY,  Prev: Scdaemon LEARN,  Up: Scdaemon Protocol
1130
11316.6.3 Return a certificate
1132--------------------------
1133
1134      READCERT HEXIFIED_CERTID|KEYID
1135
1136   This function is used to read a certificate identified by
1137HEXIFIED_CERTID from the card.  With OpenPGP cards the keyid 'OpenPGP.3'
1138may be used to read the certificate of version 2 cards.
1139
1140
1141File: gnupg.info,  Node: Scdaemon READKEY,  Next: Scdaemon PKSIGN,  Prev: Scdaemon READCERT,  Up: Scdaemon Protocol
1142
11436.6.4 Return a public key
1144-------------------------
1145
1146     READKEY HEXIFIED_CERTID
1147
1148   Return the public key for the given cert or key ID as an standard
1149S-Expression.
1150
1151
1152File: gnupg.info,  Node: Scdaemon PKSIGN,  Next: Scdaemon PKDECRYPT,  Prev: Scdaemon READKEY,  Up: Scdaemon Protocol
1153
11546.6.5 Signing data with a Smartcard
1155-----------------------------------
1156
1157To sign some data the caller should use the command
1158
1159      SETDATA HEXSTRING
1160
1161   to tell 'scdaemon' about the data to be signed.  The data must be
1162given in hex notation.  The actual signing is done using the command
1163
1164       PKSIGN KEYID
1165
1166   where KEYID is the hexified ID of the key to be used.  The key id may
1167have been retrieved using the command 'LEARN'.  If another hash
1168algorithm than SHA-1 is used, that algorithm may be given like:
1169
1170       PKSIGN --hash=ALGONAME KEYID
1171
1172   With ALGONAME are one of 'sha1', 'rmd160' or 'md5'.
1173
1174
1175File: gnupg.info,  Node: Scdaemon PKDECRYPT,  Next: Scdaemon GETATTR,  Prev: Scdaemon PKSIGN,  Up: Scdaemon Protocol
1176
11776.6.6 Decrypting data with a Smartcard
1178--------------------------------------
1179
1180To decrypt some data the caller should use the command
1181
1182      SETDATA HEXSTRING
1183
1184   to tell 'scdaemon' about the data to be decrypted.  The data must be
1185given in hex notation.  The actual decryption is then done using the
1186command
1187
1188       PKDECRYPT KEYID
1189
1190   where KEYID is the hexified ID of the key to be used.
1191
1192   If the card is aware of the apdding format a status line with padding
1193information is send before the plaintext data.  The key for this status
1194line is 'PADDING' with the only defined value being 0 and meaning
1195padding has been removed.
1196
1197
1198File: gnupg.info,  Node: Scdaemon GETATTR,  Next: Scdaemon SETATTR,  Prev: Scdaemon PKDECRYPT,  Up: Scdaemon Protocol
1199
12006.6.7 Read an attribute's value
1201-------------------------------
1202
1203TO BE WRITTEN.
1204
1205
1206File: gnupg.info,  Node: Scdaemon SETATTR,  Next: Scdaemon WRITEKEY,  Prev: Scdaemon GETATTR,  Up: Scdaemon Protocol
1207
12086.6.8 Update an attribute's value
1209---------------------------------
1210
1211TO BE WRITTEN.
1212
1213
1214File: gnupg.info,  Node: Scdaemon WRITEKEY,  Next: Scdaemon GENKEY,  Prev: Scdaemon SETATTR,  Up: Scdaemon Protocol
1215
12166.6.9 Write a key to a card
1217---------------------------
1218
1219       WRITEKEY [--force] KEYID
1220
1221   This command is used to store a secret key on a smartcard.  The
1222allowed keyids depend on the currently selected smartcard application.
1223The actual keydata is requested using the inquiry 'KEYDATA' and need to
1224be provided without any protection.  With '--force' set an existing key
1225under this KEYID will get overwritten.  The key data is expected to be
1226the usual canonical encoded S-expression.
1227
1228   A PIN will be requested in most cases.  This however depends on the
1229actual card application.
1230
1231
1232File: gnupg.info,  Node: Scdaemon GENKEY,  Next: Scdaemon RANDOM,  Prev: Scdaemon WRITEKEY,  Up: Scdaemon Protocol
1233
12346.6.10 Generate a new key on-card
1235---------------------------------
1236
1237TO BE WRITTEN.
1238
1239
1240File: gnupg.info,  Node: Scdaemon RANDOM,  Next: Scdaemon PASSWD,  Prev: Scdaemon GENKEY,  Up: Scdaemon Protocol
1241
12426.6.11 Return random bytes generated on-card
1243--------------------------------------------
1244
1245TO BE WRITTEN.
1246
1247
1248File: gnupg.info,  Node: Scdaemon PASSWD,  Next: Scdaemon CHECKPIN,  Prev: Scdaemon RANDOM,  Up: Scdaemon Protocol
1249
12506.6.12 Change PINs
1251------------------
1252
1253        PASSWD [--reset] [--nullpin] CHVNO
1254
1255   Change the PIN or reset the retry counter of the card holder
1256verification vector number CHVNO.  The option '--nullpin' is used to
1257initialize the PIN of TCOS cards (6 byte NullPIN only).
1258
1259
1260File: gnupg.info,  Node: Scdaemon CHECKPIN,  Next: Scdaemon RESTART,  Prev: Scdaemon PASSWD,  Up: Scdaemon Protocol
1261
12626.6.13 Perform a VERIFY operation
1263---------------------------------
1264
1265       CHECKPIN IDSTR
1266
1267   Perform a VERIFY operation without doing anything else.  This may be
1268used to initialize a the PIN cache earlier to long lasting operations.
1269Its use is highly application dependent:
1270
1271*OpenPGP*
1272
1273     Perform a simple verify operation for CHV1 and CHV2, so that
1274     further operations won't ask for CHV2 and it is possible to do a
1275     cheap check on the PIN: If there is something wrong with the PIN
1276     entry system, only the regular CHV will get blocked and not the
1277     dangerous CHV3.  IDSTR is the usual card's serial number in hex
1278     notation; an optional fingerprint part will get ignored.
1279
1280     There is however a special mode if IDSTR is suffixed with the
1281     literal string '[CHV3]': In this case the Admin PIN is checked if
1282     and only if the retry counter is still at 3.
1283
1284
1285File: gnupg.info,  Node: Scdaemon RESTART,  Next: Scdaemon APDU,  Prev: Scdaemon CHECKPIN,  Up: Scdaemon Protocol
1286
12876.6.14 Perform a RESTART operation
1288----------------------------------
1289
1290       RESTART
1291
1292   Restart the current connection; this is a kind of warm reset.  It
1293deletes the context used by this connection but does not actually reset
1294the card.
1295
1296   This is used by gpg-agent to reuse a primary pipe connection and may
1297be used by clients to backup from a conflict in the serial command; i.e.
1298to select another application.
1299
1300
1301File: gnupg.info,  Node: Scdaemon APDU,  Prev: Scdaemon RESTART,  Up: Scdaemon Protocol
1302
13036.6.15 Send a verbatim APDU to the card
1304---------------------------------------
1305
1306       APDU [--atr] [--more] [--exlen[=N]] [HEXSTRING]
1307
1308   Send an APDU to the current reader.  This command bypasses the high
1309level functions and sends the data directly to the card.  HEXSTRING is
1310expected to be a proper APDU. If HEXSTRING is not given no commands are
1311send to the card; However the command will implicitly check whether the
1312card is ready for use.
1313
1314   Using the option '--atr' returns the ATR of the card as a status
1315message before any data like this:
1316          S CARD-ATR 3BFA1300FF813180450031C173C00100009000B1
1317
1318   Using the option '--more' handles the card status word MORE_DATA
1319(61xx) and concatenate all responses to one block.
1320
1321   Using the option '--exlen' the returned APDU may use extended length
1322up to N bytes.  If N is not given a default value is used (currently
13234096).
1324
1325
1326File: gnupg.info,  Node: Specify a User ID,  Next: Trust Values,  Prev: Invoking SCDAEMON,  Up: Top
1327
13287 How to Specify a User Id
1329**************************
1330
1331There are different ways to specify a user ID to GnuPG. Some of them are
1332only valid for 'gpg' others are only good for 'gpgsm'.  Here is the
1333entire list of ways to specify a key:
1334
1335   * By key Id.  This format is deduced from the length of the string
1336     and its content or '0x' prefix.  The key Id of an X.509 certificate
1337     are the low 64 bits of its SHA-1 fingerprint.  The use of key Ids
1338     is just a shortcut, for all automated processing the fingerprint
1339     should be used.
1340
1341     When using 'gpg' an exclamation mark (!)  may be appended to force
1342     using the specified primary or secondary key and not to try and
1343     calculate which primary or secondary key to use.
1344
1345     The last four lines of the example give the key ID in their long
1346     form as internally used by the OpenPGP protocol.  You can see the
1347     long key ID using the option '--with-colons'.
1348
1349          234567C4
1350          0F34E556E
1351          01347A56A
1352          0xAB123456
1353
1354          234AABBCC34567C4
1355          0F323456784E56EAB
1356          01AB3FED1347A5612
1357          0x234AABBCC34567C4
1358
1359   * By fingerprint.  This format is deduced from the length of the
1360     string and its content or the '0x' prefix.  Note, that only the 20
1361     byte version fingerprint is available with 'gpgsm' (i.e.  the SHA-1
1362     hash of the certificate).
1363
1364     When using 'gpg' an exclamation mark (!)  may be appended to force
1365     using the specified primary or secondary key and not to try and
1366     calculate which primary or secondary key to use.
1367
1368     The best way to specify a key Id is by using the fingerprint.  This
1369     avoids any ambiguities in case that there are duplicated key IDs.
1370
1371          1234343434343434C434343434343434
1372          123434343434343C3434343434343734349A3434
1373          0E12343434343434343434EAB3484343434343434
1374          0xE12343434343434343434EAB3484343434343434
1375
1376     'gpgsm' also accepts colons between each pair of hexadecimal digits
1377     because this is the de-facto standard on how to present X.509
1378     fingerprints.  'gpg' also allows the use of the space separated
1379     SHA-1 fingerprint as printed by the key listing commands.
1380
1381   * By exact match on OpenPGP user ID. This is denoted by a leading
1382     equal sign.  It does not make sense for X.509 certificates.
1383
1384          =Heinrich Heine <heinrichh@uni-duesseldorf.de>
1385
1386   * By exact match on an email address.  This is indicated by enclosing
1387     the email address in the usual way with left and right angles.
1388
1389          <heinrichh@uni-duesseldorf.de>
1390
1391   * By partial match on an email address.  This is indicated by
1392     prefixing the search string with an '@'.  This uses a substring
1393     search but considers only the mail address (i.e.  inside the angle
1394     brackets).
1395
1396          @heinrichh
1397
1398   * By exact match on the subject's DN. This is indicated by a leading
1399     slash, directly followed by the RFC-2253 encoded DN of the subject.
1400     Note that you can't use the string printed by 'gpgsm --list-keys'
1401     because that one has been reordered and modified for better
1402     readability; use '--with-colons' to print the raw (but standard
1403     escaped) RFC-2253 string.
1404
1405          /CN=Heinrich Heine,O=Poets,L=Paris,C=FR
1406
1407   * By exact match on the issuer's DN. This is indicated by a leading
1408     hash mark, directly followed by a slash and then directly followed
1409     by the RFC-2253 encoded DN of the issuer.  This should return the
1410     Root cert of the issuer.  See note above.
1411
1412          #/CN=Root Cert,O=Poets,L=Paris,C=FR
1413
1414   * By exact match on serial number and issuer's DN. This is indicated
1415     by a hash mark, followed by the hexadecimal representation of the
1416     serial number, then followed by a slash and the RFC-2253 encoded DN
1417     of the issuer.  See note above.
1418
1419          #4F03/CN=Root Cert,O=Poets,L=Paris,C=FR
1420
1421   * By keygrip.  This is indicated by an ampersand followed by the 40
1422     hex digits of a keygrip.  'gpgsm' prints the keygrip when using the
1423     command '--dump-cert'.
1424
1425          &D75F22C3F86E355877348498CDC92BD21010A480
1426
1427   * By substring match.  This is the default mode but applications may
1428     want to explicitly indicate this by putting the asterisk in front.
1429     Match is not case sensitive.
1430
1431          Heine
1432          *Heine
1433
1434   * .  and + prefixes These prefixes are reserved for looking up mails
1435     anchored at the end and for a word search mode.  They are not yet
1436     implemented and using them is undefined.
1437
1438   Please note that we have reused the hash mark identifier which was
1439used in old GnuPG versions to indicate the so called local-id.  It is
1440not anymore used and there should be no conflict when used with X.509
1441stuff.
1442
1443   Using the RFC-2253 format of DNs has the drawback that it is not
1444possible to map them back to the original encoding, however we don't
1445have to do this because our key database stores this encoding as meta
1446data.
1447
1448
1449File: gnupg.info,  Node: Trust Values,  Next: Smart Card Tool,  Prev: Specify a User ID,  Up: Top
1450
14518 Trust Values
1452**************
1453
1454Trust values are used to indicate ownertrust and validity of keys and
1455user IDs.  They are displayed with letters or strings:
1456
1457-
1458unknown
1459     No ownertrust assigned / not yet calculated.
1460
1461e
1462expired
1463
1464     Trust calculation has failed; probably due to an expired key.
1465
1466q
1467undefined, undef
1468     Not enough information for calculation.
1469
1470n
1471never
1472     Never trust this key.
1473
1474m
1475marginal
1476     Marginally trusted.
1477
1478f
1479full
1480     Fully trusted.
1481
1482u
1483ultimate
1484     Ultimately trusted.
1485
1486r
1487revoked
1488     For validity only: the key or the user ID has been revoked.
1489
1490?
1491err
1492     The program encountered an unknown trust value.
1493
1494
1495File: gnupg.info,  Node: Smart Card Tool,  Next: Helper Tools,  Prev: Trust Values,  Up: Top
1496
14979 Smart Card Tool
1498*****************
1499
1500GnuPG comes with a tool to administrate smart cards and USB tokens.
1501This tool is an enhanced version of the '--edit-key' command available
1502with 'gpg'.
1503
1504* Menu:
1505
1506* gpg-card::             Administrate smart cards.
1507
1508
1509File: gnupg.info,  Node: gpg-card,  Up: Smart Card Tool
1510
15119.1 Administrate smart cards.
1512=============================
1513
1514The 'gpg-card' is used to administrate smart cards and USB tokens.  It
1515provides a superset of features from 'gpg --card-edit' an can be
1516considered a frontend to 'scdaemon' which is a daemon started by
1517'gpg-agent' to handle smart cards.
1518
1519   If 'gpg-card' is invoked without commands an interactive mode is
1520used.
1521
1522   If 'gpg-card' is invoked with one or more commands the same commands
1523as available in the interactive mode are run from the command line.
1524These commands need to be delimited with a double-dash.  If a
1525double-dash or a shell specific character is required as part of a
1526command the entire command needs to be put in quotes.  If one of those
1527commands returns an error the remaining commands are not anymore run
1528unless the command was prefixed with a single dash.
1529
1530   A list of commands is available by using the command 'help' and a
1531brief description of each command is printed by using 'help CMD'.  See
1532the section COMMANDS for a full description.
1533
1534   See the NOTES sections for instructions pertaining to specific cards
1535or card applications.
1536
1537'gpg-card' understands these options:
1538
1539'--with-colons'
1540     This option has currently no effect.
1541
1542'--status-fd N'
1543     Write special status strings to the file descriptor N.  This
1544     program returns only the status messages SUCCESS or FAILURE which
1545     are helpful when the caller uses a double fork approach and can't
1546     easily get the return code of the process.
1547
1548'--verbose'
1549     Enable extra informational output.
1550
1551'--quiet'
1552     Disable almost all informational output.
1553
1554'--version'
1555     Print version of the program and exit.
1556
1557'--help'
1558     Display a brief help page and exit.
1559
1560'--no-autostart'
1561     Do not start the gpg-agent if it has not yet been started and its
1562     service is required.  This option is mostly useful on machines
1563     where the connection to gpg-agent has been redirected to another
1564     machines.
1565
1566'--no-history'
1567     In interactive mode the command line history is usually saved and
1568     restored to and from a file below the GnuPG home directory.  This
1569     option inhibits the use of that file.
1570
1571'--agent-program FILE'
1572     Specify the agent program to be started if none is running.  The
1573     default value is determined by running 'gpgconf' with the option
1574     '--list-dirs'.
1575
1576'--gpg-program FILE'
1577     Specify a non-default gpg binary to be used by certain commands.
1578
1579'--gpgsm-program FILE'
1580     Specify a non-default gpgsm binary to be used by certain commands.
1581
1582'--chuid UID'
1583     Change the current user to UID which may either be a number or a
1584     name.  This can be used from the root account to run gpg-card for
1585     another user.  If UID is not the current UID a standard PATH is set
1586     and the envvar GNUPGHOME is unset.  To override the latter the
1587     option '--homedir' can be used.  This option has only an effect
1588     when used on the command line.  This option has currently no effect
1589     at all on Windows.
1590
1591'gpg-card' understands the following commands, which have options of
1592their own.  The pseudo-option '--' can be used to separate command
1593options from arguments; if this pseudo option is used on the command
1594line the entire command with options and arguments must be quoted, so
1595that it is not mixed up with the '--' as used on the command line to
1596separate commands.  Note that a short online help is available for all
1597commands by prefixing them with "help".  Command completion in the
1598interactive mode is also supported.
1599
1600'AUTHENTICATE [--setkey] [--raw] [< FILE]|KEY]'
1601'AUTH'
1602     Authenticate to the card.  Perform a mutual autentication either by
1603     reading the key from FILE or by taking it from the command line as
1604     KEY.  Without the option '--raw' the key is expected to be hex
1605     encoded.  To install a new administration key '--setkey' is used;
1606     this requires a prior authentication with the old key.  This is
1607     used with PIV cards.
1608
1609'CAFPR [--clear] N'
1610     Change the CA fingerprint number N of an OpenPGP card.  N must be
1611     in the range 1 to 3.  The option '--clear' clears the specified CA
1612     fingerprint N or all of them if N is 0 or not given.
1613
1614'FACTORY-RESET'
1615     Do a complete reset of some OpenPGP and PIV cards.  This command
1616     deletes all data and keys and resets the PINs to their default.
1617     Don't worry, you need to confirm before the command proceeds.
1618
1619'FETCH'
1620     Retrieve a key using the URL data object of an OpenPGP card or if
1621     that is missing using the stored fingerprint.
1622
1623'FORCESIG'
1624     Toggle the forcesig flag of an OpenPGP card.
1625
1626'GENERATE [--force] [--algo=ALGO{+ALGO2}] KEYREF'
1627     Create a new key on a card.  Use '--force' to overwrite an existing
1628     key.  Use "help" for ALGO to get a list of known algorithms.  For
1629     OpenPGP cards several algos may be given.  Note that the OpenPGP
1630     key generation is done interactively unless '--algo' or KEYREF are
1631     given.
1632
1633'KDF-SETUP'
1634     Prepare the OpenPGP card KDF feature for this card.
1635
1636'LANG [--clear]'
1637     Change the language info for the card.  This info can be used by
1638     applications for a personalized greeting.  Up to 4 two-digit
1639     language identifiers can be entered as a preference.  The option
1640     '--clear' removes all identifiers.  GnuPG does not use this info.
1641
1642'LIST [--cards] [--apps] [--info] [--no-key-lookup] [N] [APP]'
1643'L'
1644     This command reads all information from the current card and
1645     display them in a human readable format.  The first section shows
1646     generic information vaialable for all cards.  The next section
1647     shows information pertaining to keys which depend on the actual
1648     card and application.
1649
1650     With N given select and list the n-th card; with APP also given
1651     select that application.  To select an APP on the current card use
1652     "-" for N.  The serial number of the card may be used instead of N.
1653
1654     The option '--cards' lists the serial numbers of available cards.
1655     The option '--apps' lists all card applications.  The option
1656     '--info' selects a card and prints its serial number.  The option
1657     '--no-key-lookup' suppresses the listing of matching OpenPGP or
1658     X.509 keys.
1659
1660'LOGIN [--clear] [< FILE]'
1661     Set the login data object of OpenPGP cards.  If FILE is given the
1662     data is is read from that file.  This allows to store binary data
1663     in the login field.  The option '--clear' deletes the login data
1664     object.
1665
1666'NAME [--clear]'
1667     Set the name field of an OpenPGP card.  With option '--clear' the
1668     stored name is cleared off the card.
1669
1670'PASSWD [--reset|--nullpin] [PINREF]'
1671     Change or unblock the PINs.  Note that in interactive mode and
1672     without a PINREF a menu is presented for certain cards."  In
1673     non-interactive mode and without a PINREF a default value i used
1674     for these cards.  The option '--reset' is used with TCOS cards to
1675     reset the PIN using the PUK or vice versa; the option -NULLPIN is
1676     used for these cards to set the intial PIN.
1677
1678'PRIVATEDO [--clear] N [< FILE]'
1679     Change the private data object N of an OpenPGP card.  N must be in
1680     the range 1 to 4.  If FILE is given the data is is read from that
1681     file.  The option '--clear' clears the data.
1682
1683'QUIT'
1684'Q'
1685     Stop processing and terminate 'gpg-card'.
1686
1687'READCERT [--openpgp] CERTREF > FILE'
1688     Read the certificate for key CERTREF and store it in FILE.  With
1689     option '--openpgp' an OpenPGP keyblock wrapped in a dedicated CMS
1690     content type (OID=1.3.6.1.4.1.11591.2.3.1) is expected and
1691     extracted to FILE.  Note that for current OpenPGP cards a
1692     certificate may only be available at the CERTREF "OPENPGP.3".
1693
1694'RESET'
1695     Send a reset to the card daemon.
1696
1697'SALUTATION [--clear]'
1698'SALUT'
1699     Change the salutation info for the card.  This info can be used by
1700     applications for a personalized greeting.  The option '--clear'
1701     removes this data object.  GnuPG does not use this info.
1702
1703'UIF N [on|off|permanent]'
1704     Change the User Interaction Flag.  That flags tells whether the
1705     confirmation button of a token shall be used.  N must in the range
1706     1 to 3.  "permanent" is the same as "on" but the flag can't be
1707     changed anmore.
1708
1709'UNBLOCK'
1710     Unblock a PIN using a PUK or Reset Code.  Note that OpenPGP cards
1711     prior to version 2 can't use this; instead the 'PASSWD' can be used
1712     to set a new PIN.
1713
1714'URL [--clear]'
1715     Set the URL data object of an OpenPGP card.  That data object can
1716     be used by by 'gpg''s '--fetch' command to retrieve the full public
1717     key.  The option '--clear' deletes the content of that data object.
1718
1719'VERIFY [CHVID]'
1720     Verify the PIN identified by CHVID or the default PIN.
1721
1722'WRITECERT CERTREF < FILE'
1723'WRITECERT --openpgp CERTREF [< FILE|FPR]'
1724'WRITECERT --clear CERTREF'
1725     Write a certificate to the card under the id CERTREF.  The option
1726     '--clear' removes the certificate from the card.  The option
1727     '--openpgp' expects an OpenPGP keyblock and stores it encapsulated
1728     in a CMS container; the keyblock is taken from FILE or directly
1729     from the OpenPGP key identified by fingerprint FPR.
1730
1731'WRITEKEY [--force] KEYREF KEYGRIP'
1732     Write a private key object identified by KEYGRIP to the card under
1733     the id KEYREF.  Option '--force' allows overwriting an existing
1734     key.
1735
1736'YUBIKEY CMD ARGS'
1737     Various commands pertaining to Yubikey tokens with CMD being:
1738     LIST
1739          List supported and enabled Yubikey applications.
1740     ENABLE USB|NFC|ALL [OTP|U2F|OPGP|PIV|OATH|FIDO2|ALL]
1741     DISABLE
1742          Enable or disable the specified or all applications on the
1743          given interface.
1744
1745   The support for OpenPGP cards in 'gpg-card' is not yet complete.  For
1746missing features, please continue to use 'gpg --card-edit'.
1747
1748GnuPG has support for PIV cards ("Personal Identity Verification" as
1749specified by NIST Special Publication 800-73-4).  This section describes
1750how to initialize (personalize) a fresh Yubikey token featuring the PIV
1751application (requires Yubikey-5).  We assume that the credentials have
1752not yet been changed and thus are:
1753Authentication key
1754     This is a 24 byte key described by the hex string
1755     '010203040506070801020304050607080102030405060708'.
1756PIV Application PIN
1757     This is the string '123456'.
1758PIN Unblocking Key
1759     This is the string '12345678'.
1760   See the example section on how to change these defaults.  For
1761production use it is important to use secure values for them.  Note that
1762the Authentication Key is not queried via the usual Pinentry dialog but
1763needs to be entered manually or read from a file.  The use of a
1764dedicated machine to personalize tokens is strongly suggested.
1765
1766   To see what is on the card, the command 'list' can be given.  We will
1767use the interactive mode in the following (the string _gpg/card>_ is the
1768prompt).  An example output for a fresh card is:
1769
1770     gpg/card> list
1771     Reader ...........: 1050:0407:X:0
1772     Card type ........: yubikey
1773     Card firmware ....: 5.1.2
1774     Serial number ....: D2760001240102010006090746250000
1775     Application type .: OpenPGP
1776     Version ..........: 2.1
1777     [...]
1778
1779   It can be seen by the "Application type" line that GnuPG selected the
1780OpenPGP application of the Yubikey.  This is because GnuPG assigns the
1781highest priority to the OpenPGP application.  To use the PIV application
1782of the Yubikey several methods can be used:
1783
1784   With a Yubikey 5 or later the OpenPGP application on the Yubikey can
1785be disabled:
1786
1787     gpg/card> yubikey disable all opgp
1788     gpg/card> yubikey list
1789     Application  USB    NFC
1790     -----------------------
1791     OTP          yes    yes
1792     U2F          yes    yes
1793     OPGP         no     no
1794     PIV          yes    no
1795     OATH         yes    yes
1796     FIDO2        yes    yes
1797     gpg/card> reset
1798
1799   The 'reset' is required so that the GnuPG system rereads the card.
1800Note that disabled applications keep all their data and can at any time
1801be re-enabled (use 'help yubikey').
1802
1803   Another option, which works for all Yubikey versions, is to disable
1804the support for OpenPGP cards in scdaemon.  This is done by adding the
1805line
1806
1807     disable-application openpgp
1808
1809   to '~/.gnupg/scdaemon.conf' and by restarting scdaemon, either by
1810killing the process or by using 'gpgconf --kill scdaemon'.  Finally the
1811default order in which card applications are tried by scdaemon can be
1812changed.  For example to prefer PIV over OpenPGP it is sufficient to add
1813
1814     application-priority piv
1815
1816   to '~/.gnupg/scdaemon.conf' and to restart 'scdaemon'.  This has an
1817effect only on tokens which support both, PIV and OpenPGP, but does not
1818hamper the use of OpenPGP only tokens.
1819
1820   With one of these methods employed the 'list' command of 'gpg-card'
1821shows this:
1822
1823     gpg/card> list
1824     Reader ...........: 1050:0407:X:0
1825     Card type ........: yubikey
1826     Card firmware ....: 5.1.2
1827     Serial number ....: FF020001008A77C1
1828     Application type .: PIV
1829     Version ..........: 1.0
1830     Displayed s/n ....: yk-9074625
1831     PIN usage policy .: app-pin
1832     PIN retry counter : - 3 -
1833     PIV authentication: [none]
1834           keyref .....: PIV.9A
1835     Card authenticat. : [none]
1836           keyref .....: PIV.9E
1837     Digital signature : [none]
1838           keyref .....: PIV.9C
1839     Key management ...: [none]
1840           keyref .....: PIV.9D
1841
1842   In case several tokens are plugged into the computer, gpg-card will
1843show only one.  To show another token the number of the token (0, 1, 2,
1844...)  can be given as an argument to the 'list' command.  The command
1845'list --cards' prints a list of all inserted tokens.
1846
1847   Note that the "Displayed s/n" is printed on the token and also shown
1848in Pinentry prompts asking for the PIN. The four standard key slots are
1849always shown, if other key slots are initialized they are shown as well.
1850The _PIV authentication_ key (internal reference _PIV.9A_) is used to
1851authenticate the card and the card holder.  The use of the associated
1852private key is protected by the Application PIN which needs to be
1853provided once and the key can the be used until the card is reset or
1854removed from the reader or USB port.  GnuPG uses this key with its
1855_Secure Shell_ support.  The _Card authentication_ key (_PIV.9E_) is
1856also known as the CAK and used to support physical access applications.
1857The private key is not protected by a PIN and can thus immediately be
1858used.  The _Digital signature_ key (_PIV.9C_) is used to digitally sign
1859documents.  The use of the associated private key is protected by the
1860Application PIN which needs to be provided for each signing operation.
1861The _Key management_ key (_PIV.9D_) is used for encryption.  The use of
1862the associated private key is protected by the Application PIN which
1863needs to be provided only once so that decryption operations can then be
1864done until the card is reset or removed from the reader or USB port.
1865
1866   We now generate three of the four keys.  Note that GnuPG does
1867currently not use the the _Card authentication_ key; however, that key
1868is mandatory by the PIV standard and thus we create it too.  Key
1869generation requires that we authenticate to the card.  This can be done
1870either on the command line (which would reveal the key):
1871
1872     gpg/card> auth 010203040506070801020304050607080102030405060708
1873
1874   or by reading the key from a file.  That file needs to consist of one
1875LF terminated line with the hex encoded key (as above):
1876
1877     gpg/card> auth < myauth.key
1878
1879   As usual 'help auth' gives help for this command.  An error message
1880is printed if a non-matching key is used.  The authentication is valid
1881until a reset of the card or until the card is removed from the reader
1882or the USB port.  Note that that in non-interactive mode the '<' needs
1883to be quoted so that the shell does not interpret it as a its own
1884redirection symbol.
1885
1886Here are the actual commands to generate the keys:
1887
1888     gpg/card> generate --algo=nistp384 PIV.9A
1889     PIV card no. yk-9074625 detected
1890     gpg/card> generate --algo=nistp256 PIV.9E
1891     PIV card no. yk-9074625 detected
1892     gpg/card> generate --algo=rsa2048 PIV.9C
1893     PIV card no. yk-9074625 detected
1894
1895   If a key has already been created for one of the slots an error will
1896be printed; to create a new key anyway the option '--force' can be used.
1897Note that only the private and public keys have been created but no
1898certificates are stored in the key slots.  In fact, GnuPG uses its own
1899non-standard method to store just the public key in place of the the
1900certificate.  Other application will not be able to make use these keys
1901until 'gpgsm' or another tool has been used to create and store the
1902respective certificates.  Let us see what the list command now shows:
1903
1904     gpg/card> list
1905     Reader ...........: 1050:0407:X:0
1906     Card type ........: yubikey
1907     Card firmware ....: 5.1.2
1908     Serial number ....: FF020001008A77C1
1909     Application type .: PIV
1910     Version ..........: 1.0
1911     Displayed s/n ....: yk-9074625
1912     PIN usage policy .: app-pin
1913     PIN retry counter : - 3 -
1914     PIV authentication: 213D1825FDE0F8240CB4E4229F01AF90AC658C2E
1915           keyref .....: PIV.9A  (auth)
1916           algorithm ..: nistp384
1917     Card authenticat. : 7A53E6CFFE7220A0E646B4632EE29E5A7104499C
1918           keyref .....: PIV.9E  (auth)
1919           algorithm ..: nistp256
1920     Digital signature : 32A6C6FAFCB8421878608AAB452D5470DD3223ED
1921           keyref .....: PIV.9C  (sign,cert)
1922           algorithm ..: rsa2048
1923     Key management ...: [none]
1924           keyref .....: PIV.9D
1925
1926   The primary information for each key is the _keygrip_, a 40 byte
1927hex-string identifying the key.  This keygrip is a unique identifier for
1928the specific parameters of a key.  It is used by 'gpg-agent' and other
1929parts of GnuPG to associate a private key to its protocol specific
1930certificate format (X.509, OpenPGP, or SecureShell).  Below the keygrip
1931the key reference along with the key usage capabilities are show.
1932Finally the algorithm is printed in the format used by 'gpg'.  At that
1933point no other information is shown because for these new keys gpg won't
1934be able to find matching certificates.
1935
1936   Although we could have created the _Key management_ key also with the
1937generate command, we will create that key off-card so that a backup
1938exists.  To accomplish this a key needs to be created with either 'gpg'
1939or 'gpgsm' or imported in one of these tools.  In our example we create
1940a self-signed X.509 certificate (exit the gpg-card tool, first):
1941
1942     $ gpgsm --gen-key -o encr.crt
1943        (1) RSA
1944        (2) Existing key
1945        (3) Existing key from card
1946     Your selection? 1
1947     What keysize do you want? (3072) 2048
1948     Requested keysize is 2048 bits
1949     Possible actions for a RSA key:
1950        (1) sign, encrypt
1951        (2) sign
1952        (3) encrypt
1953     Your selection? 3
1954     Enter the X.509 subject name: CN=Encryption key for yk-9074625,O=example,C=DE
1955     Enter email addresses (end with an empty line):
1956     > otto@example.net
1957     >
1958     Enter DNS names (optional; end with an empty line):
1959     >
1960     Enter URIs (optional; end with an empty line):
1961     >
1962     Create self-signed certificate? (y/N) y
1963     These parameters are used:
1964         Key-Type: RSA
1965         Key-Length: 2048
1966         Key-Usage: encrypt
1967         Serial: random
1968         Name-DN: CN=Encryption key for yk-9074625,O=example,C=DE
1969         Name-Email: otto@example.net
1970
1971     Proceed with creation? (y/N)
1972     Now creating self-signed certificate.  This may take a while ...
1973     gpgsm: about to sign the certificate for key: &34798AAFE0A7565088101CC4AE31C5C8C74461CB
1974     gpgsm: certificate created
1975     Ready.
1976     $ gpgsm --import encr.crt
1977     gpgsm: certificate imported
1978     gpgsm: total number processed: 1
1979     gpgsm:               imported: 1
1980
1981   Note the last step which imported the created certificate.  If you
1982you instead created a certificate signing request (CSR) instead of a
1983self-signed certificate and sent this off to a CA you would do the same
1984import step with the certificate received from the CA. Take note of the
1985keygrip (prefixed with an ampersand) as shown during the certificate
1986creation or listed it again using 'gpgsm --with-keygrip -k
1987otto@example.net'.  Now to move the key and certificate to the card
1988start 'gpg-card' again and enter:
1989
1990     gpg/card> writekey PIV.9D 34798AAFE0A7565088101CC4AE31C5C8C74461CB
1991     gpg/card> writecert PIV.9D < encr.crt
1992
1993   If you entered a passphrase to protect the private key, you will be
1994asked for it via the Pinentry prompt.  On success the key and the
1995certificate has been written to the card and a 'list' command shows:
1996
1997     [...]
1998     Key management ...: 34798AAFE0A7565088101CC4AE31C5C8C74461CB
1999           keyref .....: PIV.9D  (encr)
2000           algorithm ..: rsa2048
2001           used for ...: X.509
2002             user id ..: CN=Encryption key for yk-9074625,O=example,C=DE
2003             user id ..: <otto@example.net>
2004
2005   In case the same key (identified by the keygrip) has been used for
2006several certificates you will see several "used for" parts.  With this
2007the encryption key is now fully functional and can be used to decrypt
2008messages encrypted to this certificate.  TAKE CARE: the original key is
2009still stored on-disk and should be moved to a backup medium.  This can
2010simply be done by copying the file
2011'34798AAFE0A7565088101CC4AE31C5C8C74461CB.key' from the directory
2012'~/.gnupg/private-keys-v1.d/' to the backup medium and deleting the file
2013at its original place.
2014
2015   The final example is to create a self-signed certificate for digital
2016signatures.  Leave 'gpg-card' using 'quit' or by pressing Control-D and
2017use gpgsm:
2018
2019     $ gpgsm --learn
2020     $ gpgsm --gen-key -o sign.crt
2021     Please select what kind of key you want:
2022        (1) RSA
2023        (2) Existing key
2024        (3) Existing key from card
2025     Your selection? 3
2026     Serial number of the card: FF020001008A77C1
2027     Available keys:
2028        (1) 213D1825FDE0F8240CB4E4229F01AF90AC658C2E PIV.9A nistp384
2029        (2) 7A53E6CFFE7220A0E646B4632EE29E5A7104499C PIV.9E nistp256
2030        (3) 32A6C6FAFCB8421878608AAB452D5470DD3223ED PIV.9C rsa2048
2031        (4) 34798AAFE0A7565088101CC4AE31C5C8C74461CB PIV.9D rsa2048
2032     Your selection? 3
2033     Possible actions for a RSA key:
2034        (1) sign, encrypt
2035        (2) sign
2036        (3) encrypt
2037     Your selection? 2
2038     Enter the X.509 subject name: CN=Signing key for yk-9074625,O=example,C=DE
2039     Enter email addresses (end with an empty line):
2040     > otto@example.net
2041     >
2042     Enter DNS names (optional; end with an empty line):
2043     >
2044     Enter URIs (optional; end with an empty line):
2045     >
2046     Create self-signed certificate? (y/N)
2047     These parameters are used:
2048         Key-Type: card:PIV.9C
2049         Key-Length: 1024
2050         Key-Usage: sign
2051         Serial: random
2052         Name-DN: CN=Signing key for yk-9074625,O=example,C=DE
2053         Name-Email: otto@example.net
2054
2055     Proceed with creation? (y/N) y
2056     Now creating self-signed certificate.  This may take a while ...
2057     gpgsm: about to sign the certificate for key: &32A6C6FAFCB8421878608AAB452D5470DD3223ED
2058     gpgsm: certificate created
2059     Ready.
2060     $ gpgsm --import sign.crt
2061     gpgsm: certificate imported
2062     gpgsm: total number processed: 1
2063     gpgsm:               imported: 1
2064
2065   The use of 'gpgsm --learn' is currently necessary so that gpg-agent
2066knows what keys are available on the card.  The need for this command
2067will eventually be removed.  The remaining commands are similar to the
2068creation of an on-disk key.  However, here we select the 'Digital
2069signature' key.  During the creation process you will be asked for the
2070Application PIN of the card.  The final step is to write the certificate
2071to the card using 'gpg-card':
2072
2073     gpg/card> writecert PIV.9C < sign.crt
2074
2075   By running list again we will see the fully initialized card:
2076
2077     Reader ...........: 1050:0407:X:0
2078     Card type ........: yubikey
2079     Card firmware ....: 5.1.2
2080     Serial number ....: FF020001008A77C1
2081     Application type .: PIV
2082     Version ..........: 1.0
2083     Displayed s/n ....: yk-9074625
2084     PIN usage policy .: app-pin
2085     PIN retry counter : - [verified] -
2086     PIV authentication: 213D1825FDE0F8240CB4E4229F01AF90AC658C2E
2087           keyref .....: PIV.9A  (auth)
2088           algorithm ..: nistp384
2089     Card authenticat. : 7A53E6CFFE7220A0E646B4632EE29E5A7104499C
2090           keyref .....: PIV.9E  (auth)
2091           algorithm ..: nistp256
2092     Digital signature : 32A6C6FAFCB8421878608AAB452D5470DD3223ED
2093           keyref .....: PIV.9C  (sign,cert)
2094           algorithm ..: rsa2048
2095           used for ...: X.509
2096             user id ..: CN=Signing key for yk-9074625,O=example,C=DE
2097             user id ..: <otto@example.net>
2098     Key management ...: 34798AAFE0A7565088101CC4AE31C5C8C74461CB
2099           keyref .....: PIV.9D  (encr)
2100           algorithm ..: rsa2048
2101           used for ...: X.509
2102             user id ..: CN=Encryption key for yk-9074625,O=example,C=DE
2103             user id ..: <otto@example.net>
2104
2105   It is now possible to sign and to encrypt with this card using gpgsm
2106and to use the 'PIV authentication' key with ssh:
2107
2108     $ ssh-add -l
2109     384 SHA256:0qnJ0Y0ehWxKcx2frLfEljf6GCdlO55OZed5HqGHsaU cardno:yk-9074625 (ECDSA)
2110
2111   As usual use ssh-add with the uppercase '-L' to list the public ssh
2112key.  To use the certificates with Thunderbird or Mozilla, please
2113consult the Scute manual for details.
2114
2115   If you want to use the same PIV keys also for OpenPGP (for example on
2116a Yubikey to avoid switching between OpenPGP and PIV), this is also
2117possible:
2118
2119     $ gpgsm --learn
2120     $ gpg --full-gen-key
2121     Please select what kind of key you want:
2122        (1) RSA and RSA (default)
2123        (2) DSA and Elgamal
2124        (3) DSA (sign only)
2125        (4) RSA (sign only)
2126       (14) Existing key from card
2127     Your selection? 14
2128     Serial number of the card: FF020001008A77C1
2129     Available keys:
2130        (1) 213D1825FDE0F8240CB4E4229F01AF90AC658C2E PIV.9A nistp384 (auth)
2131        (2) 7A53E6CFFE7220A0E646B4632EE29E5A7104499C PIV.9E nistp256 (auth)
2132        (3) 32A6C6FAFCB8421878608AAB452D5470DD3223ED PIV.9C rsa2048 (cert,sign)
2133        (4) 34798AAFE0A7565088101CC4AE31C5C8C74461CB PIV.9D rsa2048 (encr)
2134     Your selection? 3
2135     Please specify how long the key should be valid.
2136              0 = key does not expire
2137           <n>  = key expires in n days
2138           <n>w = key expires in n weeks
2139           <n>m = key expires in n months
2140           <n>y = key expires in n years
2141     Key is valid for? (0)
2142     Key does not expire at all
2143     Is this correct? (y/N) y
2144
2145     GnuPG needs to construct a user ID to identify your key.
2146
2147     Real name:
2148     Email address: otto@example.net
2149     Comment:
2150     You selected this USER-ID:
2151         "otto@example.net"
2152
2153     Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
2154     gpg: key C3AFA9ED971BB365 marked as ultimately trusted
2155     gpg: revocation certificate stored as '[...]D971BB365.rev'
2156     public and secret key created and signed.
2157
2158     Note that this key cannot be used for encryption.  You may want to use
2159     the command "--edit-key" to generate a subkey for this purpose.
2160     pub   rsa2048 2019-04-04 [SC]
2161           7F899AE2FB73159DD68A1B20C3AFA9ED971BB365
2162     uid                      otto@example.net
2163
2164   Note that you will be asked two times to enter the PIN of your PIV
2165card.  If you run 'gpg' in '--expert' mode you will also ge given the
2166option to change the usage flags of the key.  The next typescript shows
2167how to add the encryption subkey:
2168
2169     $ gpg --edit-key 7F899AE2FB73159DD68A1B20C3AFA9ED971BB365
2170     Secret key is available.
2171
2172     sec  rsa2048/C3AFA9ED971BB365
2173          created: 2019-04-04  expires: never       usage: SC
2174          card-no: FF020001008A77C1
2175          trust: ultimate      validity: ultimate
2176     [ultimate] (1). otto@example.net
2177     gpg> addkey
2178     Secret parts of primary key are stored on-card.
2179     Please select what kind of key you want:
2180        (3) DSA (sign only)
2181        (4) RSA (sign only)
2182        (5) Elgamal (encrypt only)
2183        (6) RSA (encrypt only)
2184       (14) Existing key from card
2185     Your selection? 14
2186     Serial number of the card: FF020001008A77C1
2187     Available keys:
2188        (1) 213D1825FDE0F8240CB4E4229F01AF90AC658C2E PIV.9A nistp384 (auth)
2189        (2) 7A53E6CFFE7220A0E646B4632EE29E5A7104499C PIV.9E nistp256 (auth)
2190        (3) 32A6C6FAFCB8421878608AAB452D5470DD3223ED PIV.9C rsa2048 (cert,sign)
2191        (4) 34798AAFE0A7565088101CC4AE31C5C8C74461CB PIV.9D rsa2048 (encr)
2192     Your selection? 4
2193     Please specify how long the key should be valid.
2194              0 = key does not expire
2195           <n>  = key expires in n days
2196           <n>w = key expires in n weeks
2197           <n>m = key expires in n months
2198           <n>y = key expires in n years
2199     Key is valid for? (0)
2200     Key does not expire at all
2201     Is this correct? (y/N) y
2202     Really create? (y/N) y
2203
2204     sec  rsa2048/C3AFA9ED971BB365
2205          created: 2019-04-04  expires: never       usage: SC
2206          card-no: FF020001008A77C1
2207          trust: ultimate      validity: ultimate
2208     ssb  rsa2048/7067860A98FCE6E1
2209          created: 2019-04-04  expires: never       usage: E
2210          card-no: FF020001008A77C1
2211     [ultimate] (1). otto@example.net
2212
2213     gpg> save
2214
2215   Now you can use your PIV card also with 'gpg'.
2216
2217
2218File: gnupg.info,  Node: Helper Tools,  Next: Web Key Service,  Prev: Smart Card Tool,  Up: Top
2219
222010 Helper Tools
2221***************
2222
2223GnuPG comes with a couple of smaller tools:
2224
2225* Menu:
2226
2227* watchgnupg::            Read logs from a socket.
2228* gpgv::                  Verify OpenPGP signatures.
2229* addgnupghome::          Create .gnupg home directories.
2230* gpgconf::               Modify .gnupg home directories.
2231* applygnupgdefaults::    Run gpgconf for all users.
2232* gpg-preset-passphrase:: Put a passphrase into the cache.
2233* gpg-connect-agent::     Communicate with a running agent.
2234* dirmngr-client::        How to use the Dirmngr client tool.
2235* gpgparsemail::          Parse a mail message into an annotated format
2236* gpgtar::                Encrypt or sign files into an archive.
2237* gpg-check-pattern::     Check a passphrase on stdin against the patternfile.
2238
2239
2240File: gnupg.info,  Node: watchgnupg,  Next: gpgv,  Up: Helper Tools
2241
224210.1 Read logs from a socket
2243============================
2244
2245Most of the main utilities are able to write their log files to a Unix
2246Domain socket if configured that way.  'watchgnupg' is a simple listener
2247for such a socket.  It ameliorates the output with a time stamp and
2248makes sure that long lines are not interspersed with log output from
2249other utilities.  This tool is not available for Windows.
2250
2251'watchgnupg' is commonly invoked as
2252
2253     watchgnupg
2254
2255   which is a shorthand for
2256
2257     watchgnupg --force $(gpgconf --list-dirs socketdir)/S.log
2258
2259   To watch GnuPG running with a different home directory, use
2260
2261     watchgnupg --homedir DIR
2262
2263This starts it on the current terminal for listening on the standard
2264logging socket (this is commonly '/var/run/user/UID/gnupg/S.log' or if
2265no such user directory hierarchy exists '~/.gnupg/S.log').
2266
2267'watchgnupg' understands these options:
2268
2269'--force'
2270     Delete an already existing socket file.  This option is implicitly
2271     used if no socket name has been given on the command line.
2272
2273'--homedir DIR'
2274     If no socket name is given on the command line, pass DIR to gpgconf
2275     so that the socket for a GnuPG running with DIR has its home
2276     directory is used.  Note that the environment variable GNUPGHOME is
2277     ignored by watchgnupg.
2278
2279'--tcp N'
2280     Instead of reading from a local socket, listen for connects on TCP
2281     port N.  A Unix domain socket can optionally also be given as a
2282     second source.  This option does not use a default socket name.
2283
2284'--time-only'
2285     Do not print the date part of the timestamp.
2286
2287'--verbose'
2288     Enable extra informational output.
2289
2290'--version'
2291     Print version of the program and exit.
2292
2293'--help'
2294     Display a brief help page and exit.
2295
2296
2297Examples
2298********
2299
2300     $ watchgnupg --time-only
2301
2302   This waits for connections on the local socket (e.g.
2303'/var/run/user/1234/gnupg/S.log') and shows all log entries.  To make
2304this work the option 'log-file' needs to be used with all modules which
2305logs are to be shown.  The suggested entry for the configuration files
2306is:
2307
2308     log-file socket://
2309
2310   If the default socket as given above and returned by "echo $(gpgconf
2311-list-dirs socketdir)/S.log" is not desired an arbitrary socket name can
2312be specified, for example 'socket:///home/foo/bar/mysocket'.  For
2313debugging purposes it is also possible to do remote logging.  Take care
2314if you use this feature because the information is send in the clear
2315over the network.  Use this syntax in the conf files:
2316
2317     log-file tcp://192.168.1.1:4711
2318
2319   You may use any port and not just 4711 as shown above; only IP
2320addresses are supported (v4 and v6) and no host names.  You need to
2321start 'watchgnupg' with the 'tcp' option.  Note that under Windows the
2322registry entry HKCU\SOFTWARE\GNU\GNUPG:DEFAULTLOGFILE can be used to
2323change the default log output from 'stderr' to whatever is given by that
2324entry.  However the only useful entry is a TCP name for remote
2325debugging.
2326
2327
2328File: gnupg.info,  Node: gpgv,  Next: addgnupghome,  Prev: watchgnupg,  Up: Helper Tools
2329
233010.2 Verify OpenPGP signatures
2331==============================
2332
2333'gpgv' is an OpenPGP signature verification tool.
2334
2335   This program is actually a stripped-down version of 'gpg' which is
2336only able to check signatures.  It is somewhat smaller than the
2337fully-blown 'gpg' and uses a different (and simpler) way to check that
2338the public keys used to make the signature are valid.  There are no
2339configuration files and only a few options are implemented.
2340
2341   'gpgv' assumes that all keys in the keyring are trustworthy.  That
2342does also mean that it does not check for expired or revoked keys.
2343
2344   If no '--keyring' option is given, 'gpgv' looks for a "default"
2345keyring named 'trustedkeys.kbx' (preferred) or 'trustedkeys.gpg' in the
2346home directory of GnuPG, either the default home directory or the one
2347set by the '--homedir' option or the 'GNUPGHOME' environment variable.
2348If any '--keyring' option is used, 'gpgv' will not look for the default
2349keyring.  The '--keyring' option may be used multiple times and all
2350specified keyrings will be used together.
2351
2352
2353   'gpgv' recognizes these options:
2354
2355'--verbose'
2356'-v'
2357     Gives more information during processing.  If used twice, the input
2358     data is listed in detail.
2359
2360'--quiet'
2361'-q'
2362     Try to be as quiet as possible.
2363
2364'--keyring FILE'
2365     Add FILE to the list of keyrings.  If FILE begins with a tilde and
2366     a slash, these are replaced by the HOME directory.  If the filename
2367     does not contain a slash, it is assumed to be in the home-directory
2368     ("~/.gnupg" if -homedir is not used).
2369
2370'--output FILE'
2371'-o FILE'
2372     Write output to FILE; to write to stdout use '-'.  This option can
2373     be used to get the signed text from a cleartext or binary
2374     signature; it also works for detached signatures, but in that case
2375     this option is in general not useful.  Note that an existing file
2376     will be overwritten.
2377
2378'--status-fd N'
2379     Write special status strings to the file descriptor N.  See the
2380     file DETAILS in the documentation for a listing of them.
2381
2382'--logger-fd n'
2383     Write log output to file descriptor 'n' and not to stderr.
2384
2385'--log-file file'
2386     Same as '--logger-fd', except the logger data is written to file
2387     'file'.  Use 'socket://' to log to socket.
2388
2389'--ignore-time-conflict'
2390     GnuPG normally checks that the timestamps associated with keys and
2391     signatures have plausible values.  However, sometimes a signature
2392     seems to be older than the key due to clock problems.  This option
2393     turns these checks into warnings.
2394
2395'--homedir DIR'
2396     Set the name of the home directory to DIR.  If this option is not
2397     used, the home directory defaults to '~/.gnupg'.  It is only
2398     recognized when given on the command line.  It also overrides any
2399     home directory stated through the environment variable 'GNUPGHOME'
2400     or (on Windows systems) by means of the Registry entry
2401     HKCU\SOFTWARE\GNU\GNUPG:HOMEDIR.
2402
2403     On Windows systems it is possible to install GnuPG as a portable
2404     application.  In this case only this command line option is
2405     considered, all other ways to set a home directory are ignored.
2406
2407     To install GnuPG as a portable application under Windows, create an
2408     empty file named 'gpgconf.ctl' in the same directory as the tool
2409     'gpgconf.exe'.  The root of the installation is then that
2410     directory; or, if 'gpgconf.exe' has been installed directly below a
2411     directory named 'bin', its parent directory.  You also need to make
2412     sure that the following directories exist and are writable:
2413     'ROOT/home' for the GnuPG home and 'ROOT/usr/local/var/cache/gnupg'
2414     for internal cache files.
2415
2416'--weak-digest name'
2417     Treat the specified digest algorithm as weak.  Signatures made over
2418     weak digests algorithms are normally rejected.  This option can be
2419     supplied multiple times if multiple algorithms should be considered
2420     weak.  MD5 is always considered weak, and does not need to be
2421     listed explicitly.
2422
2423'--enable-special-filenames'
2424     This option enables a mode in which filenames of the form '-&n',
2425     where n is a non-negative decimal number, refer to the file
2426     descriptor n and not to a file with that name.
2427
2428   The program returns 0 if everything is fine, 1 if at least one
2429signature was bad, and other error codes for fatal errors.
2430
243110.2.1 Examples
2432---------------
2433
2434gpgv 'pgpfile'
2435gpgv 'sigfile' ['datafile']
2436     Verify the signature of the file.  The second form is used for
2437     detached signatures, where 'sigfile' is the detached signature
2438     (either ASCII-armored or binary) and 'datafile' contains the signed
2439     data; if 'datafile' is "-" the signed data is expected on 'stdin';
2440     if 'datafile' is not given the name of the file holding the signed
2441     data is constructed by cutting off the extension (".asc", ".sig" or
2442     ".sign") from 'sigfile'.
2443
244410.2.2 Environment
2445------------------
2446
2447HOME
2448     Used to locate the default home directory.
2449
2450GNUPGHOME
2451     If set directory used instead of "~/.gnupg".
2452
245310.2.3 FILES
2454------------
2455
2456~/.gnupg/trustedkeys.gpg
2457     The default keyring with the allowed keys.
2458
2459   'gpg'(1)
2460
2461
2462File: gnupg.info,  Node: addgnupghome,  Next: gpgconf,  Prev: gpgv,  Up: Helper Tools
2463
246410.3 Create .gnupg home directories
2465===================================
2466
2467If GnuPG is installed on a system with existing user accounts, it is
2468sometimes required to populate the GnuPG home directory with existing
2469files.  Especially a 'trustlist.txt' and a keybox with some initial
2470certificates are often desired.  This script helps to do this by copying
2471all files from '/etc/skel/.gnupg' to the home directories of the
2472accounts given on the command line.  It takes care not to overwrite
2473existing GnuPG home directories.
2474
2475'addgnupghome' is invoked by root as:
2476
2477     addgnupghome account1 account2 ... accountn
2478
2479
2480File: gnupg.info,  Node: gpgconf,  Next: applygnupgdefaults,  Prev: addgnupghome,  Up: Helper Tools
2481
248210.4 Modify .gnupg home directories
2483===================================
2484
2485The 'gpgconf' is a utility to automatically and reasonable safely query
2486and modify configuration files in the '.gnupg' home directory.  It is
2487designed not to be invoked manually by the user, but automatically by
2488graphical user interfaces (GUI).(1)
2489
2490   'gpgconf' provides access to the configuration of one or more
2491components of the GnuPG system.  These components correspond more or
2492less to the programs that exist in the GnuPG framework, like GPG, GPGSM,
2493DirMngr, etc.  But this is not a strict one-to-one relationship.  Not
2494all configuration options are available through 'gpgconf'.  'gpgconf'
2495provides a generic and abstract method to access the most important
2496configuration options that can feasibly be controlled via such a
2497mechanism.
2498
2499   'gpgconf' can be used to gather and change the options available in
2500each component, and can also provide their default values.  'gpgconf'
2501will give detailed type information that can be used to restrict the
2502user's input without making an attempt to commit the changes.
2503
2504   'gpgconf' provides the backend of a configuration editor.  The
2505configuration editor would usually be a graphical user interface program
2506that displays the current options, their default values, and allows the
2507user to make changes to the options.  These changes can then be made
2508active with 'gpgconf' again.  Such a program that uses 'gpgconf' in this
2509way will be called GUI throughout this section.
2510
2511* Menu:
2512
2513* Invoking gpgconf::       List of all commands and options.
2514* Format conventions::     Formatting conventions relevant for all commands.
2515* Listing components::     List all gpgconf components.
2516* Checking programs::      Check all programs known to gpgconf.
2517* Listing options::        List all options of a component.
2518* Changing options::       Changing options of a component.
2519* Listing global options:: List all global options.
2520* Querying versions::      Get and compare software versions.
2521* Files used by gpgconf::  What files are used by gpgconf.
2522
2523   ---------- Footnotes ----------
2524
2525   (1) Please note that currently no locking is done, so concurrent
2526access should be avoided.  There are some precautions to avoid
2527corruption with concurrent usage, but results may be inconsistent and
2528some changes may get lost.  The stateless design makes it difficult to
2529provide more guarantees.
2530
2531
2532File: gnupg.info,  Node: Invoking gpgconf,  Next: Format conventions,  Up: gpgconf
2533
253410.4.1 Invoking gpgconf
2535-----------------------
2536
2537One of the following commands must be given:
2538
2539'--list-components'
2540     List all components.  This is the default command used if none is
2541     specified.
2542
2543'--check-programs'
2544     List all available backend programs and test whether they are
2545     runnable.
2546
2547'--list-options COMPONENT'
2548     List all options of the component COMPONENT.
2549
2550'--change-options COMPONENT'
2551     Change the options of the component COMPONENT.
2552
2553'--check-options COMPONENT'
2554     Check the options for the component COMPONENT.
2555
2556'--apply-profile FILE'
2557     Apply the configuration settings listed in FILE to the
2558     configuration files.  If FILE has no suffix and no slashes the
2559     command first tries to read a file with the suffix '.prf' from the
2560     data directory ('gpgconf --list-dirs datadir') before it reads the
2561     file verbatim.  A profile is divided into sections using the
2562     bracketed component name.  Each section then lists the option which
2563     shall go into the respective configuration file.
2564
2565'--apply-defaults'
2566     Update all configuration files with values taken from the global
2567     configuration file (usually '/etc/gnupg/gpgconf.conf').
2568
2569'--list-dirs [NAMES]'
2570     Lists the directories used by 'gpgconf'.  One directory is listed
2571     per line, and each line consists of a colon-separated list where
2572     the first field names the directory type (for example 'sysconfdir')
2573     and the second field contains the percent-escaped directory.
2574     Although they are not directories, the socket file names used by
2575     'gpg-agent' and 'dirmngr' are printed as well.  Note that the
2576     socket file names and the 'homedir' lines are the default names and
2577     they may be overridden by command line switches.  If NAMES are
2578     given only the directories or file names specified by the list
2579     names are printed without any escaping.
2580
2581'--list-config [FILENAME]'
2582     List the global configuration file in a colon separated format.  If
2583     FILENAME is given, check that file instead.
2584
2585'--check-config [FILENAME]'
2586     Run a syntax check on the global configuration file.  If FILENAME
2587     is given, check that file instead.
2588
2589'--query-swdb PACKAGE_NAME [VERSION_STRING]'
2590     Returns the current version for PACKAGE_NAME and if VERSION_STRING
2591     is given also an indicator on whether an update is available.  The
2592     actual file with the software version is automatically downloaded
2593     and checked by 'dirmngr'.  'dirmngr' uses a thresholds to avoid
2594     download the file too often and it does this by default only if it
2595     can be done via Tor.  To force an update of that file this command
2596     can be used:
2597
2598                 gpg-connect-agent --dirmngr 'loadswdb --force' /bye
2599
2600'--reload [COMPONENT]'
2601     Reload all or the given component.  This is basically the same as
2602     sending a SIGHUP to the component.  Components which don't support
2603     reloading are ignored.  Without COMPONENT or by using "all" for
2604     COMPONENT all components which are daemons are reloaded.
2605
2606'--launch [COMPONENT]'
2607     If the COMPONENT is not already running, start it.  'component'
2608     must be a daemon.  This is in general not required because the
2609     system starts these daemons as needed.  However, external software
2610     making direct use of 'gpg-agent' or 'dirmngr' may use this command
2611     to ensure that they are started.  Using "all" for COMPONENT
2612     launches all components which are daemons.
2613
2614'--kill [COMPONENT]'
2615     Kill the given component that runs as a daemon, including
2616     'gpg-agent', 'dirmngr', and 'scdaemon'.  A 'component' which does
2617     not run as a daemon will be ignored.  Using "all" for COMPONENT
2618     kills all components running as daemons.  Note that as of now
2619     reload and kill have the same effect for 'scdaemon'.
2620
2621'--create-socketdir'
2622     Create a directory for sockets below /run/user or /var/run/user.
2623     This is command is only required if a non default home directory is
2624     used and the /run based sockets shall be used.  For the default
2625     home directory GnUPG creates a directory on the fly.
2626
2627'--remove-socketdir'
2628     Remove a directory created with command '--create-socketdir'.
2629
2630   The following options may be used:
2631
2632'-o FILE'
2633'--output FILE'
2634     Write output to FILE.  Default is to write to stdout.
2635
2636'-v'
2637'--verbose'
2638     Outputs additional information while running.  Specifically, this
2639     extends numerical field values by human-readable descriptions.
2640
2641'-q'
2642'--quiet'
2643     Try to be as quiet as possible.
2644
2645'--homedir DIR'
2646     Set the name of the home directory to DIR.  If this option is not
2647     used, the home directory defaults to '~/.gnupg'.  It is only
2648     recognized when given on the command line.  It also overrides any
2649     home directory stated through the environment variable 'GNUPGHOME'
2650     or (on Windows systems) by means of the Registry entry
2651     HKCU\SOFTWARE\GNU\GNUPG:HOMEDIR.
2652
2653     On Windows systems it is possible to install GnuPG as a portable
2654     application.  In this case only this command line option is
2655     considered, all other ways to set a home directory are ignored.
2656
2657     To install GnuPG as a portable application under Windows, create an
2658     empty file named 'gpgconf.ctl' in the same directory as the tool
2659     'gpgconf.exe'.  The root of the installation is then that
2660     directory; or, if 'gpgconf.exe' has been installed directly below a
2661     directory named 'bin', its parent directory.  You also need to make
2662     sure that the following directories exist and are writable:
2663     'ROOT/home' for the GnuPG home and 'ROOT/usr/local/var/cache/gnupg'
2664     for internal cache files.
2665
2666'--chuid UID'
2667     Change the current user to UID which may either be a number or a
2668     name.  This can be used from the root account to get information on
2669     the GnuPG environment of the specified user or to start or kill
2670     daemons.  If UID is not the current UID a standard PATH is set and
2671     the envvar GNUPGHOME is unset.  To override the latter the option
2672     '--homedir' can be used.  This option has currently no effect on
2673     Windows.
2674
2675'-n'
2676'--dry-run'
2677     Do not actually change anything.  This is currently only
2678     implemented for '--change-options' and can be used for testing
2679     purposes.
2680
2681'-r'
2682'--runtime'
2683     Only used together with '--change-options'.  If one of the modified
2684     options can be changed in a running daemon process, signal the
2685     running daemon to ask it to reparse its configuration file after
2686     changing.
2687
2688     This means that the changes will take effect at run-time, as far as
2689     this is possible.  Otherwise, they will take effect at the next
2690     start of the respective backend programs.
2691
2692'--status-fd N'
2693     Write special status strings to the file descriptor N.  This
2694     program returns the status messages SUCCESS or FAILURE which are
2695     helpful when the caller uses a double fork approach and can't
2696     easily get the return code of the process.
2697
2698
2699File: gnupg.info,  Node: Format conventions,  Next: Listing components,  Prev: Invoking gpgconf,  Up: gpgconf
2700
270110.4.2 Format conventions
2702-------------------------
2703
2704Some lines in the output of 'gpgconf' contain a list of colon-separated
2705fields.  The following conventions apply:
2706
2707   * The GUI program is required to strip off trailing newline and/or
2708     carriage return characters from the output.
2709
2710   * 'gpgconf' will never leave out fields.  If a certain version
2711     provides a certain field, this field will always be present in all
2712     'gpgconf' versions from that time on.
2713
2714   * Future versions of 'gpgconf' might append fields to the list.  New
2715     fields will always be separated from the previously last field by a
2716     colon separator.  The GUI should be prepared to parse the last
2717     field it knows about up until a colon or end of line.
2718
2719   * Not all fields are defined under all conditions.  You are required
2720     to ignore the content of undefined fields.
2721
2722   There are several standard types for the content of a field:
2723
2724verbatim
2725     Some fields contain strings that are not escaped in any way.  Such
2726     fields are described to be used _verbatim_.  These fields will
2727     never contain a colon character (for obvious reasons).  No
2728     de-escaping or other formatting is required to use the field
2729     content.  This is for easy parsing of the output, when it is known
2730     that the content can never contain any special characters.
2731
2732percent-escaped
2733     Some fields contain strings that are described to be
2734     _percent-escaped_.  Such strings need to be de-escaped before their
2735     content can be presented to the user.  A percent-escaped string is
2736     de-escaped by replacing all occurrences of '%XY' by the byte that
2737     has the hexadecimal value 'XY'.  'X' and 'Y' are from the set
2738     '0-9a-f'.
2739
2740localized
2741     Some fields contain strings that are described to be _localized_.
2742     Such strings are translated to the active language and formatted in
2743     the active character set.
2744
2745unsigned number
2746     Some fields contain an _unsigned number_.  This number will always
2747     fit into a 32-bit unsigned integer variable.  The number may be
2748     followed by a space, followed by a human readable description of
2749     that value (if the verbose option is used).  You should ignore
2750     everything in the field that follows the number.
2751
2752signed number
2753     Some fields contain a _signed number_.  This number will always fit
2754     into a 32-bit signed integer variable.  The number may be followed
2755     by a space, followed by a human readable description of that value
2756     (if the verbose option is used).  You should ignore everything in
2757     the field that follows the number.
2758
2759boolean value
2760     Some fields contain a _boolean value_.  This is a number with
2761     either the value 0 or 1.  The number may be followed by a space,
2762     followed by a human readable description of that value (if the
2763     verbose option is used).  You should ignore everything in the field
2764     that follows the number; checking just the first character is
2765     sufficient in this case.
2766
2767option
2768     Some fields contain an _option_ argument.  The format of an option
2769     argument depends on the type of the option and on some flags:
2770
2771     no argument
2772          The simplest case is that the option does not take an argument
2773          at all (TYPE '0').  Then the option argument is an unsigned
2774          number that specifies how often the option occurs.  If the
2775          'list' flag is not set, then the only valid number is '1'.
2776          Options that do not take an argument never have the 'default'
2777          or 'optional arg' flag set.
2778
2779     number
2780          If the option takes a number argument (ALT-TYPE is '2' or
2781          '3'), and it can only occur once ('list' flag is not set),
2782          then the option argument is either empty (only allowed if the
2783          argument is optional), or it is a number.  A number is a
2784          string that begins with an optional minus character, followed
2785          by one or more digits.  The number must fit into an integer
2786          variable (unsigned or signed, depending on ALT-TYPE).
2787
2788     number list
2789          If the option takes a number argument and it can occur more
2790          than once, then the option argument is either empty, or it is
2791          a comma-separated list of numbers as described above.
2792
2793     string
2794          If the option takes a string argument (ALT-TYPE is 1), and it
2795          can only occur once ('list' flag is not set) then the option
2796          argument is either empty (only allowed if the argument is
2797          optional), or it starts with a double quote character ('"')
2798          followed by a percent-escaped string that is the argument
2799          value.  Note that there is only a leading double quote
2800          character, no trailing one.  The double quote character is
2801          only needed to be able to differentiate between no value and
2802          the empty string as value.
2803
2804     string list
2805          If the option takes a string argument and it can occur more
2806          than once, then the option argument is either empty, or it is
2807          a comma-separated list of string arguments as described above.
2808
2809   The active language and character set are currently determined from
2810the locale environment of the 'gpgconf' program.
2811
2812
2813File: gnupg.info,  Node: Listing components,  Next: Checking programs,  Prev: Format conventions,  Up: gpgconf
2814
281510.4.3 Listing components
2816-------------------------
2817
2818The command '--list-components' will list all components that can be
2819configured with 'gpgconf'.  Usually, one component will correspond to
2820one GnuPG-related program and contain the options of that program's
2821configuration file that can be modified using 'gpgconf'.  However, this
2822is not necessarily the case.  A component might also be a group of
2823selected options from several programs, or contain entirely virtual
2824options that have a special effect rather than changing exactly one
2825option in one configuration file.
2826
2827   A component is a set of configuration options that semantically
2828belong together.  Furthermore, several changes to a component can be
2829made in an atomic way with a single operation.  The GUI could for
2830example provide a menu with one entry for each component, or a window
2831with one tabulator sheet per component.
2832
2833   The command '--list-components' lists all available components, one
2834per line.  The format of each line is:
2835
2836   'NAME:DESCRIPTION:PGMNAME:'
2837
2838NAME
2839     This field contains a name tag of the component.  The name tag is
2840     used to specify the component in all communication with 'gpgconf'.
2841     The name tag is to be used _verbatim_.  It is thus not in any
2842     escaped format.
2843
2844DESCRIPTION
2845     The _string_ in this field contains a human-readable description of
2846     the component.  It can be displayed to the user of the GUI for
2847     informational purposes.  It is _percent-escaped_ and _localized_.
2848
2849PGMNAME
2850     The _string_ in this field contains the absolute name of the
2851     program's file.  It can be used to unambiguously invoke that
2852     program.  It is _percent-escaped_.
2853
2854   Example:
2855     $ gpgconf --list-components
2856     gpg:GPG for OpenPGP:/usr/local/bin/gpg2:
2857     gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:
2858     scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:
2859     gpgsm:GPG for S/MIME:/usr/local/bin/gpgsm:
2860     dirmngr:Directory Manager:/usr/local/bin/dirmngr:
2861
2862
2863File: gnupg.info,  Node: Checking programs,  Next: Listing options,  Prev: Listing components,  Up: gpgconf
2864
286510.4.4 Checking programs
2866------------------------
2867
2868The command '--check-programs' is similar to '--list-components' but
2869works on backend programs and not on components.  It runs each program
2870to test whether it is installed and runnable.  This also includes a
2871syntax check of all config file options of the program.
2872
2873   The command '--check-programs' lists all available programs, one per
2874line.  The format of each line is:
2875
2876   'NAME:DESCRIPTION:PGMNAME:AVAIL:OKAY:CFGFILE:LINE:ERROR:'
2877
2878NAME
2879     This field contains a name tag of the program which is identical to
2880     the name of the component.  The name tag is to be used _verbatim_.
2881     It is thus not in any escaped format.  This field may be empty to
2882     indicate a continuation of error descriptions for the last name.
2883     The description and pgmname fields are then also empty.
2884
2885DESCRIPTION
2886     The _string_ in this field contains a human-readable description of
2887     the component.  It can be displayed to the user of the GUI for
2888     informational purposes.  It is _percent-escaped_ and _localized_.
2889
2890PGMNAME
2891     The _string_ in this field contains the absolute name of the
2892     program's file.  It can be used to unambiguously invoke that
2893     program.  It is _percent-escaped_.
2894
2895AVAIL
2896     The _boolean value_ in this field indicates whether the program is
2897     installed and runnable.
2898
2899OKAY
2900     The _boolean value_ in this field indicates whether the program's
2901     config file is syntactically okay.
2902
2903CFGFILE
2904     If an error occurred in the configuration file (as indicated by a
2905     false value in the field 'okay'), this field has the name of the
2906     failing configuration file.  It is _percent-escaped_.
2907
2908LINE
2909     If an error occurred in the configuration file, this field has the
2910     line number of the failing statement in the configuration file.  It
2911     is an _unsigned number_.
2912
2913ERROR
2914     If an error occurred in the configuration file, this field has the
2915     error text of the failing statement in the configuration file.  It
2916     is _percent-escaped_ and _localized_.
2917
2918In the following example the 'dirmngr' is not runnable and the
2919configuration file of 'scdaemon' is not okay.
2920
2921     $ gpgconf --check-programs
2922     gpg:GPG for OpenPGP:/usr/local/bin/gpg2:1:1:
2923     gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:1:1:
2924     scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:1:0:
2925     gpgsm:GPG for S/MIME:/usr/local/bin/gpgsm:1:1:
2926     dirmngr:Directory Manager:/usr/local/bin/dirmngr:0:0:
2927
2928The command '--check-options COMPONENT' will verify the configuration
2929file in the same manner as '--check-programs', but only for the
2930component COMPONENT.
2931
2932
2933File: gnupg.info,  Node: Listing options,  Next: Changing options,  Prev: Checking programs,  Up: gpgconf
2934
293510.4.5 Listing options
2936----------------------
2937
2938Every component contains one or more options.  Options may be gathered
2939into option groups to allow the GUI to give visual hints to the user
2940about which options are related.
2941
2942   The command '--list-options COMPONENT' lists all options (and the
2943groups they belong to) in the component COMPONENT, one per line.
2944COMPONENT must be the string in the field NAME in the output of the
2945'--list-components' command.
2946
2947   There is one line for each option and each group.  First come all
2948options that are not in any group.  Then comes a line describing a
2949group.  Then come all options that belong into each group.  Then comes
2950the next group and so on.  There does not need to be any group (and in
2951this case the output will stop after the last non-grouped option).
2952
2953   The format of each line is:
2954
2955   'NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE'
2956
2957NAME
2958     This field contains a name tag for the group or option.  The name
2959     tag is used to specify the group or option in all communication
2960     with 'gpgconf'.  The name tag is to be used _verbatim_.  It is thus
2961     not in any escaped format.
2962
2963FLAGS
2964     The flags field contains an _unsigned number_.  Its value is the
2965     OR-wise combination of the following flag values:
2966
2967     'group (1)'
2968          If this flag is set, this is a line describing a group and not
2969          an option.
2970
2971     The following flag values are only defined for options (that is, if
2972     the 'group' flag is not used).
2973
2974     'optional arg (2)'
2975          If this flag is set, the argument is optional.  This is never
2976          set for TYPE '0' (none) options.
2977
2978     'list (4)'
2979          If this flag is set, the option can be given multiple times.
2980
2981     'runtime (8)'
2982          If this flag is set, the option can be changed at runtime.
2983
2984     'default (16)'
2985          If this flag is set, a default value is available.
2986
2987     'default desc (32)'
2988          If this flag is set, a (runtime) default is available.  This
2989          and the 'default' flag are mutually exclusive.
2990
2991     'no arg desc (64)'
2992          If this flag is set, and the 'optional arg' flag is set, then
2993          the option has a special meaning if no argument is given.
2994
2995     'no change (128)'
2996          If this flag is set, 'gpgconf' ignores requests to change the
2997          value.  GUI frontends should grey out this option.  Note, that
2998          manual changes of the configuration files are still possible.
2999
3000LEVEL
3001     This field is defined for options and for groups.  It contains an
3002     _unsigned number_ that specifies the expert level under which this
3003     group or option should be displayed.  The following expert levels
3004     are defined for options (they have analogous meaning for groups):
3005
3006     'basic (0)'
3007          This option should always be offered to the user.
3008
3009     'advanced (1)'
3010          This option may be offered to advanced users.
3011
3012     'expert (2)'
3013          This option should only be offered to expert users.
3014
3015     'invisible (3)'
3016          This option should normally never be displayed, not even to
3017          expert users.
3018
3019     'internal (4)'
3020          This option is for internal use only.  Ignore it.
3021
3022     The level of a group will always be the lowest level of all options
3023     it contains.
3024
3025DESCRIPTION
3026     This field is defined for options and groups.  The _string_ in this
3027     field contains a human-readable description of the option or group.
3028     It can be displayed to the user of the GUI for informational
3029     purposes.  It is _percent-escaped_ and _localized_.
3030
3031TYPE
3032     This field is only defined for options.  It contains an _unsigned
3033     number_ that specifies the type of the option's argument, if any.
3034     The following types are defined:
3035
3036     Basic types:
3037
3038     'none (0)'
3039          No argument allowed.
3040
3041     'string (1)'
3042          An _unformatted string_.
3043
3044     'int32 (2)'
3045          A _signed number_.
3046
3047     'uint32 (3)'
3048          An _unsigned number_.
3049
3050     Complex types:
3051
3052     'pathname (32)'
3053          A _string_ that describes the pathname of a file.  The file
3054          does not necessarily need to exist.
3055
3056     'ldap server (33)'
3057          A _string_ that describes an LDAP server in the format:
3058
3059          'HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN'
3060
3061     'key fingerprint (34)'
3062          A _string_ with a 40 digit fingerprint specifying a
3063          certificate.
3064
3065     'pub key (35)'
3066          A _string_ that describes a certificate by user ID, key ID or
3067          fingerprint.
3068
3069     'sec key (36)'
3070          A _string_ that describes a certificate with a key by user ID,
3071          key ID or fingerprint.
3072
3073     'alias list (37)'
3074          A _string_ that describes an alias list, like the one used
3075          with gpg's group option.  The list consists of a key, an equal
3076          sign and space separated values.
3077
3078     More types will be added in the future.  Please see the ALT-TYPE
3079     field for information on how to cope with unknown types.
3080
3081ALT-TYPE
3082     This field is identical to TYPE, except that only the types '0' to
3083     '31' are allowed.  The GUI is expected to present the user the
3084     option in the format specified by TYPE.  But if the argument type
3085     TYPE is not supported by the GUI, it can still display the option
3086     in the more generic basic type ALT-TYPE.  The GUI must support all
3087     the defined basic types to be able to display all options.  More
3088     basic types may be added in future versions.  If the GUI encounters
3089     a basic type it doesn't support, it should report an error and
3090     abort the operation.
3091
3092ARGNAME
3093     This field is only defined for options with an argument type TYPE
3094     that is not '0'.  In this case it may contain a _percent-escaped_
3095     and _localized string_ that gives a short name for the argument.
3096     The field may also be empty, though, in which case a short name is
3097     not known.
3098
3099DEFAULT
3100     This field is defined only for options for which the 'default' or
3101     'default desc' flag is set.  If the 'default' flag is set, its
3102     format is that of an _option argument_ (*note Format conventions::,
3103     for details).  If the default value is empty, then no default is
3104     known.  Otherwise, the value specifies the default value for this
3105     option.  If the 'default desc' flag is set, the field is either
3106     empty or contains a description of the effect if the option is not
3107     given.
3108
3109ARGDEF
3110     This field is defined only for options for which the 'optional arg'
3111     flag is set.  If the 'no arg desc' flag is not set, its format is
3112     that of an _option argument_ (*note Format conventions::, for
3113     details).  If the default value is empty, then no default is known.
3114     Otherwise, the value specifies the default argument for this
3115     option.  If the 'no arg desc' flag is set, the field is either
3116     empty or contains a description of the effect of this option if no
3117     argument is given.
3118
3119VALUE
3120     This field is defined only for options.  Its format is that of an
3121     _option argument_.  If it is empty, then the option is not
3122     explicitly set in the current configuration, and the default
3123     applies (if any).  Otherwise, it contains the current value of the
3124     option.  Note that this field is also meaningful if the option
3125     itself does not take a real argument (in this case, it contains the
3126     number of times the option appears).
3127
3128
3129File: gnupg.info,  Node: Changing options,  Next: Listing global options,  Prev: Listing options,  Up: gpgconf
3130
313110.4.6 Changing options
3132-----------------------
3133
3134The command '--change-options COMPONENT' will attempt to change the
3135options of the component COMPONENT to the specified values.  COMPONENT
3136must be the string in the field NAME in the output of the
3137'--list-components' command.  You have to provide the options that shall
3138be changed in the following format on standard input:
3139
3140   'NAME:FLAGS:NEW-VALUE'
3141
3142NAME
3143     This is the name of the option to change.  NAME must be the string
3144     in the field NAME in the output of the '--list-options' command.
3145
3146FLAGS
3147     The flags field contains an _unsigned number_.  Its value is the
3148     OR-wise combination of the following flag values:
3149
3150     'default (16)'
3151          If this flag is set, the option is deleted and the default
3152          value is used instead (if applicable).
3153
3154NEW-VALUE
3155     The new value for the option.  This field is only defined if the
3156     'default' flag is not set.  The format is that of an _option
3157     argument_.  If it is empty (or the field is omitted), the default
3158     argument is used (only allowed if the argument is optional for this
3159     option).  Otherwise, the option will be set to the specified value.
3160
3161The output of the command is the same as that of '--check-options' for
3162the modified configuration file.
3163
3164   Examples:
3165
3166   To set the force option, which is of basic type 'none (0)':
3167
3168     $ echo 'force:0:1' | gpgconf --change-options dirmngr
3169
3170   To delete the force option:
3171
3172     $ echo 'force:16:' | gpgconf --change-options dirmngr
3173
3174   The '--runtime' option can influence when the changes take effect.
3175
3176
3177File: gnupg.info,  Node: Listing global options,  Next: Querying versions,  Prev: Changing options,  Up: gpgconf
3178
317910.4.7 Listing global options
3180-----------------------------
3181
3182Sometimes it is useful for applications to look at the global options
3183file 'gpgconf.conf'.  The colon separated listing format is record
3184oriented and uses the first field to identify the record type:
3185
3186'k'
3187     This describes a key record to start the definition of a new
3188     ruleset for a user/group.  The format of a key record is:
3189
3190     'k:USER:GROUP:'
3191
3192     USER
3193          This is the user field of the key.  It is percent escaped.
3194          See the definition of the gpgconf.conf format for details.
3195
3196     GROUP
3197          This is the group field of the key.  It is percent escaped.
3198
3199'r'
3200     This describes a rule record.  All rule records up to the next key
3201     record make up a rule set for that key.  The format of a rule
3202     record is:
3203
3204     'r:::COMPONENT:OPTION:FLAG:VALUE:'
3205
3206     COMPONENT
3207          This is the component part of a rule.  It is a plain string.
3208
3209     OPTION
3210          This is the option part of a rule.  It is a plain string.
3211
3212     FLAG
3213          This is the flags part of a rule.  There may be only one flag
3214          per rule but by using the same component and option, several
3215          flags may be assigned to an option.  It is a plain string.
3216
3217     VALUE
3218          This is the optional value for the option.  It is a percent
3219          escaped string with a single quotation mark to indicate a
3220          string.  The quotation mark is only required to distinguish
3221          between no value specified and an empty string.
3222
3223Unknown record types should be ignored.  Note that there is
3224intentionally no feature to change the global option file through
3225'gpgconf'.
3226
3227
3228File: gnupg.info,  Node: Querying versions,  Next: Files used by gpgconf,  Prev: Listing global options,  Up: gpgconf
3229
323010.4.8 Get and compare software versions.
3231-----------------------------------------
3232
3233The GnuPG Project operates a server to query the current versions of
3234software packages related to GnuPG. 'gpgconf' can be used to access this
3235online database.  To allow for offline operations, this feature works by
3236having 'dirmngr' download a file from 'https://versions.gnupg.org',
3237checking the signature of that file and storing the file in the GnuPG
3238home directory.  If 'gpgconf' is used and 'dirmngr' is running, it may
3239ask 'dirmngr' to refresh that file before itself uses the file.
3240
3241   The command '--query-swdb' returns information for the given package
3242in a colon delimited format:
3243
3244NAME
3245     This is the name of the package as requested.  Note that "gnupg" is
3246     a special name which is replaced by the actual package implementing
3247     this version of GnuPG. For this name it is also not required to
3248     specify a version because 'gpgconf' takes its own version in this
3249     case.
3250
3251IVERSION
3252     The currently installed version or an empty string.  The value is
3253     taken from the command line argument but may be provided by gpg if
3254     not given.
3255
3256STATUS
3257     The status of the software package according to this table:
3258     '-'
3259          No information available.  This is either because no current
3260          version has been specified or due to an error.
3261     '?'
3262          The given name is not known in the online database.
3263     'u'
3264          An update of the software is available.
3265     'c'
3266          The installed version of the software is current.
3267     'n'
3268          The installed version is already newer than the released
3269          version.
3270
3271URGENCY
3272     If the value (the empty string should be considered as zero) is
3273     greater than zero an important update is available.
3274
3275ERROR
3276     This returns an 'gpg-error' error code to distinguish between
3277     various failure modes.
3278
3279FILEDATE
3280     This gives the date of the file with the version numbers in
3281     standard ISO format ('yyyymmddThhmmss').  The date has been
3282     extracted by 'dirmngr' from the signature of the file.
3283
3284VERIFIED
3285     This gives the date in ISO format the file was downloaded.  This
3286     value can be used to evaluate the freshness of the information.
3287
3288VERSION
3289     This returns the version string for the requested software from the
3290     file.
3291
3292RELDATE
3293     This returns the release date in ISO format.
3294
3295SIZE
3296     This returns the size of the package as decimal number of bytes.
3297
3298HASH
3299     This returns a hexified SHA-2 hash of the package.
3300
3301More fields may be added in future to the output.
3302
3303
3304File: gnupg.info,  Node: Files used by gpgconf,  Prev: Querying versions,  Up: gpgconf
3305
330610.4.9 Files used by gpgconf
3307----------------------------
3308
3309'/etc/gnupg/gpgconf.conf'
3310     If this file exists, it is processed as a global configuration
3311     file.  A commented example can be found in the 'examples' directory
3312     of the distribution.
3313
3314'GNUPGHOME/swdb.lst'
3315     A file with current software versions.  'dirmngr' creates this file
3316     on demand from an online resource.
3317
3318
3319File: gnupg.info,  Node: applygnupgdefaults,  Next: gpg-preset-passphrase,  Prev: gpgconf,  Up: Helper Tools
3320
332110.5 Run gpgconf for all users
3322==============================
3323
3324This script is a wrapper around 'gpgconf' to run it with the command
3325'--apply-defaults' for all real users with an existing GnuPG home
3326directory.  Admins might want to use this script to update he GnuPG
3327configuration files for all users after '/etc/gnupg/gpgconf.conf' has
3328been changed.  This allows enforcing certain policies for all users.
3329Note, that this is not a bulletproof way to force a user to use certain
3330options.  A user may always directly edit the configuration files and
3331bypass gpgconf.
3332
3333'applygnupgdefaults' is invoked by root as:
3334
3335     applygnupgdefaults
3336
3337
3338File: gnupg.info,  Node: gpg-preset-passphrase,  Next: gpg-connect-agent,  Prev: applygnupgdefaults,  Up: Helper Tools
3339
334010.6 Put a passphrase into the cache
3341====================================
3342
3343The 'gpg-preset-passphrase' is a utility to seed the internal cache of a
3344running 'gpg-agent' with passphrases.  It is mainly useful for
3345unattended machines, where the usual 'pinentry' tool may not be used and
3346the passphrases for the to be used keys are given at machine startup.
3347
3348   This program works with GnuPG 2 and later.  GnuPG 1.x is not
3349supported.
3350
3351   Passphrases set with this utility don't expire unless the '--forget'
3352option is used to explicitly clear them from the cache -- or 'gpg-agent'
3353is either restarted or reloaded (by sending a SIGHUP to it).  Note that
3354the maximum cache time as set with '--max-cache-ttl' is still honored.
3355It is necessary to allow this passphrase presetting by starting
3356'gpg-agent' with the '--allow-preset-passphrase'.
3357
3358* Menu:
3359
3360* Invoking gpg-preset-passphrase::   List of all commands and options.
3361
3362
3363File: gnupg.info,  Node: Invoking gpg-preset-passphrase,  Up: gpg-preset-passphrase
3364
336510.6.1 List of all commands and options
3366---------------------------------------
3367
3368'gpg-preset-passphrase' is invoked this way:
3369
3370     gpg-preset-passphrase [options] [command] CACHEID
3371
3372   CACHEID is either a 40 character keygrip of hexadecimal characters
3373identifying the key for which the passphrase should be set or cleared.
3374The keygrip is listed along with the key when running the command:
3375'gpgsm --with-keygrip --list-secret-keys'.  Alternatively an arbitrary
3376string may be used to identify a passphrase; it is suggested that such a
3377string is prefixed with the name of the application (e.g 'foo:12346').
3378Scripts should always use the option '--with-colons', which provides the
3379keygrip in a "grp" line (cf.  'doc/DETAILS')/
3380
3381One of the following command options must be given:
3382
3383'--preset'
3384     Preset a passphrase.  This is what you usually will use.
3385     'gpg-preset-passphrase' will then read the passphrase from 'stdin'.
3386
3387'--forget'
3388     Flush the passphrase for the given cache ID from the cache.
3389
3390The following additional options may be used:
3391
3392'-v'
3393'--verbose'
3394     Output additional information while running.
3395
3396'-P STRING'
3397'--passphrase STRING'
3398     Instead of reading the passphrase from 'stdin', use the supplied
3399     STRING as passphrase.  Note that this makes the passphrase visible
3400     for other users.
3401
3402
3403File: gnupg.info,  Node: gpg-connect-agent,  Next: dirmngr-client,  Prev: gpg-preset-passphrase,  Up: Helper Tools
3404
340510.7 Communicate with a running agent
3406=====================================
3407
3408The 'gpg-connect-agent' is a utility to communicate with a running
3409'gpg-agent'.  It is useful to check out the commands 'gpg-agent'
3410provides using the Assuan interface.  It might also be useful for
3411scripting simple applications.  Input is expected at stdin and output
3412gets printed to stdout.
3413
3414   It is very similar to running 'gpg-agent' in server mode; but here we
3415connect to a running instance.
3416
3417* Menu:
3418
3419* Invoking gpg-connect-agent::       List of all options.
3420* Controlling gpg-connect-agent::    Control commands.
3421
3422
3423File: gnupg.info,  Node: Invoking gpg-connect-agent,  Next: Controlling gpg-connect-agent,  Up: gpg-connect-agent
3424
342510.7.1 List of all options
3426--------------------------
3427
3428'gpg-connect-agent' is invoked this way:
3429
3430     gpg-connect-agent [options] [commands]
3431
3432The following options may be used:
3433
3434'--dirmngr'
3435     Connect to a running directory manager (keyserver client) instead
3436     of to the gpg-agent.  If a dirmngr is not running, start it.
3437
3438'--keyboxd'
3439     Connect to a running keybox daemon instead of to the gpg-agent.  If
3440     a keyboxd is not running, start it.
3441
3442'-S'
3443'--raw-socket NAME'
3444     Connect to socket NAME assuming this is an Assuan style server.  Do
3445     not run any special initializations or environment checks.  This
3446     may be used to directly connect to any Assuan style socket server.
3447
3448'-E'
3449'--exec'
3450     Take the rest of the command line as a program and it's arguments
3451     and execute it as an Assuan server.  Here is how you would run
3452     'gpgsm':
3453           gpg-connect-agent --exec gpgsm --server
3454     Note that you may not use options on the command line in this case.
3455
3456'-v'
3457'--verbose'
3458     Output additional information while running.
3459
3460'-q'
3461'--quiet'
3462     Try to be as quiet as possible.
3463
3464'--homedir DIR'
3465     Set the name of the home directory to DIR.  If this option is not
3466     used, the home directory defaults to '~/.gnupg'.  It is only
3467     recognized when given on the command line.  It also overrides any
3468     home directory stated through the environment variable 'GNUPGHOME'
3469     or (on Windows systems) by means of the Registry entry
3470     HKCU\SOFTWARE\GNU\GNUPG:HOMEDIR.
3471
3472     On Windows systems it is possible to install GnuPG as a portable
3473     application.  In this case only this command line option is
3474     considered, all other ways to set a home directory are ignored.
3475
3476     To install GnuPG as a portable application under Windows, create an
3477     empty file named 'gpgconf.ctl' in the same directory as the tool
3478     'gpgconf.exe'.  The root of the installation is then that
3479     directory; or, if 'gpgconf.exe' has been installed directly below a
3480     directory named 'bin', its parent directory.  You also need to make
3481     sure that the following directories exist and are writable:
3482     'ROOT/home' for the GnuPG home and 'ROOT/usr/local/var/cache/gnupg'
3483     for internal cache files.
3484
3485'--chuid UID'
3486     Change the current user to UID which may either be a number or a
3487     name.  This can be used from the root account to run
3488     gpg-connect-agent for another user.  If UID is not the current UID
3489     a standard PATH is set and the envvar GNUPGHOME is unset.  To
3490     override the latter the option '--homedir' can be used.  This
3491     option has only an effect when used on the command line.  This
3492     option has currently no effect at all on Windows.
3493
3494'--no-ext-connect'
3495     When using '-S' or '--exec', 'gpg-connect-agent' connects to the
3496     Assuan server in extended mode to allow descriptor passing.  This
3497     option makes it use the old mode.
3498
3499'--no-autostart'
3500     Do not start the gpg-agent or the dirmngr if it has not yet been
3501     started.
3502
3503'--no-history'
3504     In interactive mode the command line history is usually saved and
3505     restored to and from a file below the GnuPG home directory.  This
3506     option inhibits the use of that file.
3507
3508'--agent-program FILE'
3509     Specify the agent program to be started if none is running.  The
3510     default value is determined by running 'gpgconf' with the option
3511     '--list-dirs'.  Note that the pipe symbol ('|') is used for a
3512     regression test suite hack and may thus not be used in the file
3513     name.
3514
3515'--dirmngr-program FILE'
3516     Specify the directory manager (keyserver client) program to be
3517     started if none is running.  This has only an effect if used
3518     together with the option '--dirmngr'.
3519
3520'--keyboxd-program FILE'
3521     Specify the keybox daemon program to be started if none is running.
3522     This has only an effect if used together with the option
3523     '--keyboxd'.
3524
3525'-r FILE'
3526'--run FILE'
3527     Run the commands from FILE at startup and then continue with the
3528     regular input method.  Note, that commands given on the command
3529     line are executed after this file.
3530
3531'-s'
3532'--subst'
3533     Run the command '/subst' at startup.
3534
3535'--hex'
3536     Print data lines in a hex format and the ASCII representation of
3537     non-control characters.
3538
3539'--decode'
3540     Decode data lines.  That is to remove percent escapes but make sure
3541     that a new line always starts with a D and a space.
3542
3543
3544File: gnupg.info,  Node: Controlling gpg-connect-agent,  Prev: Invoking gpg-connect-agent,  Up: gpg-connect-agent
3545
354610.7.2 Control commands
3547-----------------------
3548
3549While reading Assuan commands, gpg-agent also allows a few special
3550commands to control its operation.  These control commands all start
3551with a slash ('/').
3552
3553'/echo ARGS'
3554     Just print ARGS.
3555
3556'/let NAME VALUE'
3557     Set the variable NAME to VALUE.  Variables are only substituted on
3558     the input if the '/subst' has been used.  Variables are referenced
3559     by prefixing the name with a dollar sign and optionally include the
3560     name in curly braces.  The rules for a valid name are identically
3561     to those of the standard bourne shell.  This is not yet enforced
3562     but may be in the future.  When used with curly braces no leading
3563     or trailing white space is allowed.
3564
3565     If a variable is not found, it is searched in the environment and
3566     if found copied to the table of variables.
3567
3568     Variable functions are available: The name of the function must be
3569     followed by at least one space and the at least one argument.  The
3570     following functions are available:
3571
3572     'get'
3573          Return a value described by the argument.  Available arguments
3574          are:
3575
3576          'cwd'
3577               The current working directory.
3578          'homedir'
3579               The gnupg homedir.
3580          'sysconfdir'
3581               GnuPG's system configuration directory.
3582          'bindir'
3583               GnuPG's binary directory.
3584          'libdir'
3585               GnuPG's library directory.
3586          'libexecdir'
3587               GnuPG's library directory for executable files.
3588          'datadir'
3589               GnuPG's data directory.
3590          'serverpid'
3591               The PID of the current server.  Command '/serverpid' must
3592               have been given to return a useful value.
3593
3594     'unescape ARGS'
3595          Remove C-style escapes from ARGS.  Note that '\0' and '\x00'
3596          terminate the returned string implicitly.  The string to be
3597          converted are the entire arguments right behind the delimiting
3598          space of the function name.
3599
3600     'unpercent ARGS'
3601     'unpercent+ ARGS'
3602          Remove percent style escaping from ARGS.  Note that '%00'
3603          terminates the string implicitly.  The string to be converted
3604          are the entire arguments right behind the delimiting space of
3605          the function name.  'unpercent+' also maps plus signs to a
3606          spaces.
3607
3608     'percent ARGS'
3609     'percent+ ARGS'
3610          Escape the ARGS using percent style escaping.  Tabs,
3611          formfeeds, linefeeds, carriage returns and colons are escaped.
3612          'percent+' also maps spaces to plus signs.
3613
3614     'errcode ARG'
3615     'errsource ARG'
3616     'errstring ARG'
3617          Assume ARG is an integer and evaluate it using 'strtol'.
3618          Return the gpg-error error code, error source or a formatted
3619          string with the error code and error source.
3620
3621     '+'
3622     '-'
3623     '*'
3624     '/'
3625     '%'
3626          Evaluate all arguments as long integers using 'strtol' and
3627          apply this operator.  A division by zero yields an empty
3628          string.
3629
3630     '!'
3631     '|'
3632     '&'
3633          Evaluate all arguments as long integers using 'strtol' and
3634          apply the logical operators NOT, OR or AND. The NOT operator
3635          works on the last argument only.
3636
3637'/definq NAME VAR'
3638     Use content of the variable VAR for inquiries with NAME.  NAME may
3639     be an asterisk ('*') to match any inquiry.
3640
3641'/definqfile NAME FILE'
3642     Use content of FILE for inquiries with NAME.  NAME may be an
3643     asterisk ('*') to match any inquiry.
3644
3645'/definqprog NAME PROG'
3646     Run PROG for inquiries matching NAME and pass the entire line to it
3647     as command line arguments.
3648
3649'/datafile NAME'
3650     Write all data lines from the server to the file NAME.  The file is
3651     opened for writing and created if it does not exists.  An existing
3652     file is first truncated to 0.  The data written to the file fully
3653     decoded.  Using a single dash for NAME writes to stdout.  The file
3654     is kept open until a new file is set using this command or this
3655     command is used without an argument.
3656
3657'/showdef'
3658     Print all definitions
3659
3660'/cleardef'
3661     Delete all definitions
3662
3663'/sendfd FILE MODE'
3664     Open FILE in MODE (which needs to be a valid 'fopen' mode string)
3665     and send the file descriptor to the server.  This is usually
3666     followed by a command like 'INPUT FD' to set the input source for
3667     other commands.
3668
3669'/recvfd'
3670     Not yet implemented.
3671
3672'/open VAR FILE [MODE]'
3673     Open FILE and assign the file descriptor to VAR.  Warning: This
3674     command is experimental and might change in future versions.
3675
3676'/close FD'
3677     Close the file descriptor FD.  Warning: This command is
3678     experimental and might change in future versions.
3679
3680'/showopen'
3681     Show a list of open files.
3682
3683'/serverpid'
3684     Send the Assuan command 'GETINFO pid' to the server and store the
3685     returned PID for internal purposes.
3686
3687'/sleep'
3688     Sleep for a second.
3689
3690'/hex'
3691'/nohex'
3692     Same as the command line option '--hex'.
3693
3694'/decode'
3695'/nodecode'
3696     Same as the command line option '--decode'.
3697
3698'/subst'
3699'/nosubst'
3700     Enable and disable variable substitution.  It defaults to disabled
3701     unless the command line option '--subst' has been used.  If /subst
3702     as been enabled once, leading whitespace is removed from input
3703     lines which makes scripts easier to read.
3704
3705'/while CONDITION'
3706'/end'
3707     These commands provide a way for executing loops.  All lines
3708     between the 'while' and the corresponding 'end' are executed as
3709     long as the evaluation of CONDITION yields a non-zero value or is
3710     the string 'true' or 'yes'.  The evaluation is done by passing
3711     CONDITION to the 'strtol' function.  Example:
3712
3713            /subst
3714            /let i 3
3715            /while $i
3716              /echo loop counter is $i
3717              /let i ${- $i 1}
3718            /end
3719
3720'/if CONDITION'
3721'/end'
3722     These commands provide a way for conditional execution.  All lines
3723     between the 'if' and the corresponding 'end' are executed only if
3724     the evaluation of CONDITION yields a non-zero value or is the
3725     string 'true' or 'yes'.  The evaluation is done by passing
3726     CONDITION to the 'strtol' function.
3727
3728'/run FILE'
3729     Run commands from FILE.
3730
3731'/history --clear'
3732     Clear the command history.
3733
3734'/bye'
3735     Terminate the connection and the program.
3736
3737'/help'
3738     Print a list of available control commands.
3739
3740
3741File: gnupg.info,  Node: dirmngr-client,  Next: gpgparsemail,  Prev: gpg-connect-agent,  Up: Helper Tools
3742
374310.8 The Dirmngr Client Tool
3744============================
3745
3746The 'dirmngr-client' is a simple tool to contact a running dirmngr and
3747test whether a certificate has been revoked -- either by being listed in
3748the corresponding CRL or by running the OCSP protocol.  If no dirmngr is
3749running, a new instances will be started but this is in general not a
3750good idea due to the huge performance overhead.
3751
3752The usual way to run this tool is either:
3753
3754     dirmngr-client ACERT
3755
3756or
3757
3758     dirmngr-client <ACERT
3759
3760   Where ACERT is one DER encoded (binary) X.509 certificates to be
3761tested.  The return value of this command is
3762
3763'0'
3764     The certificate under question is valid; i.e.  there is a valid CRL
3765     available and it is not listed there or the OCSP request returned
3766     that that certificate is valid.
3767
3768'1'
3769     The certificate has been revoked
3770
3771'2 (and other values)'
3772     There was a problem checking the revocation state of the
3773     certificate.  A message to stderr has given more detailed
3774     information.  Most likely this is due to a missing or expired CRL
3775     or due to a network problem.
3776
3777'dirmngr-client' may be called with the following options:
3778
3779'--version'
3780     Print the program version and licensing information.  Note that you
3781     cannot abbreviate this command.
3782
3783'--help, -h'
3784     Print a usage message summarizing the most useful command-line
3785     options.  Note that you cannot abbreviate this command.
3786
3787'--quiet, -q'
3788     Make the output extra brief by suppressing any informational
3789     messages.
3790
3791'-v'
3792'--verbose'
3793     Outputs additional information while running.  You can increase the
3794     verbosity by giving several verbose commands to DIRMNGR, such as
3795     '-vv'.
3796
3797'--pem'
3798     Assume that the given certificate is in PEM (armored) format.
3799
3800'--ocsp'
3801     Do the check using the OCSP protocol and ignore any CRLs.
3802
3803'--force-default-responder'
3804     When checking using the OCSP protocol, force the use of the default
3805     OCSP responder.  That is not to use the Reponder as given by the
3806     certificate.
3807
3808'--ping'
3809     Check whether the dirmngr daemon is up and running.
3810
3811'--cache-cert'
3812     Put the given certificate into the cache of a running dirmngr.
3813     This is mainly useful for debugging.
3814
3815'--validate'
3816     Validate the given certificate using dirmngr's internal validation
3817     code.  This is mainly useful for debugging.
3818
3819'--load-crl'
3820     This command expects a list of filenames with DER encoded CRL
3821     files.  With the option '--url' URLs are expected in place of
3822     filenames and they are loaded directly from the given location.
3823     All CRLs will be validated and then loaded into dirmngr's cache.
3824
3825'--lookup'
3826     Take the remaining arguments and run a lookup command on each of
3827     them.  The results are Base-64 encoded outputs (without header
3828     lines).  This may be used to retrieve certificates from a server.
3829     However the output format is not very well suited if more than one
3830     certificate is returned.
3831
3832'--url'
3833'-u'
3834     Modify the 'lookup' and 'load-crl' commands to take an URL.
3835
3836'--local'
3837'-l'
3838     Let the 'lookup' command only search the local cache.
3839
3840'--squid-mode'
3841     Run DIRMNGR-CLIENT in a mode suitable as a helper program for
3842     Squid's 'external_acl_type' option.
3843
3844
3845File: gnupg.info,  Node: gpgparsemail,  Next: gpgtar,  Prev: dirmngr-client,  Up: Helper Tools
3846
384710.9 Parse a mail message into an annotated format
3848==================================================
3849
3850The 'gpgparsemail' is a utility currently only useful for debugging.
3851Run it with '--help' for usage information.
3852
3853
3854File: gnupg.info,  Node: gpgtar,  Next: gpg-check-pattern,  Prev: gpgparsemail,  Up: Helper Tools
3855
385610.10 Encrypt or sign files into an archive
3857===========================================
3858
3859'gpgtar' encrypts or signs files into an archive.  It is an gpg-ized tar
3860using the same format as used by PGP's PGP Zip.
3861
3862'gpgtar' is invoked this way:
3863
3864     gpgtar [options] FILENAME1 [FILENAME2, ...] DIRECTORY [DIRECTORY2, ...]
3865
3866'gpgtar' understands these options:
3867
3868'--create'
3869     Put given files and directories into a vanilla "ustar" archive.
3870
3871'--extract'
3872     Extract all files from a vanilla "ustar" archive.
3873
3874'--encrypt'
3875'-e'
3876     Encrypt given files and directories into an archive.  This option
3877     may be combined with option '--symmetric' for an archive that may
3878     be decrypted via a secret key or a passphrase.
3879
3880'--decrypt'
3881'-d'
3882     Extract all files from an encrypted archive.
3883
3884'--sign'
3885'-s'
3886     Make a signed archive from the given files and directories.  This
3887     can be combined with option '--encrypt' to create a signed and then
3888     encrypted archive.
3889
3890'--list-archive'
3891'-t'
3892     List the contents of the specified archive.
3893
3894'--symmetric'
3895'-c'
3896     Encrypt with a symmetric cipher using a passphrase.  The default
3897     symmetric cipher used is AES-128, but may be chosen with the
3898     '--cipher-algo' option to 'gpg'.
3899
3900'--recipient USER'
3901'-r USER'
3902     Encrypt for user id USER.  For details see 'gpg'.
3903
3904'--local-user USER'
3905'-u USER'
3906     Use USER as the key to sign with.  For details see 'gpg'.
3907
3908'--output FILE'
3909'-o FILE'
3910     Write the archive to the specified file FILE.
3911
3912'--verbose'
3913'-v'
3914     Enable extra informational output.
3915
3916'--quiet'
3917'-q'
3918     Try to be as quiet as possible.
3919
3920'--skip-crypto'
3921     Skip all crypto operations and create or extract vanilla "ustar"
3922     archives.
3923
3924'--dry-run'
3925     Do not actually output the extracted files.
3926
3927'--directory DIR'
3928'-C DIR'
3929     Extract the files into the directory DIR.  The default is to take
3930     the directory name from the input filename.  If no input filename
3931     is known a directory named 'GPGARCH' is used.  For tarball
3932     creation, switch to directory DIR before performing any operations.
3933
3934'--files-from FILE'
3935'-T FILE'
3936     Take the file names to work from the file FILE; one file per line.
3937
3938'--null'
3939     Modify option '--files-from' to use a binary nul instead of a
3940     linefeed to separate file names.
3941
3942'--utf8-strings'
3943     Assume that the file names read by '--files-from' are UTF-8
3944     encoded.  This option has an effect only on Windows where the
3945     active code page is otherwise assumed.
3946
3947'--openpgp'
3948     This option has no effect because OpenPGP encryption and signing is
3949     the default.
3950
3951'--cms'
3952     This option is reserved and shall not be used.  It will eventually
3953     be used to encrypt or sign using the CMS protocol; but that is not
3954     yet implemented.
3955
3956'--set-filename FILE'
3957     Use the last component of FILE as the output directory.  The
3958     default is to take the directory name from the input filename.  If
3959     no input filename is known a directory named 'GPGARCH' is used.
3960     This option is deprecated in favor of option '--directory'.
3961
3962'--gpg GPGCMD'
3963     Use the specified command GPGCMD instead of 'gpg'.
3964
3965'--gpg-args ARGS'
3966     Pass the specified extra options to 'gpg'.
3967
3968'--tar-args ARGS'
3969     Assume ARGS are standard options of the command 'tar' and parse
3970     them.  The only supported tar options are "-directory",
3971     "-files-from", and "-null" This is an obsolete options because
3972     those supported tar options can also be given directly.
3973
3974'--tar COMMAND'
3975     This is a dummy option for backward compatibility.
3976
3977'--version'
3978     Print version of the program and exit.
3979
3980'--help'
3981     Display a brief help page and exit.
3982
3983The program returns 0 if everything was fine, 1 otherwise.
3984
3985Some examples:
3986
3987Encrypt the contents of directory 'mydocs' for user Bob to file 'test1':
3988
3989     gpgtar --encrypt --output test1 -r Bob mydocs
3990
3991List the contents of archive 'test1':
3992
3993     gpgtar --list-archive test1
3994
3995
3996File: gnupg.info,  Node: gpg-check-pattern,  Prev: gpgtar,  Up: Helper Tools
3997
399810.11 Check a passphrase on stdin against the patternfile
3999=========================================================
4000
4001'gpg-check-pattern' checks a passphrase given on stdin against a
4002specified pattern file.
4003
4004   The pattern file is line based with comment lines beginning on the
4005_first_ position with a '#'.  Empty lines and lines with only white
4006spaces are ignored.  The actual pattern lines may either be verbatim
4007string pattern and match as they are (trailing spaces are ignored) or
4008extended regular expressions indicated by a '/' or '!/' in the first
4009column and terminated by another '/' or end of line.  If a regular
4010expression starts with '!/' the match result is reversed.  By default
4011all comparisons are case insensitive.
4012
4013   Tag lines may be used to further control the operation of this tool.
4014The currently defined tags are:
4015
4016'[icase]'
4017     Switch to case insensitive comparison for all further patterns.
4018     This is the default.
4019
4020'[case]'
4021     Switch to case sensitive comparison for all further patterns.
4022
4023'[reject]'
4024     Switch to reject mode.  This is the default mode.
4025
4026'[accept]'
4027     Switch to accept mode.
4028
4029   In the future more tags may be introduced and thus it is advisable
4030not to start a plain pattern string with an open bracket.  The tags must
4031be given verbatim on the line with no spaces to the left or any non
4032white space characters to the right.
4033
4034   In reject mode the program exits on the first match with an exit code
4035of 1 (failure).  If at the end of the pattern list the reject mode is
4036still active the program exits with code 0 (success).
4037
4038   In accept mode blocks of patterns are used.  A block starts at the
4039next pattern after an "accept" tag and ends with the last pattern before
4040the next "accept" or "reject" tag or at the end of the pattern list.  If
4041all patterns in a block match the program exits with an exit code of 0
4042(success).  If any pattern in a block do not match the next pattern
4043block is evaluated.  If at the end of the pattern list the accept mode
4044is still active the program exits with code 1 (failure).
4045
4046
4047'--verbose'
4048     Enable extra informational output.
4049
4050'--check'
4051     Run only a syntax check on the patternfile.
4052
4053'--null'
4054     Input is expected to be null delimited.
4055
4056
4057File: gnupg.info,  Node: Web Key Service,  Next: Howtos,  Prev: Helper Tools,  Up: Top
4058
405911 Web Key Service
4060******************
4061
4062GnuPG comes with tools used to maintain and access a Web Key Directory.
4063
4064* Menu:
4065
4066* gpg-wks-client::        Send requests via WKS
4067* gpg-wks-server::        Server to provide the WKS.
4068
4069
4070File: gnupg.info,  Node: gpg-wks-client,  Next: gpg-wks-server,  Up: Web Key Service
4071
407211.1 Send requests via WKS
4073==========================
4074
4075The 'gpg-wks-client' is used to send requests to a Web Key Service
4076provider.  This is usually done to upload a key into a Web Key
4077Directory.
4078
4079   With the '--supported' command the caller can test whether a site
4080supports the Web Key Service.  The argument is an arbitrary address in
4081the to be tested domain.  For example 'foo@example.net'.  The command
4082returns success if the Web Key Service is supported.  The operation is
4083silent; to get diagnostic output use the option '--verbose'.  See option
4084'--with-colons' for a variant of this command.
4085
4086   With the '--check' command the caller can test whether a key exists
4087for a supplied mail address.  The command returns success if a key is
4088available.
4089
4090   The '--create' command is used to send a request for publication in
4091the Web Key Directory.  The arguments are the fingerprint of the key and
4092the user id to publish.  The output from the command is a properly
4093formatted mail with all standard headers.  This mail can be fed to
4094'sendmail(8)' or any other tool to actually send that mail.  If
4095'sendmail(8)' is installed the option '--send' can be used to directly
4096send the created request.  If the provider request a 'mailbox-only' user
4097id and no such user id is found, 'gpg-wks-client' will try an additional
4098user id.
4099
4100   The '--receive' and '--read' commands are used to process
4101confirmation mails as send from the service provider.  The former
4102expects an encrypted MIME messages, the latter an already decrypted MIME
4103message.  The result of these commands are another mail which can be
4104send in the same way as the mail created with '--create'.
4105
4106   The command '--install-key' manually installs a key into a local
4107directory (see option '-C') reflecting the structure of a WKD. The
4108arguments are a file with the keyblock and the user-id to install.  If
4109the first argument resembles a fingerprint the key is taken from the
4110current keyring; to force the use of a file, prefix the first argument
4111with "./".  If no arguments are given the parameters are read from
4112stdin; the expected format are lines with the fingerprint and the
4113mailbox separated by a space.  The command '--remove-key' removes a key
4114from that directory, its only argument is a user-id.
4115
4116   The command '--print-wkd-hash' prints the WKD user-id identifiers and
4117the corresponding mailboxes from the user-ids given on the command line
4118or via stdin (one user-id per line).
4119
4120   The command '--print-wkd-url' prints the URLs used to fetch the key
4121for the given user-ids from WKD. The meanwhile preferred format with
4122sub-domains is used here.
4123
4124'gpg-wks-client' understands these options:
4125
4126'--send'
4127     Directly send created mails using the 'sendmail' command.  Requires
4128     installation of that command.
4129
4130'--with-colons'
4131     This option has currently only an effect on the '--supported'
4132     command.  If it is used all arguments on the command line are taken
4133     as domain names and tested for WKD support.  The output format is
4134     one line per domain with colon delimited fields.  The currently
4135     specified fields are (future versions may specify additional
4136     fields):
4137
4138     1 - domain
4139          This is the domain name.  Although quoting is not required for
4140          valid domain names this field is specified to be quoted in
4141          standard C manner.
4142
4143     2 - WKD
4144          If the value is true the domain supports the Web Key
4145          Directory.
4146
4147     3 - WKS
4148          If the value is true the domain supports the Web Key Service
4149          protocol to upload keys to the directory.
4150
4151     4 - error-code
4152          This may contain an gpg-error code to describe certain
4153          failures.  Use 'gpg-error CODE' to explain the code.
4154
4155     5 - protocol-version
4156          The minimum protocol version supported by the server.
4157
4158     6 - auth-submit
4159          The auth-submit flag from the policy file of the server.
4160
4161     7 - mailbox-only
4162          The mailbox-only flag from the policy file of the server.
4163
4164'--output FILE'
4165'-o'
4166     Write the created mail to FILE instead of stdout.  Note that the
4167     value '-' for FILE is the same as writing to stdout.
4168
4169'--status-fd N'
4170     Write special status strings to the file descriptor N.  This
4171     program returns only the status messages SUCCESS or FAILURE which
4172     are helpful when the caller uses a double fork approach and can't
4173     easily get the return code of the process.
4174
4175'-C DIR'
4176'--directory DIR'
4177     Use DIR as top level directory for the commands '--install-key' and
4178     '--remove-key'.  The default is 'openpgpkey'.
4179
4180'--verbose'
4181     Enable extra informational output.
4182
4183'--quiet'
4184     Disable almost all informational output.
4185
4186'--version'
4187     Print version of the program and exit.
4188
4189'--help'
4190     Display a brief help page and exit.
4191
4192
4193File: gnupg.info,  Node: gpg-wks-server,  Prev: gpg-wks-client,  Up: Web Key Service
4194
419511.2 Provide the Web Key Service
4196================================
4197
4198The 'gpg-wks-server' is a server side implementation of the Web Key
4199Service.  It receives requests for publication, sends confirmation
4200requests, receives confirmations, and published the key.  It also has
4201features to ease the setup and maintenance of a Web Key Directory.
4202
4203   When used with the command '--receive' a single Web Key Service mail
4204is processed.  Commonly this command is used with the option '--send' to
4205directly send the created mails back.  See below for an installation
4206example.
4207
4208   The command '--cron' is used for regular cleanup tasks.  For example
4209non-confirmed requested should be removed after their expire time.  It
4210is best to run this command once a day from a cronjob.
4211
4212   The command '--list-domains' prints all configured domains.  Further
4213it creates missing directories for the configuration and prints warnings
4214pertaining to problems in the configuration.
4215
4216   The command '--check-key' (or just '--check') checks whether a key
4217with the given user-id is installed.  The process returns success in
4218this case; to also print a diagnostic use the option '-v'.  If the key
4219is not installed a diagnostic is printed and the process returns
4220failure; to suppress the diagnostic, use option '-q'.  More than one
4221user-id can be given; see also option 'with-file'.
4222
4223   The command '--install-key' manually installs a key into the WKD. The
4224arguments are a file with the keyblock and the user-id to install.  If
4225the first argument resembles a fingerprint the key is taken from the
4226current keyring; to force the use of a file, prefix the first argument
4227with "./".  If no arguments are given the parameters are read from
4228stdin; the expected format are lines with the fingerprint and the
4229mailbox separated by a space.
4230
4231   The command '--remove-key' uninstalls a key from the WKD. The process
4232returns success in this case; to also print a diagnostic, use option
4233'-v'.  If the key is not installed a diagnostic is printed and the
4234process returns failure; to suppress the diagnostic, use option '-q'.
4235
4236   The command '--revoke-key' is not yet functional.
4237
4238'gpg-wks-server' understands these options:
4239
4240'-C DIR'
4241'--directory DIR'
4242     Use DIR as top level directory for domains.  The default is
4243     '/var/lib/gnupg/wks'.
4244
4245'--from MAILADDR'
4246     Use MAILADDR as the default sender address.
4247
4248'--header NAME=VALUE'
4249     Add the mail header "NAME: VALUE" to all outgoing mails.
4250
4251'--send'
4252     Directly send created mails using the 'sendmail' command.  Requires
4253     installation of that command.
4254
4255'-o FILE'
4256'--output FILE'
4257     Write the created mail also to FILE.  Note that the value '-' for
4258     FILE would write it to stdout.
4259
4260'--with-dir'
4261     When used with the command '--list-domains' print for each
4262     installed domain the domain name and its directory name.
4263
4264'--with-file'
4265     When used with the command '--check-key' print for each user-id,
4266     the address, 'i' for installed key or 'n' for not installed key,
4267     and the filename.
4268
4269'--verbose'
4270     Enable extra informational output.
4271
4272'--quiet'
4273     Disable almost all informational output.
4274
4275'--version'
4276     Print version of the program and exit.
4277
4278'--help'
4279     Display a brief help page and exit.
4280
4281
4282Examples
4283********
4284
4285The Web Key Service requires a working directory to store keys pending
4286for publication.  As root create a working directory:
4287
4288       # mkdir /var/lib/gnupg/wks
4289       # chown webkey:webkey /var/lib/gnupg/wks
4290       # chmod 2750 /var/lib/gnupg/wks
4291
4292   Then under your webkey account create directories for all your
4293domains.  Here we do it for "example.net":
4294
4295       $ mkdir /var/lib/gnupg/wks/example.net
4296
4297   Finally run
4298
4299       $ gpg-wks-server --list-domains
4300
4301   to create the required sub-directories with the permissions set
4302correctly.  For each domain a submission address needs to be configured.
4303All service mails are directed to that address.  It can be the same
4304address for all configured domains, for example:
4305
4306       $ cd /var/lib/gnupg/wks/example.net
4307       $ echo key-submission@example.net >submission-address
4308
4309   The protocol requires that the key to be published is sent with an
4310encrypted mail to the service.  Thus you need to create a key for the
4311submission address:
4312
4313       $ gpg --batch --passphrase '' --quick-gen-key key-submission@example.net
4314       $ gpg -K key-submission@example.net
4315
4316   The output of the last command looks similar to this:
4317
4318       sec   rsa3072 2016-08-30 [SC]
4319             C0FCF8642D830C53246211400346653590B3795B
4320       uid           [ultimate] key-submission@example.net
4321                     bxzcxpxk8h87z1k7bzk86xn5aj47intu@example.net
4322       ssb   rsa3072 2016-08-30 [E]
4323
4324   Take the fingerprint from that output and manually publish the key:
4325
4326       $ gpg-wks-server --install-key C0FCF8642D830C53246211400346653590B3795B \
4327       >                key-submission@example.net
4328
4329   Finally that submission address needs to be redirected to a script
4330running 'gpg-wks-server'.  The 'procmail' command can be used for this:
4331Redirect the submission address to the user "webkey" and put this into
4332webkey's '.procmailrc':
4333
4334     :0
4335     * !^From: webkey@example.net
4336     * !^X-WKS-Loop: webkey.example.net
4337     |gpg-wks-server -v --receive \
4338          --header X-WKS-Loop=webkey.example.net \
4339          --from webkey@example.net --send
4340
4341
4342File: gnupg.info,  Node: Howtos,  Next: System Notes,  Prev: Web Key Service,  Up: Top
4343
434412 How to do certain things
4345***************************
4346
4347This is a collection of small howto documents.
4348
4349* Menu:
4350
4351* Howto Create a Server Cert::  Creating a TLS server certificate.
4352
4353
4354File: gnupg.info,  Node: Howto Create a Server Cert,  Up: Howtos
4355
435612.1 Creating a TLS server certificate
4357======================================
4358
4359Here is a brief run up on how to create a server certificate.  It has
4360actually been done this way to get a certificate from CAcert to be used
4361on a real server.  It has only been tested with this CA, but there
4362shouldn't be any problem to run this against any other CA.
4363
4364   We start by generating an X.509 certificate signing request.  As
4365there is no need for a configuration file, you may simply enter:
4366
4367       $ gpgsm --generate-key >example.com.cert-req.pem
4368       Please select what kind of key you want:
4369          (1) RSA
4370          (2) Existing key
4371          (3) Existing key from card
4372       Your selection? 1
4373
4374   I opted for creating a new RSA key.  The other option is to use an
4375already existing key, by selecting '2' and entering the so-called
4376keygrip.  Running the command 'gpgsm --dump-secret-key USERID' shows you
4377this keygrip.  Using '3' offers another menu to create a certificate
4378directly from a smart card based key.
4379
4380   Let's continue:
4381
4382       What keysize do you want? (3072)
4383       Requested keysize is 3072 bits
4384
4385   Hitting enter chooses the default RSA key size of 3072 bits.  Keys
4386smaller than 2048 bits are too weak on the modern Internet.  If you
4387choose a larger (stronger) key, your server will need to do more work.
4388
4389       Possible actions for a RSA key:
4390          (1) sign, encrypt
4391          (2) sign
4392          (3) encrypt
4393       Your selection? 1
4394
4395   Selecting "sign" enables use of the key for Diffie-Hellman key
4396exchange mechanisms (DHE and ECDHE) in TLS, which are preferred because
4397they offer forward secrecy.  Selecting "encrypt" enables RSA key
4398exchange mechanisms, which are still common in some places.  Selecting
4399both enables both key exchange mechanisms.
4400
4401   Now for some real data:
4402
4403       Enter the X.509 subject name: CN=example.com
4404
4405   This is the most important value for a server certificate.  Enter
4406here the canonical name of your server machine.  You may add other
4407virtual server names later.
4408
4409       E-Mail addresses (end with an empty line):
4410       >
4411
4412   We don't need email addresses in a TLS server certificate and CAcert
4413would anyway ignore such a request.  Thus just hit enter.
4414
4415   If you want to create a client certificate for email encryption, this
4416would be the place to enter your mail address (e.g.  <joe@example.org>).
4417You may enter as many addresses as you like, however the CA may not
4418accept them all or reject the entire request.
4419
4420       Enter DNS names (optional; end with an empty line):
4421       > example.com
4422       > www.example.com
4423       >
4424
4425   Here I entered the names of the services which the machine actually
4426provides.  You almost always want to include the canonical name here
4427too.  The browser will accept a certificate for any of these names.  As
4428usual the CA must approve all of these names.
4429
4430       URIs (optional; end with an empty line):
4431       >
4432
4433   It is possible to insert arbitrary URIs into a certificate; for a
4434server certificate this does not make sense.
4435
4436       Create self-signed certificate? (y/N)
4437
4438   Since we are creating a certificate signing request, and not a full
4439certificate, we answer no here, or just hit enter for the default.
4440
4441   We have now entered all required information and 'gpgsm' will display
4442what it has gathered and ask whether to create the certificate request:
4443
4444       These parameters are used:
4445           Key-Type: RSA
4446           Key-Length: 3072
4447           Key-Usage: sign, encrypt
4448           Name-DN: CN=example.com
4449           Name-DNS: example.com
4450           Name-DNS: www.example.com
4451
4452       Proceed with creation? (y/N) y
4453
4454   'gpgsm' will now start working on creating the request.  As this
4455includes the creation of an RSA key it may take a while.  During this
4456time you will be asked 3 times for a passphrase to protect the created
4457private key on your system.  A pop up window will appear to ask for it.
4458The first two prompts are for the new passphrase and for re-entering it;
4459the third one is required to actually create the certificate signing
4460request.
4461
4462   When it is ready, you should see the final notice:
4463
4464       Ready.  You should now send this request to your CA.
4465
4466   Now, you may look at the created request:
4467
4468       $ cat example.com.cert-req.pem
4469       -----BEGIN CERTIFICATE REQUEST-----
4470       MIIClTCCAX0CAQAwFjEUMBIGA1UEAxMLZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3
4471       DQEBAQUAA4IBDwAwggEKAoIBAQDP1QEcbTvOLLCX4gAoOzH9AW7jNOMj7OSOL0uW
4472       h2bCdkK5YVpnX212Z6COTC3ZG0pJiCeGt1TbbDJUlTa4syQ6JXavjK66N8ASZsyC
4473       Rwcl0m6hbXp541t1dbgt2VgeGk25okWw3j+brw6zxLD2TnthJxOatID0lDIG47HW
4474       GqzZmA6WHbIBIONmGnReIHTpPAPCDm92vUkpKG1xLPszuRmsQbwEl870W/FHrsvm
4475       DPvVUUSdIvTV9NuRt7/WY6G4nPp9QlIuTf1ESPzIuIE91gKPdrRCAx0yuT708S1n
4476       xCv3ETQ/bKPoAQ67eE3mPBqkcVwv9SE/2/36Lz06kAizRgs5AgMBAAGgOjA4Bgkq
4477       hkiG9w0BCQ4xKzApMCcGA1UdEQQgMB6CC2V4YW1wbGUuY29tgg93d3cuZXhhbXBs
4478       ZS5jb20wDQYJKoZIhvcNAQELBQADggEBAEWD0Qqz4OENLYp6yyO/KqF0ig9FDsLN
4479       b5/R+qhms5qlhdB5+Dh+j693Sj0UgbcNKc6JT86IuBqEBZmRCJuXRoKoo5aMS1cJ
4480       hXga7N9IA3qb4VBUzBWvlL92U2Iptr/cEbikFlYZF2Zv3PBv8RfopVlI3OLbKV9D
4481       bJJTt/6kuoydXKo/Vx4G0DFzIKNdFdJk86o/Ziz8NOs9JjZxw9H9VY5sHKFM5LKk
4482       VcLwnnLRlNjBGB+9VK/Tze575eG0cJomTp7UGIB+1xzIQVAhUZOizRDv9tHDeaK3
4483       k+tUhV0kuJcYHucpJycDSrP/uAY5zuVJ0rs2QSjdnav62YrRgEsxJrU=
4484       -----END CERTIFICATE REQUEST-----
4485       $
4486
4487   You may now proceed by logging into your account at the CAcert
4488website, choose 'Server Certificates - New', check 'sign by class 3 root
4489certificate', paste the above request block into the text field and
4490click on 'Submit'.
4491
4492   If everything works out fine, a certificate will be shown.  Now run
4493
4494     $ gpgsm --import
4495
4496   and paste the certificate from the CAcert page into your terminal
4497followed by a Ctrl-D
4498
4499       -----BEGIN CERTIFICATE-----
4500       MIIEIjCCAgqgAwIBAgIBTDANBgkqhkiG9w0BAQQFADBUMRQwEgYDVQQKEwtDQWNl
4501        [...]
4502       rUTFlNElRXCwIl0YcJkIaYYqWf7+A/aqYJCi8+51usZwMy3Jsq3hJ6MA3h1BgwZs
4503       Rtct3tIX
4504       -----END CERTIFICATE-----
4505       gpgsm: issuer certificate (#/CN=CAcert Class 3 Ro[...]) not found
4506       gpgsm: certificate imported
4507
4508       gpgsm: total number processed: 1
4509       gpgsm:               imported: 1
4510
4511   'gpgsm' tells you that it has imported the certificate.  It is now
4512associated with the key you used when creating the request.  The root
4513certificate has not been found, so you may want to import it from the
4514CACert website.
4515
4516   To see the content of your certificate, you may now enter:
4517
4518       $ gpgsm -K example.com
4519       /home/foo/.gnupg/pubring.kbx
4520       ---------------------------
4521       Serial number: 4C
4522              Issuer: /CN=CAcert Class 3 Root/OU=http:\x2f\x2fwww.[...]
4523             Subject: /CN=example.com
4524                 aka: (dns-name example.com)
4525                 aka: (dns-name www.example.com)
4526            validity: 2015-07-01 16:20:51 through 2016-07-01 16:20:51
4527            key type: 3072 bit RSA
4528           key usage: digitalSignature keyEncipherment
4529       ext key usage: clientAuth (suggested), serverAuth (suggested), [...]
4530         fingerprint: 0F:9C:27:B2:DA:05:5F:CB:33:D8:19:E9:65:B9:4F:BD:B1:98:CC:57
4531
4532   I used '-K' above because this will only list certificates for which
4533a private key is available.  To see more details, you may use
4534'--dump-secret-keys' instead of '-K'.
4535
4536   To make actual use of the certificate you need to install it on your
4537server.  Server software usually expects a PKCS\#12 file with key and
4538certificate.  To create such a file, run:
4539
4540       $ gpgsm --export-secret-key-p12 -a >example.com-cert.pem
4541
4542   You will be asked for the passphrase as well as for a new passphrase
4543to be used to protect the PKCS\#12 file.  The file now contains the
4544certificate as well as the private key:
4545
4546       $ cat example-cert.pem
4547       Issuer ...: /CN=CAcert Class 3 Root/OU=http:\x2f\x2fwww.CA[...]
4548       Serial ...: 4C
4549       Subject ..: /CN=example.com
4550           aka ..: (dns-name example.com)
4551           aka ..: (dns-name www.example.com)
4552
4553       -----BEGIN PKCS12-----
4554       MIIHlwIBAzCCB5AGCSqGSIb37QdHAaCCB4EEggd9MIIHeTk1BJ8GCSqGSIb3DQEu
4555       [...many more lines...]
4556       -----END PKCS12-----
4557       $
4558
4559   Copy this file in a secure way to the server, install it there and
4560delete the file then.  You may export the file again at any time as long
4561as it is available in GnuPG's private key database.
4562
4563
4564File: gnupg.info,  Node: System Notes,  Next: Debugging,  Prev: Howtos,  Up: Top
4565
456613 Notes pertaining to certain OSes
4567***********************************
4568
4569GnuPG has been developed on GNU/Linux systems and is know to work on
4570almost all Free OSes.  All modern POSIX systems should be supported
4571right now, however there are probably a lot of smaller glitches we need
4572to fix first.  The major problem areas are:
4573
4574   * We are planning to use file descriptor passing for interprocess
4575     communication.  This will allow us save a lot of resources and
4576     improve performance of certain operations a lot.  Systems not
4577     supporting this won't gain these benefits but we try to keep them
4578     working the standard way as it is done today.
4579
4580   * We require more or less full POSIX compatibility.  This has been
4581     around for 15 years now and thus we don't believe it makes sense to
4582     support non POSIX systems anymore.  Well, we of course the usual
4583     workarounds for near POSIX systems well be applied.
4584
4585     There is one exception of this rule: Systems based the Microsoft
4586     Windows API (called here _W32_) will be supported to some extend.
4587
4588* Menu:
4589
4590* W32 Notes::             Microsoft Windows Notes
4591
4592
4593File: gnupg.info,  Node: W32 Notes,  Up: System Notes
4594
459513.1 Microsoft Windows Notes
4596============================
4597
4598Current limitations are:
4599
4600   * 'gpgconf' does not create backup files, so in case of trouble your
4601     configuration file might get lost.
4602
4603   * 'watchgnupg' is not available.  Logging to sockets is not possible.
4604
4605   * The periodical smartcard status checking done by 'scdaemon' is not
4606     yet supported.
4607
4608
4609File: gnupg.info,  Node: Debugging,  Next: Copying,  Prev: System Notes,  Up: Top
4610
461114 How to solve problems
4612************************
4613
4614Everyone knows that software often does not do what it should do and
4615thus there is a need to track down problems.  We call this debugging in
4616a reminiscent to the moth jamming a relay in a Mark II box back in 1947.
4617
4618   Most of the problems a merely configuration and user problems but
4619nevertheless they are the most annoying ones and responsible for many
4620gray hairs.  We try to give some guidelines here on how to identify and
4621solve the problem at hand.
4622
4623* Menu:
4624
4625* Debugging Tools::       Description of some useful tools.
4626* Debugging Hints::       Various hints on debugging.
4627* Common Problems::       Commonly seen problems.
4628* Architecture Details::  How the whole thing works internally.
4629
4630
4631File: gnupg.info,  Node: Debugging Tools,  Next: Debugging Hints,  Up: Debugging
4632
463314.1 Debugging Tools
4634====================
4635
4636The GnuPG distribution comes with a couple of tools, useful to help find
4637and solving problems.
4638
4639* Menu:
4640
4641* kbxutil::        Scrutinizing a keybox file.
4642
4643
4644File: gnupg.info,  Node: kbxutil,  Up: Debugging Tools
4645
464614.1.1 Scrutinizing a keybox file
4647---------------------------------
4648
4649A keybox is a file format used to store public keys along with meta
4650information and indices.  The commonly used one is the file
4651'pubring.kbx' in the '.gnupg' directory.  It contains all X.509
4652certificates as well as OpenPGP keys.
4653
4654When called the standard way, e.g.:
4655
4656   'kbxutil ~/.gnupg/pubring.kbx'
4657
4658it lists all records (called blobs) with there meta-information in a
4659human readable format.
4660
4661To see statistics on the keybox in question, run it using
4662
4663   'kbxutil --stats ~/.gnupg/pubring.kbx'
4664
4665and you get an output like:
4666
4667     Total number of blobs:       99
4668                    header:        1
4669                     empty:        0
4670                   openpgp:        0
4671                      x509:       98
4672               non flagged:       81
4673            secret flagged:        0
4674         ephemeral flagged:       17
4675
4676   In this example you see that the keybox does not have any OpenPGP
4677keys but contains 98 X.509 certificates and a total of 17 keys or
4678certificates are flagged as ephemeral, meaning that they are only
4679temporary stored (cached) in the keybox and won't get listed using the
4680usual commands provided by 'gpgsm' or 'gpg'.  81 certificates are stored
4681in a standard way and directly available from 'gpgsm'.
4682
4683To find duplicated certificates and keyblocks in a keybox file (this
4684should not occur but sometimes things go wrong), run it using
4685
4686   'kbxutil --find-dups ~/.gnupg/pubring.kbx'
4687
4688
4689File: gnupg.info,  Node: Debugging Hints,  Next: Common Problems,  Prev: Debugging Tools,  Up: Debugging
4690
469114.2 Various hints on debugging
4692===============================
4693
4694   * How to find the IP address of a keyserver
4695
4696     If a round robin URL of is used for a keyserver (e.g.
4697     subkeys.gnupg.org); it is not easy to see what server is actually
4698     used.  Using the keyserver debug option as in
4699
4700           gpg --keyserver-options debug=1 -v --refresh-key 1E42B367
4701
4702     is thus often helpful.  Note that the actual output depends on the
4703     backend and may change from release to release.
4704
4705   * Logging on WindowsCE
4706
4707     For development, the best logging method on WindowsCE is the use of
4708     remote debugging using a log file name of 'tcp://<ip-addr>:<port>'.
4709     The command 'watchgnupg' may be used on the remote host to listen
4710     on the given port (*note option watchgnupg --tcp::).  For in the
4711     field tests it is better to make use of the logging facility
4712     provided by the 'gpgcedev' driver (part of libassuan); this is
4713     enabled by using a log file name of 'GPG2:' (*note option
4714     --log-file::).
4715
4716
4717File: gnupg.info,  Node: Common Problems,  Next: Architecture Details,  Prev: Debugging Hints,  Up: Debugging
4718
471914.3 Commonly Seen Problems
4720===========================
4721
4722   * Error code 'Not supported' from Dirmngr
4723
4724     Most likely the option 'enable-ocsp' is active for gpgsm but
4725     Dirmngr's OCSP feature has not been enabled using 'allow-ocsp' in
4726     'dirmngr.conf'.
4727
4728   * The Curses based Pinentry does not work
4729
4730     The far most common reason for this is that the environment
4731     variable 'GPG_TTY' has not been set correctly.  Make sure that it
4732     has been set to a real tty device and not just to '/dev/tty'; i.e.
4733     'GPG_TTY=tty' is plainly wrong; what you want is 'GPG_TTY=`tty`' --
4734     note the back ticks.  Also make sure that this environment variable
4735     gets exported, that is you should follow up the setting with an
4736     'export GPG_TTY' (assuming a Bourne style shell).  Even for GUI
4737     based Pinentries; you should have set 'GPG_TTY'.  See the section
4738     on installing the 'gpg-agent' on how to do it.
4739
4740   * SSH hangs while a popping up pinentry was expected
4741
4742     SSH has no way to tell the gpg-agent what terminal or X display it
4743     is running on.  So when remotely logging into a box where a
4744     gpg-agent with SSH support is running, the pinentry will get popped
4745     up on whatever display the gpg-agent has been started.  To solve
4746     this problem you may issue the command
4747
4748          echo UPDATESTARTUPTTY | gpg-connect-agent
4749
4750     and the next pinentry will pop up on your display or screen.
4751     However, you need to kill the running pinentry first because only
4752     one pinentry may be running at once.  If you plan to use ssh on a
4753     new display you should issue the above command before invoking ssh
4754     or any other service making use of ssh.
4755
4756   * Exporting a secret key without a certificate
4757
4758     It may happen that you have created a certificate request using
4759     'gpgsm' but not yet received and imported the certificate from the
4760     CA. However, you want to export the secret key to another machine
4761     right now to import the certificate over there then.  You can do
4762     this with a little trick but it requires that you know the
4763     approximate time you created the signing request.  By running the
4764     command
4765
4766            ls -ltr ~/.gnupg/private-keys-v1.d
4767
4768     you get a listing of all private keys under control of 'gpg-agent'.
4769     Pick the key which best matches the creation time and run the
4770     command
4771
4772            /usr/local/libexec/gpg-protect-tool --p12-export \
4773               ~/.gnupg/private-keys-v1.d/FOO >FOO.p12
4774
4775     (Please adjust the path to 'gpg-protect-tool' to the appropriate
4776     location).  FOO is the name of the key file you picked (it should
4777     have the suffix '.key').  A Pinentry box will pop up and ask you
4778     for the current passphrase of the key and a new passphrase to
4779     protect it in the pkcs#12 file.
4780
4781     To import the created file on the machine you use this command:
4782
4783            /usr/local/libexec/gpg-protect-tool --p12-import --store  FOO.p12
4784
4785     You will be asked for the pkcs#12 passphrase and a new passphrase
4786     to protect the imported private key at its new location.
4787
4788     Note that there is no easy way to match existing certificates with
4789     stored private keys because some private keys are used for Secure
4790     Shell or other purposes and don't have a corresponding certificate.
4791
4792   * A root certificate does not verify
4793
4794     A common problem is that the root certificate misses the required
4795     basicConstraints attribute and thus 'gpgsm' rejects this
4796     certificate.  An error message indicating "no value" is a sign for
4797     such a certificate.  You may use the 'relax' flag in
4798     'trustlist.txt' to accept the certificate anyway.  Note that the
4799     fingerprint and this flag may only be added manually to
4800     'trustlist.txt'.
4801
4802   * Error message: "digest algorithm N has not been enabled"
4803
4804     The signature is broken.  You may try the option
4805     '--extra-digest-algo SHA256' to workaround the problem.  The number
4806     N is the internal algorithm identifier; for example 8 refers to
4807     SHA-256.
4808
4809   * The Windows version does not work under Wine
4810
4811     When running the W32 version of 'gpg' under Wine you may get an
4812     error messages like:
4813
4814          gpg: fatal: WriteConsole failed: Access denied
4815
4816     The solution is to use the command 'wineconsole'.
4817
4818     Some operations like '--generate-key' really want to talk to the
4819     console directly for increased security (for example to prevent the
4820     passphrase from appearing on the screen).  So, you should use
4821     'wineconsole' instead of 'wine', which will launch a windows
4822     console that implements those additional features.
4823
4824   * Why does GPG's -search-key list weird keys?
4825
4826     For performance reasons the keyservers do not check the keys the
4827     same way 'gpg' does.  It may happen that the listing of keys
4828     available on the keyservers shows keys with wrong user IDs or with
4829     user Ids from other keys.  If you try to import this key, the bad
4830     keys or bad user ids won't get imported, though.  This is a bit
4831     unfortunate but we can't do anything about it without actually
4832     downloading the keys.
4833
4834
4835File: gnupg.info,  Node: Architecture Details,  Prev: Common Problems,  Up: Debugging
4836
483714.4 How the whole thing works internally
4838=========================================
4839
4840* Menu:
4841
4842* Component interaction:: How the components work together.
4843* GnuPG-1 and GnuPG-2::   Relationship between GnuPG 1.4 and 2.x.
4844
4845
4846File: gnupg.info,  Node: Component interaction,  Next: GnuPG-1 and GnuPG-2,  Up: Architecture Details
4847
484814.4.1 How the components work together
4849---------------------------------------
4850
4851      �[image src="gnupg-module-overview.png" alt="GnuPG modules"�]
4852
4853Figure 14.1: GnuPG module overview
4854
4855
4856File: gnupg.info,  Node: GnuPG-1 and GnuPG-2,  Prev: Component interaction,  Up: Architecture Details
4857
485814.4.2 Relationship between GnuPG 1.4 and 2.x
4859---------------------------------------------
4860
4861Here is a little picture showing how the different GnuPG versions make
4862use of a smartcard:
4863
4864�[image src="gnupg-card-architecture.png" alt="GnuPG card architecture"�]
4865
4866Figure 14.2: GnuPG card architecture
4867
4868
4869File: gnupg.info,  Node: Copying,  Next: Contributors,  Prev: Debugging,  Up: Top
4870
4871GNU General Public License
4872**************************
4873
4874                        Version 3, 29 June 2007
4875
4876     Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
4877
4878     Everyone is permitted to copy and distribute verbatim copies of this
4879     license document, but changing it is not allowed.
4880
4881Preamble
4882========
4883
4884The GNU General Public License is a free, copyleft license for software
4885and other kinds of works.
4886
4887   The licenses for most software and other practical works are designed
4888to take away your freedom to share and change the works.  By contrast,
4889the GNU General Public License is intended to guarantee your freedom to
4890share and change all versions of a program-to make sure it remains free
4891software for all its users.  We, the Free Software Foundation, use the
4892GNU General Public License for most of our software; it applies also to
4893any other work released this way by its authors.  You can apply it to
4894your programs, too.
4895
4896   When we speak of free software, we are referring to freedom, not
4897price.  Our General Public Licenses are designed to make sure that you
4898have the freedom to distribute copies of free software (and charge for
4899them if you wish), that you receive source code or can get it if you
4900want it, that you can change the software or use pieces of it in new
4901free programs, and that you know you can do these things.
4902
4903   To protect your rights, we need to prevent others from denying you
4904these rights or asking you to surrender the rights.  Therefore, you have
4905certain responsibilities if you distribute copies of the software, or if
4906you modify it: responsibilities to respect the freedom of others.
4907
4908   For example, if you distribute copies of such a program, whether
4909gratis or for a fee, you must pass on to the recipients the same
4910freedoms that you received.  You must make sure that they, too, receive
4911or can get the source code.  And you must show them these terms so they
4912know their rights.
4913
4914   Developers that use the GNU GPL protect your rights with two steps:
4915(1) assert copyright on the software, and (2) offer you this License
4916giving you legal permission to copy, distribute and/or modify it.
4917
4918   For the developers' and authors' protection, the GPL clearly explains
4919that there is no warranty for this free software.  For both users' and
4920authors' sake, the GPL requires that modified versions be marked as
4921changed, so that their problems will not be attributed erroneously to
4922authors of previous versions.
4923
4924   Some devices are designed to deny users access to install or run
4925modified versions of the software inside them, although the manufacturer
4926can do so.  This is fundamentally incompatible with the aim of
4927protecting users' freedom to change the software.  The systematic
4928pattern of such abuse occurs in the area of products for individuals to
4929use, which is precisely where it is most unacceptable.  Therefore, we
4930have designed this version of the GPL to prohibit the practice for those
4931products.  If such problems arise substantially in other domains, we
4932stand ready to extend this provision to those domains in future versions
4933of the GPL, as needed to protect the freedom of users.
4934
4935   Finally, every program is threatened constantly by software patents.
4936States should not allow patents to restrict development and use of
4937software on general-purpose computers, but in those that do, we wish to
4938avoid the special danger that patents applied to a free program could
4939make it effectively proprietary.  To prevent this, the GPL assures that
4940patents cannot be used to render the program non-free.
4941
4942   The precise terms and conditions for copying, distribution and
4943modification follow.
4944
4945                         TERMS AND CONDITIONS
4946
4947  0. Definitions.
4948
4949     "This License" refers to version 3 of the GNU General Public
4950     License.
4951
4952     "Copyright" also means copyright-like laws that apply to other
4953     kinds of works, such as semiconductor masks.
4954
4955     "The Program" refers to any copyrightable work licensed under this
4956     License.  Each licensee is addressed as "you".  "Licensees" and
4957     "recipients" may be individuals or organizations.
4958
4959     To "modify" a work means to copy from or adapt all or part of the
4960     work in a fashion requiring copyright permission, other than the
4961     making of an exact copy.  The resulting work is called a "modified
4962     version" of the earlier work or a work "based on" the earlier work.
4963
4964     A "covered work" means either the unmodified Program or a work
4965     based on the Program.
4966
4967     To "propagate" a work means to do anything with it that, without
4968     permission, would make you directly or secondarily liable for
4969     infringement under applicable copyright law, except executing it on
4970     a computer or modifying a private copy.  Propagation includes
4971     copying, distribution (with or without modification), making
4972     available to the public, and in some countries other activities as
4973     well.
4974
4975     To "convey" a work means any kind of propagation that enables other
4976     parties to make or receive copies.  Mere interaction with a user
4977     through a computer network, with no transfer of a copy, is not
4978     conveying.
4979
4980     An interactive user interface displays "Appropriate Legal Notices"
4981     to the extent that it includes a convenient and prominently visible
4982     feature that (1) displays an appropriate copyright notice, and (2)
4983     tells the user that there is no warranty for the work (except to
4984     the extent that warranties are provided), that licensees may convey
4985     the work under this License, and how to view a copy of this
4986     License.  If the interface presents a list of user commands or
4987     options, such as a menu, a prominent item in the list meets this
4988     criterion.
4989
4990  1. Source Code.
4991
4992     The "source code" for a work means the preferred form of the work
4993     for making modifications to it.  "Object code" means any non-source
4994     form of a work.
4995
4996     A "Standard Interface" means an interface that either is an
4997     official standard defined by a recognized standards body, or, in
4998     the case of interfaces specified for a particular programming
4999     language, one that is widely used among developers working in that
5000     language.
5001
5002     The "System Libraries" of an executable work include anything,
5003     other than the work as a whole, that (a) is included in the normal
5004     form of packaging a Major Component, but which is not part of that
5005     Major Component, and (b) serves only to enable use of the work with
5006     that Major Component, or to implement a Standard Interface for
5007     which an implementation is available to the public in source code
5008     form.  A "Major Component", in this context, means a major
5009     essential component (kernel, window system, and so on) of the
5010     specific operating system (if any) on which the executable work
5011     runs, or a compiler used to produce the work, or an object code
5012     interpreter used to run it.
5013
5014     The "Corresponding Source" for a work in object code form means all
5015     the source code needed to generate, install, and (for an executable
5016     work) run the object code and to modify the work, including scripts
5017     to control those activities.  However, it does not include the
5018     work's System Libraries, or general-purpose tools or generally
5019     available free programs which are used unmodified in performing
5020     those activities but which are not part of the work.  For example,
5021     Corresponding Source includes interface definition files associated
5022     with source files for the work, and the source code for shared
5023     libraries and dynamically linked subprograms that the work is
5024     specifically designed to require, such as by intimate data
5025     communication or control flow between those subprograms and other
5026     parts of the work.
5027
5028     The Corresponding Source need not include anything that users can
5029     regenerate automatically from other parts of the Corresponding
5030     Source.
5031
5032     The Corresponding Source for a work in source code form is that
5033     same work.
5034
5035  2. Basic Permissions.
5036
5037     All rights granted under this License are granted for the term of
5038     copyright on the Program, and are irrevocable provided the stated
5039     conditions are met.  This License explicitly affirms your unlimited
5040     permission to run the unmodified Program.  The output from running
5041     a covered work is covered by this License only if the output, given
5042     its content, constitutes a covered work.  This License acknowledges
5043     your rights of fair use or other equivalent, as provided by
5044     copyright law.
5045
5046     You may make, run and propagate covered works that you do not
5047     convey, without conditions so long as your license otherwise
5048     remains in force.  You may convey covered works to others for the
5049     sole purpose of having them make modifications exclusively for you,
5050     or provide you with facilities for running those works, provided
5051     that you comply with the terms of this License in conveying all
5052     material for which you do not control copyright.  Those thus making
5053     or running the covered works for you must do so exclusively on your
5054     behalf, under your direction and control, on terms that prohibit
5055     them from making any copies of your copyrighted material outside
5056     their relationship with you.
5057
5058     Conveying under any other circumstances is permitted solely under
5059     the conditions stated below.  Sublicensing is not allowed; section
5060     10 makes it unnecessary.
5061
5062  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
5063
5064     No covered work shall be deemed part of an effective technological
5065     measure under any applicable law fulfilling obligations under
5066     article 11 of the WIPO copyright treaty adopted on 20 December
5067     1996, or similar laws prohibiting or restricting circumvention of
5068     such measures.
5069
5070     When you convey a covered work, you waive any legal power to forbid
5071     circumvention of technological measures to the extent such
5072     circumvention is effected by exercising rights under this License
5073     with respect to the covered work, and you disclaim any intention to
5074     limit operation or modification of the work as a means of
5075     enforcing, against the work's users, your or third parties' legal
5076     rights to forbid circumvention of technological measures.
5077
5078  4. Conveying Verbatim Copies.
5079
5080     You may convey verbatim copies of the Program's source code as you
5081     receive it, in any medium, provided that you conspicuously and
5082     appropriately publish on each copy an appropriate copyright notice;
5083     keep intact all notices stating that this License and any
5084     non-permissive terms added in accord with section 7 apply to the
5085     code; keep intact all notices of the absence of any warranty; and
5086     give all recipients a copy of this License along with the Program.
5087
5088     You may charge any price or no price for each copy that you convey,
5089     and you may offer support or warranty protection for a fee.
5090
5091  5. Conveying Modified Source Versions.
5092
5093     You may convey a work based on the Program, or the modifications to
5094     produce it from the Program, in the form of source code under the
5095     terms of section 4, provided that you also meet all of these
5096     conditions:
5097
5098       a. The work must carry prominent notices stating that you
5099          modified it, and giving a relevant date.
5100
5101       b. The work must carry prominent notices stating that it is
5102          released under this License and any conditions added under
5103          section 7.  This requirement modifies the requirement in
5104          section 4 to "keep intact all notices".
5105
5106       c. You must license the entire work, as a whole, under this
5107          License to anyone who comes into possession of a copy.  This
5108          License will therefore apply, along with any applicable
5109          section 7 additional terms, to the whole of the work, and all
5110          its parts, regardless of how they are packaged.  This License
5111          gives no permission to license the work in any other way, but
5112          it does not invalidate such permission if you have separately
5113          received it.
5114
5115       d. If the work has interactive user interfaces, each must display
5116          Appropriate Legal Notices; however, if the Program has
5117          interactive interfaces that do not display Appropriate Legal
5118          Notices, your work need not make them do so.
5119
5120     A compilation of a covered work with other separate and independent
5121     works, which are not by their nature extensions of the covered
5122     work, and which are not combined with it such as to form a larger
5123     program, in or on a volume of a storage or distribution medium, is
5124     called an "aggregate" if the compilation and its resulting
5125     copyright are not used to limit the access or legal rights of the
5126     compilation's users beyond what the individual works permit.
5127     Inclusion of a covered work in an aggregate does not cause this
5128     License to apply to the other parts of the aggregate.
5129
5130  6. Conveying Non-Source Forms.
5131
5132     You may convey a covered work in object code form under the terms
5133     of sections 4 and 5, provided that you also convey the
5134     machine-readable Corresponding Source under the terms of this
5135     License, in one of these ways:
5136
5137       a. Convey the object code in, or embodied in, a physical product
5138          (including a physical distribution medium), accompanied by the
5139          Corresponding Source fixed on a durable physical medium
5140          customarily used for software interchange.
5141
5142       b. Convey the object code in, or embodied in, a physical product
5143          (including a physical distribution medium), accompanied by a
5144          written offer, valid for at least three years and valid for as
5145          long as you offer spare parts or customer support for that
5146          product model, to give anyone who possesses the object code
5147          either (1) a copy of the Corresponding Source for all the
5148          software in the product that is covered by this License, on a
5149          durable physical medium customarily used for software
5150          interchange, for a price no more than your reasonable cost of
5151          physically performing this conveying of source, or (2) access
5152          to copy the Corresponding Source from a network server at no
5153          charge.
5154
5155       c. Convey individual copies of the object code with a copy of the
5156          written offer to provide the Corresponding Source.  This
5157          alternative is allowed only occasionally and noncommercially,
5158          and only if you received the object code with such an offer,
5159          in accord with subsection 6b.
5160
5161       d. Convey the object code by offering access from a designated
5162          place (gratis or for a charge), and offer equivalent access to
5163          the Corresponding Source in the same way through the same
5164          place at no further charge.  You need not require recipients
5165          to copy the Corresponding Source along with the object code.
5166          If the place to copy the object code is a network server, the
5167          Corresponding Source may be on a different server (operated by
5168          you or a third party) that supports equivalent copying
5169          facilities, provided you maintain clear directions next to the
5170          object code saying where to find the Corresponding Source.
5171          Regardless of what server hosts the Corresponding Source, you
5172          remain obligated to ensure that it is available for as long as
5173          needed to satisfy these requirements.
5174
5175       e. Convey the object code using peer-to-peer transmission,
5176          provided you inform other peers where the object code and
5177          Corresponding Source of the work are being offered to the
5178          general public at no charge under subsection 6d.
5179
5180     A separable portion of the object code, whose source code is
5181     excluded from the Corresponding Source as a System Library, need
5182     not be included in conveying the object code work.
5183
5184     A "User Product" is either (1) a "consumer product", which means
5185     any tangible personal property which is normally used for personal,
5186     family, or household purposes, or (2) anything designed or sold for
5187     incorporation into a dwelling.  In determining whether a product is
5188     a consumer product, doubtful cases shall be resolved in favor of
5189     coverage.  For a particular product received by a particular user,
5190     "normally used" refers to a typical or common use of that class of
5191     product, regardless of the status of the particular user or of the
5192     way in which the particular user actually uses, or expects or is
5193     expected to use, the product.  A product is a consumer product
5194     regardless of whether the product has substantial commercial,
5195     industrial or non-consumer uses, unless such uses represent the
5196     only significant mode of use of the product.
5197
5198     "Installation Information" for a User Product means any methods,
5199     procedures, authorization keys, or other information required to
5200     install and execute modified versions of a covered work in that
5201     User Product from a modified version of its Corresponding Source.
5202     The information must suffice to ensure that the continued
5203     functioning of the modified object code is in no case prevented or
5204     interfered with solely because modification has been made.
5205
5206     If you convey an object code work under this section in, or with,
5207     or specifically for use in, a User Product, and the conveying
5208     occurs as part of a transaction in which the right of possession
5209     and use of the User Product is transferred to the recipient in
5210     perpetuity or for a fixed term (regardless of how the transaction
5211     is characterized), the Corresponding Source conveyed under this
5212     section must be accompanied by the Installation Information.  But
5213     this requirement does not apply if neither you nor any third party
5214     retains the ability to install modified object code on the User
5215     Product (for example, the work has been installed in ROM).
5216
5217     The requirement to provide Installation Information does not
5218     include a requirement to continue to provide support service,
5219     warranty, or updates for a work that has been modified or installed
5220     by the recipient, or for the User Product in which it has been
5221     modified or installed.  Access to a network may be denied when the
5222     modification itself materially and adversely affects the operation
5223     of the network or violates the rules and protocols for
5224     communication across the network.
5225
5226     Corresponding Source conveyed, and Installation Information
5227     provided, in accord with this section must be in a format that is
5228     publicly documented (and with an implementation available to the
5229     public in source code form), and must require no special password
5230     or key for unpacking, reading or copying.
5231
5232  7. Additional Terms.
5233
5234     "Additional permissions" are terms that supplement the terms of
5235     this License by making exceptions from one or more of its
5236     conditions.  Additional permissions that are applicable to the
5237     entire Program shall be treated as though they were included in
5238     this License, to the extent that they are valid under applicable
5239     law.  If additional permissions apply only to part of the Program,
5240     that part may be used separately under those permissions, but the
5241     entire Program remains governed by this License without regard to
5242     the additional permissions.
5243
5244     When you convey a copy of a covered work, you may at your option
5245     remove any additional permissions from that copy, or from any part
5246     of it.  (Additional permissions may be written to require their own
5247     removal in certain cases when you modify the work.)  You may place
5248     additional permissions on material, added by you to a covered work,
5249     for which you have or can give appropriate copyright permission.
5250
5251     Notwithstanding any other provision of this License, for material
5252     you add to a covered work, you may (if authorized by the copyright
5253     holders of that material) supplement the terms of this License with
5254     terms:
5255
5256       a. Disclaiming warranty or limiting liability differently from
5257          the terms of sections 15 and 16 of this License; or
5258
5259       b. Requiring preservation of specified reasonable legal notices
5260          or author attributions in that material or in the Appropriate
5261          Legal Notices displayed by works containing it; or
5262
5263       c. Prohibiting misrepresentation of the origin of that material,
5264          or requiring that modified versions of such material be marked
5265          in reasonable ways as different from the original version; or
5266
5267       d. Limiting the use for publicity purposes of names of licensors
5268          or authors of the material; or
5269
5270       e. Declining to grant rights under trademark law for use of some
5271          trade names, trademarks, or service marks; or
5272
5273       f. Requiring indemnification of licensors and authors of that
5274          material by anyone who conveys the material (or modified
5275          versions of it) with contractual assumptions of liability to
5276          the recipient, for any liability that these contractual
5277          assumptions directly impose on those licensors and authors.
5278
5279     All other non-permissive additional terms are considered "further
5280     restrictions" within the meaning of section 10.  If the Program as
5281     you received it, or any part of it, contains a notice stating that
5282     it is governed by this License along with a term that is a further
5283     restriction, you may remove that term.  If a license document
5284     contains a further restriction but permits relicensing or conveying
5285     under this License, you may add to a covered work material governed
5286     by the terms of that license document, provided that the further
5287     restriction does not survive such relicensing or conveying.
5288
5289     If you add terms to a covered work in accord with this section, you
5290     must place, in the relevant source files, a statement of the
5291     additional terms that apply to those files, or a notice indicating
5292     where to find the applicable terms.
5293
5294     Additional terms, permissive or non-permissive, may be stated in
5295     the form of a separately written license, or stated as exceptions;
5296     the above requirements apply either way.
5297
5298  8. Termination.
5299
5300     You may not propagate or modify a covered work except as expressly
5301     provided under this License.  Any attempt otherwise to propagate or
5302     modify it is void, and will automatically terminate your rights
5303     under this License (including any patent licenses granted under the
5304     third paragraph of section 11).
5305
5306     However, if you cease all violation of this License, then your
5307     license from a particular copyright holder is reinstated (a)
5308     provisionally, unless and until the copyright holder explicitly and
5309     finally terminates your license, and (b) permanently, if the
5310     copyright holder fails to notify you of the violation by some
5311     reasonable means prior to 60 days after the cessation.
5312
5313     Moreover, your license from a particular copyright holder is
5314     reinstated permanently if the copyright holder notifies you of the
5315     violation by some reasonable means, this is the first time you have
5316     received notice of violation of this License (for any work) from
5317     that copyright holder, and you cure the violation prior to 30 days
5318     after your receipt of the notice.
5319
5320     Termination of your rights under this section does not terminate
5321     the licenses of parties who have received copies or rights from you
5322     under this License.  If your rights have been terminated and not
5323     permanently reinstated, you do not qualify to receive new licenses
5324     for the same material under section 10.
5325
5326  9. Acceptance Not Required for Having Copies.
5327
5328     You are not required to accept this License in order to receive or
5329     run a copy of the Program.  Ancillary propagation of a covered work
5330     occurring solely as a consequence of using peer-to-peer
5331     transmission to receive a copy likewise does not require
5332     acceptance.  However, nothing other than this License grants you
5333     permission to propagate or modify any covered work.  These actions
5334     infringe copyright if you do not accept this License.  Therefore,
5335     by modifying or propagating a covered work, you indicate your
5336     acceptance of this License to do so.
5337
5338  10. Automatic Licensing of Downstream Recipients.
5339
5340     Each time you convey a covered work, the recipient automatically
5341     receives a license from the original licensors, to run, modify and
5342     propagate that work, subject to this License.  You are not
5343     responsible for enforcing compliance by third parties with this
5344     License.
5345
5346     An "entity transaction" is a transaction transferring control of an
5347     organization, or substantially all assets of one, or subdividing an
5348     organization, or merging organizations.  If propagation of a
5349     covered work results from an entity transaction, each party to that
5350     transaction who receives a copy of the work also receives whatever
5351     licenses to the work the party's predecessor in interest had or
5352     could give under the previous paragraph, plus a right to possession
5353     of the Corresponding Source of the work from the predecessor in
5354     interest, if the predecessor has it or can get it with reasonable
5355     efforts.
5356
5357     You may not impose any further restrictions on the exercise of the
5358     rights granted or affirmed under this License.  For example, you
5359     may not impose a license fee, royalty, or other charge for exercise
5360     of rights granted under this License, and you may not initiate
5361     litigation (including a cross-claim or counterclaim in a lawsuit)
5362     alleging that any patent claim is infringed by making, using,
5363     selling, offering for sale, or importing the Program or any portion
5364     of it.
5365
5366  11. Patents.
5367
5368     A "contributor" is a copyright holder who authorizes use under this
5369     License of the Program or a work on which the Program is based.
5370     The work thus licensed is called the contributor's "contributor
5371     version".
5372
5373     A contributor's "essential patent claims" are all patent claims
5374     owned or controlled by the contributor, whether already acquired or
5375     hereafter acquired, that would be infringed by some manner,
5376     permitted by this License, of making, using, or selling its
5377     contributor version, but do not include claims that would be
5378     infringed only as a consequence of further modification of the
5379     contributor version.  For purposes of this definition, "control"
5380     includes the right to grant patent sublicenses in a manner
5381     consistent with the requirements of this License.
5382
5383     Each contributor grants you a non-exclusive, worldwide,
5384     royalty-free patent license under the contributor's essential
5385     patent claims, to make, use, sell, offer for sale, import and
5386     otherwise run, modify and propagate the contents of its contributor
5387     version.
5388
5389     In the following three paragraphs, a "patent license" is any
5390     express agreement or commitment, however denominated, not to
5391     enforce a patent (such as an express permission to practice a
5392     patent or covenant not to sue for patent infringement).  To "grant"
5393     such a patent license to a party means to make such an agreement or
5394     commitment not to enforce a patent against the party.
5395
5396     If you convey a covered work, knowingly relying on a patent
5397     license, and the Corresponding Source of the work is not available
5398     for anyone to copy, free of charge and under the terms of this
5399     License, through a publicly available network server or other
5400     readily accessible means, then you must either (1) cause the
5401     Corresponding Source to be so available, or (2) arrange to deprive
5402     yourself of the benefit of the patent license for this particular
5403     work, or (3) arrange, in a manner consistent with the requirements
5404     of this License, to extend the patent license to downstream
5405     recipients.  "Knowingly relying" means you have actual knowledge
5406     that, but for the patent license, your conveying the covered work
5407     in a country, or your recipient's use of the covered work in a
5408     country, would infringe one or more identifiable patents in that
5409     country that you have reason to believe are valid.
5410
5411     If, pursuant to or in connection with a single transaction or
5412     arrangement, you convey, or propagate by procuring conveyance of, a
5413     covered work, and grant a patent license to some of the parties
5414     receiving the covered work authorizing them to use, propagate,
5415     modify or convey a specific copy of the covered work, then the
5416     patent license you grant is automatically extended to all
5417     recipients of the covered work and works based on it.
5418
5419     A patent license is "discriminatory" if it does not include within
5420     the scope of its coverage, prohibits the exercise of, or is
5421     conditioned on the non-exercise of one or more of the rights that
5422     are specifically granted under this License.  You may not convey a
5423     covered work if you are a party to an arrangement with a third
5424     party that is in the business of distributing software, under which
5425     you make payment to the third party based on the extent of your
5426     activity of conveying the work, and under which the third party
5427     grants, to any of the parties who would receive the covered work
5428     from you, a discriminatory patent license (a) in connection with
5429     copies of the covered work conveyed by you (or copies made from
5430     those copies), or (b) primarily for and in connection with specific
5431     products or compilations that contain the covered work, unless you
5432     entered into that arrangement, or that patent license was granted,
5433     prior to 28 March 2007.
5434
5435     Nothing in this License shall be construed as excluding or limiting
5436     any implied license or other defenses to infringement that may
5437     otherwise be available to you under applicable patent law.
5438
5439  12. No Surrender of Others' Freedom.
5440
5441     If conditions are imposed on you (whether by court order, agreement
5442     or otherwise) that contradict the conditions of this License, they
5443     do not excuse you from the conditions of this License.  If you
5444     cannot convey a covered work so as to satisfy simultaneously your
5445     obligations under this License and any other pertinent obligations,
5446     then as a consequence you may not convey it at all.  For example,
5447     if you agree to terms that obligate you to collect a royalty for
5448     further conveying from those to whom you convey the Program, the
5449     only way you could satisfy both those terms and this License would
5450     be to refrain entirely from conveying the Program.
5451
5452  13. Use with the GNU Affero General Public License.
5453
5454     Notwithstanding any other provision of this License, you have
5455     permission to link or combine any covered work with a work licensed
5456     under version 3 of the GNU Affero General Public License into a
5457     single combined work, and to convey the resulting work.  The terms
5458     of this License will continue to apply to the part which is the
5459     covered work, but the special requirements of the GNU Affero
5460     General Public License, section 13, concerning interaction through
5461     a network will apply to the combination as such.
5462
5463  14. Revised Versions of this License.
5464
5465     The Free Software Foundation may publish revised and/or new
5466     versions of the GNU General Public License from time to time.  Such
5467     new versions will be similar in spirit to the present version, but
5468     may differ in detail to address new problems or concerns.
5469
5470     Each version is given a distinguishing version number.  If the
5471     Program specifies that a certain numbered version of the GNU
5472     General Public License "or any later version" applies to it, you
5473     have the option of following the terms and conditions either of
5474     that numbered version or of any later version published by the Free
5475     Software Foundation.  If the Program does not specify a version
5476     number of the GNU General Public License, you may choose any
5477     version ever published by the Free Software Foundation.
5478
5479     If the Program specifies that a proxy can decide which future
5480     versions of the GNU General Public License can be used, that
5481     proxy's public statement of acceptance of a version permanently
5482     authorizes you to choose that version for the Program.
5483
5484     Later license versions may give you additional or different
5485     permissions.  However, no additional obligations are imposed on any
5486     author or copyright holder as a result of your choosing to follow a
5487     later version.
5488
5489  15. Disclaimer of Warranty.
5490
5491     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
5492     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
5493     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
5494     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
5495     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5496     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
5497     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
5498     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
5499     NECESSARY SERVICING, REPAIR OR CORRECTION.
5500
5501  16. Limitation of Liability.
5502
5503     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
5504     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
5505     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
5506     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
5507     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
5508     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
5509     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
5510     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5511     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
5512     THE POSSIBILITY OF SUCH DAMAGES.
5513
5514  17. Interpretation of Sections 15 and 16.
5515
5516     If the disclaimer of warranty and limitation of liability provided
5517     above cannot be given local legal effect according to their terms,
5518     reviewing courts shall apply local law that most closely
5519     approximates an absolute waiver of all civil liability in
5520     connection with the Program, unless a warranty or assumption of
5521     liability accompanies a copy of the Program in return for a fee.
5522
5523                      END OF TERMS AND CONDITIONS
5524
5525How to Apply These Terms to Your New Programs
5526=============================================
5527
5528If you develop a new program, and you want it to be of the greatest
5529possible use to the public, the best way to achieve this is to make it
5530free software which everyone can redistribute and change under these
5531terms.
5532
5533   To do so, attach the following notices to the program.  It is safest
5534to attach them to the start of each source file to most effectively
5535state the exclusion of warranty; and each file should have at least the
5536"copyright" line and a pointer to where the full notice is found.
5537
5538     ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
5539     Copyright (C) YEAR NAME OF AUTHOR
5540
5541     This program is free software: you can redistribute it and/or modify
5542     it under the terms of the GNU General Public License as published by
5543     the Free Software Foundation, either version 3 of the License, or (at
5544     your option) any later version.
5545
5546     This program is distributed in the hope that it will be useful, but
5547     WITHOUT ANY WARRANTY; without even the implied warranty of
5548     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5549     General Public License for more details.
5550
5551     You should have received a copy of the GNU General Public License
5552     along with this program.  If not, see <https://www.gnu.org/licenses/>.
5553
5554Also add information on how to contact you by electronic and paper mail.
5555
5556If the program does terminal interaction, make it output a short notice
5557like this when it starts in an interactive mode:
5558
5559     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
5560     This program comes with ABSOLUTELY NO WARRANTY; for details
5561     type 'show w'.  This is free software, and you are
5562     welcome to redistribute it under certain conditions;
5563     type 'show c' for details.
5564
5565   The hypothetical commands 'show w' and 'show c' should show the
5566appropriate parts of the General Public License.  Of course, your
5567program's commands might be different; for a GUI interface, you would
5568use an "about box".
5569
5570   You should also get your employer (if you work as a programmer) or
5571school, if any, to sign a "copyright disclaimer" for the program, if
5572necessary.  For more information on this, and how to apply and follow
5573the GNU GPL, see <https://www.gnu.org/licenses/>.
5574
5575   The GNU General Public License does not permit incorporating your
5576program into proprietary programs.  If your program is a subroutine
5577library, you may consider it more useful to permit linking proprietary
5578applications with the library.  If this is what you want to do, use the
5579GNU Lesser General Public License instead of this License.  But first,
5580please read <https://www.gnu.org/philosophy/why-not-lgpl.html>.
5581
5582
5583File: gnupg.info,  Node: Contributors,  Next: Glossary,  Prev: Copying,  Up: Top
5584
5585Contributors to GnuPG
5586*********************
5587
5588The GnuPG project would like to thank its many contributors.  Without
5589them the project would not have been nearly as successful as it has
5590been.  Any omissions in this list are accidental.  Feel free to contact
5591the maintainer if you have been left out or some of your contributions
5592are not listed.
5593
5594   David Shaw, Matthew Skala, Michael Roth, Niklas Hernaeus, Nils
5595Ellmenreich, Rémi Guyomarch, Stefan Bellon, Timo Schulz and Werner Koch
5596wrote the code.  Birger Langkjer, Daniel Resare, Dokianakis Theofanis,
5597Edmund GRIMLEY EVANS, Gaël Quéri, Gregory Steuck, Nagy Ferenc
5598László, Ivo Timmermans, Jacobo Tarri'o Barreiro, Janusz Aleksander
5599Urbanowicz, Jedi Lin, Jouni Hiltunen, Laurentiu Buzdugan, Magda
5600Procha'zkova', Michael Anckaert, Michal Majer, Marco d'Itri, Nilgun
5601Belma Buguner, Pedro Morais, Tedi Heriyanto, Thiago Jung Bauermann,
5602Rafael Caetano dos Santos, Toomas Soome, Urko Lusa, Walter Koch, Yosiaki
5603IIDA did the official translations.  Mike Ashley wrote and maintains the
5604GNU Privacy Handbook.  David Scribner is the current FAQ editor.
5605Lorenzo Cappelletti maintains the web site.
5606
5607   The new modularized architecture of gnupg 1.9 as well as the
5608X.509/CMS part has been developed as part of the Ägypten project.
5609Direct contributors to this project are: Bernhard Herzog, who did
5610extensive testing and tracked down a lot of bugs.  Bernhard Reiter, who
5611made sure that we met the specifications and the deadlines.  He did
5612extensive testing and came up with a lot of suggestions.  Jan-Oliver
5613Wagner made sure that we met the specifications and the deadlines.  He
5614also did extensive testing and came up with a lot of suggestions.
5615Karl-Heinz Zimmer and Marc Mutz had to struggle with all the bugs and
5616misconceptions while working on KDE integration.  Marcus Brinkman
5617extended GPGME, cleaned up the Assuan code and fixed bugs all over the
5618place.  Moritz Schulte took over Libgcrypt maintenance and developed it
5619into a stable an useful library.  Steffen Hansen had a hard time to
5620write the dirmngr due to underspecified interfaces.  Thomas Koester did
5621extensive testing and tracked down a lot of bugs.  Werner Koch designed
5622the system and wrote most of the code.
5623
5624   The following people helped greatly by suggesting improvements,
5625testing, fixing bugs, providing resources and doing other important
5626tasks: Adam Mitchell, Albert Chin, Alec Habig, Allan Clark, Anand
5627Kumria, Andreas Haumer, Anthony Mulcahy, Ariel T Glenn, Bob Mathews,
5628Bodo Moeller, Brendan O'Dea, Brenno de Winter, Brian M. Carlson, Brian
5629Moore, Brian Warner, Bryan Fullerton, Caskey L. Dickson, Cees van de
5630Griend, Charles Levert, Chip Salzenberg, Chris Adams, Christian Biere,
5631Christian Kurz, Christian von Roques, Christopher Oliver, Christian
5632Recktenwald, Dan Winship, Daniel Eisenbud, Daniel Koening, Dave Dykstra,
5633David C Niemi, David Champion, David Ellement, David Hallinan, David
5634Hollenberg, David Mathog, David R. Bergstein, Detlef Lannert, Dimitri,
5635Dirk Lattermann, Dirk Meyer, Disastry, Douglas Calvert, Ed Boraas,
5636Edmund GRIMLEY EVANS, Edwin Woudt, Enzo Michelangeli, Ernst Molitor,
5637Fabio Coatti, Felix von Leitner, fish stiqz, Florian Weimer, Francesco
5638Potorti, Frank Donahoe, Frank Heckenbach, Frank Stajano, Frank Tobin,
5639Gabriel Rosenkoetter, Gaël Quéri, Gene Carter, Geoff Keating, Georg
5640Schwarz, Giampaolo Tomassoni, Gilbert Fernandes, Greg Louis, Greg
5641Troxel, Gregory Steuck, Gregery Barton, Harald Denker, Holger Baust,
5642Hendrik Buschkamp, Holger Schurig, Holger Smolinski, Holger Trapp, Hugh
5643Daniel, Huy Le, Ian McKellar, Ivo Timmermans, Jan Krueger, Jan
5644Niehusmann, Janusz A. Urbanowicz, James Troup, Jean-loup Gailly, Jeff
5645Long, Jeffery Von Ronne, Jens Bachem, Jeroen C. van Gelderen, J Horacio
5646MG, J. Michael Ashley, Jim Bauer, Jim Small, Joachim Backes, Joe Rhett,
5647John A. Martin, Johnny Teveßen, Jörg Schilling, Jos Backus, Joseph
5648Walton, Juan F. Codagnone, Jun Kuriyama, Kahil D. Jallad, Karl Fogel,
5649Karsten Thygesen, Katsuhiro Kondou, Kazu Yamamoto, Keith Clayton, Kevin
5650Ryde, Klaus Singvogel, Kurt Garloff, Lars Kellogg-Stedman, L. Sassaman,
5651M Taylor, Marcel Waldvogel, Marco d'Itri, Marco Parrone, Marcus
5652Brinkmann, Mark Adler, Mark Elbrecht, Mark Pettit, Markus Friedl, Martin
5653Kahlert, Martin Hamilton, Martin Schulte, Matt Kraai, Matthew Skala,
5654Matthew Wilcox, Matthias Urlichs, Max Valianskiy, Michael Engels,
5655Michael Fischer v.  Mollard, Michael Roth, Michael Sobolev, Michael
5656Tokarev, Nicolas Graner, Mike McEwan, Neal H Walfield, Nelson H. F.
5657Beebe, NIIBE Yutaka, Niklas Hernaeus, Nimrod Zimerman, N J Doye, Oliver
5658Haakert, Oskari Jääskeläinen, Pascal Scheffers, Paul D. Smith, Per
5659Cederqvist, Phil Blundell, Philippe Laliberte, Peter Fales, Peter
5660Gutmann, Peter Marschall, Peter Valchev, Piotr Krukowiecki, QingLong,
5661Ralph Gillen, Rat, Reinhard Wobst, Rémi Guyomarch, Reuben Sumner,
5662Richard Outerbridge, Robert Joop, Roddy Strachan, Roger Sondermann,
5663Roland Rosenfeld, Roman Pavlik, Ross Golder, Ryan Malayter, Sam Roberts,
5664Sami Tolvanen, Sean MacLennan, Sebastian Klemke, Serge Munhoven, SL
5665Baur, Stefan Bellon, Dr.Stefan.Dalibor, Stefan Karrmann, Stefan Keller,
5666Steffen Ullrich, Steffen Zahn, Steven Bakker, Steven Murdoch, Susanne
5667Schultz, Ted Cabeen, Thiago Jung Bauermann, Thijmen Klok, Thomas
5668Roessler, Tim Mooney, Timo Schulz, Todd Vierling, TOGAWA Satoshi, Tom
5669Spindler, Tom Zerucha, Tomas Fasth, Tommi Komulainen, Thomas Klausner,
5670Tomasz Kozlowski, Thomas Mikkelsen, Ulf Möller, Urko Lusa, Vincent P.
5671Broman, Volker Quetschke, W Lewis, Walter Hofmann, Walter Koch, Wayne
5672Chapeskie, Wim Vandeputte, Winona Brown, Yosiaki IIDA, Yoshihiro Kajiki
5673and Gerlinde Klaes.
5674
5675   This software has been made possible by the previous work of Chris
5676Wedgwood, Jean-loup Gailly, Jon Callas, Mark Adler, Martin Hellman, Paul
5677Kendall, Philip R. Zimmermann, Peter Gutmann, Philip A. Nelson, Taher
5678Elgamal, Torbjorn Granlund, Whitfield Diffie, some unknown NSA
5679mathematicians and all the folks who have worked hard to create complete
5680and free operating systems.
5681
5682   And finally we'd like to thank everyone who uses these tools, submits
5683bug reports and generally reminds us why we're doing this work in the
5684first place.
5685
5686
5687File: gnupg.info,  Node: Glossary,  Next: Option Index,  Prev: Contributors,  Up: Top
5688
5689Glossary
5690********
5691
5692'ARL'
5693     The _Authority Revocation List_ is technical identical to a CRL but
5694     used for CAs and not for end user certificates.
5695
5696'Chain model'
5697     Verification model for X.509 which uses the creation date of a
5698     signature as the date the validation starts and in turn checks that
5699     each certificate has been issued within the time frame, the issuing
5700     certificate was valid.  This allows the verification of signatures
5701     after the CA's certificate expired.  The validation test also
5702     required an online check of the certificate status.  The chain
5703     model is required by the German signature law.  See also _Shell
5704     model_.
5705
5706'CMS'
5707     The _Cryptographic Message Standard_ describes a message format for
5708     encryption and digital signing.  It is closely related to the X.509
5709     certificate format.  CMS was formerly known under the name 'PKCS#7'
5710     and is described by 'RFC3369'.
5711
5712'CRL'
5713     The _Certificate Revocation List_ is a list containing certificates
5714     revoked by the issuer.
5715
5716'CSR'
5717     The _Certificate Signing Request_ is a message send to a CA to ask
5718     them to issue a new certificate.  The data format of such a signing
5719     request is called PCKS#10.
5720
5721'OpenPGP'
5722     A data format used to build a PKI and to exchange encrypted or
5723     signed messages.  In contrast to X.509, OpenPGP also includes the
5724     message format but does not explicitly demand a specific PKI.
5725     However any kind of PKI may be build upon the OpenPGP protocol.
5726
5727'Keygrip'
5728     This term is used by GnuPG to describe a 20 byte hash value used to
5729     identify a certain key without referencing to a concrete protocol.
5730     It is used internally to access a private key.  Usually it is shown
5731     and entered as a 40 character hexadecimal formatted string.
5732
5733'OCSP'
5734     The _Online Certificate Status Protocol_ is used as an alternative
5735     to a CRL.  It is described in 'RFC 2560'.
5736
5737'PSE'
5738     The _Personal Security Environment_ describes a database to store
5739     private keys.  This is either a smartcard or a collection of files
5740     on a disk; the latter is often called a Soft-PSE.
5741
5742'Shell model'
5743     The standard model for validation of certificates under X.509.  At
5744     the time of the verification all certificates must be valid and not
5745     expired.  See also _Chain model_.
5746
5747'X.509'
5748     Description of a PKI used with CMS. It is for example defined by
5749     'RFC3280'.
5750
5751
5752File: gnupg.info,  Node: Option Index,  Next: Environment Index,  Prev: Glossary,  Up: Top
5753
5754Option Index
5755************
5756
5757�[index�]
5758* Menu:
5759
5760* --no-history:                          gpg-card.            (line  59)
5761* --no-history <1>:                      Invoking gpg-connect-agent.
5762                                                              (line  82)
5763* add-servers:                           Dirmngr Options.     (line 310)
5764* aead-algo:                             GPG Esoteric Options.
5765                                                              (line 223)
5766* agent-program:                         GPG Configuration Options.
5767                                                              (line 739)
5768* agent-program <1>:                     Configuration Options.
5769                                                              (line  56)
5770* agent-program <2>:                     gpg-card.            (line  64)
5771* agent-program <3>:                     Invoking gpg-connect-agent.
5772                                                              (line  87)
5773* allow-admin:                           Scdaemon Options.    (line 175)
5774* allow-emacs-pinentry:                  Agent Options.       (line 170)
5775* allow-freeform-uid:                    GPG Esoteric Options.
5776                                                              (line 395)
5777* allow-loopback-pinentry:               Agent Options.       (line 152)
5778* allow-non-selfsigned-uid:              GPG Esoteric Options.
5779                                                              (line 390)
5780* allow-ocsp:                            Dirmngr Options.     (line 331)
5781* allow-old-cipher-algos:                GPG Esoteric Options.
5782                                                              (line 431)
5783* allow-preset-passphrase:               Agent Options.       (line 147)
5784* allow-secret-key-import:               GPG Esoteric Options.
5785                                                              (line 588)
5786* allow-version-check:                   Dirmngr Options.     (line 138)
5787* allow-weak-digest-algos:               GPG Esoteric Options.
5788                                                              (line 439)
5789* allow-weak-key-signatures:             GPG Esoteric Options.
5790                                                              (line 455)
5791* always-trust:                          Deprecated Options.  (line  21)
5792* application-priority:                  Scdaemon Options.    (line 190)
5793* armor:                                 GPG Input and Output.
5794                                                              (line   8)
5795* armor <1>:                             Input and Output.    (line   8)
5796* ask-cert-expire:                       GPG Esoteric Options.
5797                                                              (line 553)
5798* ask-cert-level:                        GPG Configuration Options.
5799                                                              (line 358)
5800* ask-sig-expire:                        GPG Esoteric Options.
5801                                                              (line 539)
5802* assume-armor:                          Input and Output.    (line  14)
5803* assume-base64:                         Input and Output.    (line  18)
5804* assume-binary:                         Input and Output.    (line  21)
5805* attribute-fd:                          GPG Esoteric Options.
5806                                                              (line 107)
5807* attribute-file:                        GPG Esoteric Options.
5808                                                              (line 113)
5809* authenticate:                          gpg-card.            (line  94)
5810* auto-check-trustdb:                    GPG Configuration Options.
5811                                                              (line 726)
5812* auto-expand-secmem:                    Agent Options.       (line 418)
5813* auto-issuer-key-retrieve:              Certificate Options. (line  62)
5814* auto-key-import:                       GPG Configuration Options.
5815                                                              (line 571)
5816* auto-key-locate:                       GPG Configuration Options.
5817                                                              (line 507)
5818* auto-key-retrieve:                     GPG Configuration Options.
5819                                                              (line 583)
5820* base64:                                Input and Output.    (line  11)
5821* batch:                                 Agent Options.       (line  48)
5822* batch <1>:                             GPG Configuration Options.
5823                                                              (line  45)
5824* bzip2-compress-level:                  GPG Configuration Options.
5825                                                              (line 332)
5826* bzip2-decompress-lowmem:               GPG Configuration Options.
5827                                                              (line 342)
5828* c:                                     Dirmngr Options.     (line  87)
5829* cache-cert:                            dirmngr-client.      (line  72)
5830* cafpr:                                 gpg-card.            (line 102)
5831* call-dirmngr:                          Operational GPGSM Commands.
5832                                                              (line  27)
5833* call-protect-tool:                     Operational GPGSM Commands.
5834                                                              (line  41)
5835* card-edit:                             Operational GPG Commands.
5836                                                              (line 210)
5837* card-status:                           Operational GPG Commands.
5838                                                              (line 216)
5839* card-timeout:                          Scdaemon Options.    (line 159)
5840* cert-digest-algo:                      GPG Esoteric Options.
5841                                                              (line 263)
5842* cert-notation:                         GPG Esoteric Options.
5843                                                              (line 139)
5844* cert-policy-url:                       GPG Esoteric Options.
5845                                                              (line 175)
5846* change-passphrase:                     OpenPGP Key Management.
5847                                                              (line 472)
5848* change-passphrase <1>:                 Certificate Management.
5849                                                              (line 120)
5850* change-pin:                            Operational GPG Commands.
5851                                                              (line 219)
5852* check:                                 gpg-check-pattern.   (line  56)
5853* check-passphrase-pattern:              Agent Options.       (line 224)
5854* check-signatures:                      Operational GPG Commands.
5855                                                              (line 140)
5856* check-sigs:                            Operational GPG Commands.
5857                                                              (line 141)
5858* check-sym-passphrase-pattern:          Agent Options.       (line 224)
5859* check-trustdb:                         Operational GPG Commands.
5860                                                              (line 349)
5861* chuid:                                 GPG Esoteric Options.
5862                                                              (line 640)
5863* chuid <1>:                             Esoteric Options.    (line   7)
5864* chuid <2>:                             gpg-card.            (line  75)
5865* chuid <3>:                             Invoking gpgconf.    (line 136)
5866* chuid <4>:                             Invoking gpg-connect-agent.
5867                                                              (line  64)
5868* chunk-size:                            GPG Input and Output.
5869                                                              (line  29)
5870* cipher-algo:                           GPG Esoteric Options.
5871                                                              (line 214)
5872* cipher-algo <1>:                       CMS Options.         (line  13)
5873* clear-sign:                            Operational GPG Commands.
5874                                                              (line  17)
5875* clearsign:                             Operational GPG Commands.
5876                                                              (line  18)
5877* cms:                                   gpgtar.              (line  99)
5878* command-fd:                            GPG Esoteric Options.
5879                                                              (line 378)
5880* command-file:                          GPG Esoteric Options.
5881                                                              (line 385)
5882* comment:                               GPG Esoteric Options.
5883                                                              (line 118)
5884* compliance:                            Compliance Options.  (line  60)
5885* compliant-needed:                      GPG Configuration Options.
5886                                                              (line 701)
5887* compress-algo:                         GPG Esoteric Options.
5888                                                              (line 240)
5889* compress-level:                        GPG Configuration Options.
5890                                                              (line 332)
5891* connect-quick-timeout:                 Dirmngr Options.     (line 125)
5892* connect-timeout:                       Dirmngr Options.     (line 125)
5893* create:                                gpgtar.              (line  16)
5894* create-socketdir:                      Invoking gpgconf.    (line  91)
5895* csh:                                   Agent Options.       (line 121)
5896* csh <1>:                               Dirmngr Options.     (line  87)
5897* ctapi-driver:                          Scdaemon Options.    (line 136)
5898* daemon:                                Agent Commands.      (line  27)
5899* daemon <1>:                            Dirmngr Commands.    (line  27)
5900* daemon <2>:                            Scdaemon Commands.   (line  31)
5901* dearmor:                               Operational GPG Commands.
5902                                                              (line 403)
5903* debug:                                 Agent Options.       (line  82)
5904* debug <1>:                             Dirmngr Options.     (line  59)
5905* debug <2>:                             GPG Esoteric Options.
5906                                                              (line  47)
5907* debug <3>:                             Esoteric Options.    (line  63)
5908* debug <4>:                             Scdaemon Options.    (line  69)
5909* debug-all:                             Agent Options.       (line  89)
5910* debug-all <1>:                         Dirmngr Options.     (line  66)
5911* debug-all <2>:                         GPG Esoteric Options.
5912                                                              (line  54)
5913* debug-all <3>:                         Esoteric Options.    (line  73)
5914* debug-all <4>:                         Scdaemon Options.    (line  76)
5915* debug-allow-core-dump:                 Esoteric Options.    (line  76)
5916* debug-allow-core-dump <1>:             Scdaemon Options.    (line  93)
5917* debug-allow-large-chunks:              GPG Esoteric Options.
5918                                                              (line  66)
5919* debug-assuan-log-cats:                 Scdaemon Options.    (line 102)
5920* debug-disable-ticker:                  Scdaemon Options.    (line  89)
5921* debug-ignore-expiration:               Esoteric Options.    (line  87)
5922* debug-iolbf:                           GPG Esoteric Options.
5923                                                              (line  57)
5924* debug-iolbf <1>:                       GPG Esoteric Options.
5925                                                              (line  61)
5926* debug-level:                           Agent Options.       (line  57)
5927* debug-level <1>:                       Dirmngr Options.     (line  34)
5928* debug-level <2>:                       GPG Esoteric Options.
5929                                                              (line  22)
5930* debug-level <3>:                       Esoteric Options.    (line  38)
5931* debug-level <4>:                       Scdaemon Options.    (line  40)
5932* debug-log-tid:                         Scdaemon Options.    (line  99)
5933* debug-no-chain-validation:             Esoteric Options.    (line  83)
5934* debug-pinentry:                        Agent Options.       (line 109)
5935* debug-quick-random:                    Agent Options.       (line  97)
5936* debug-wait:                            Agent Options.       (line  92)
5937* debug-wait <1>:                        Dirmngr Options.     (line  74)
5938* debug-wait <2>:                        Scdaemon Options.    (line  79)
5939* debug-wait <3>:                        Scdaemon Options.    (line  84)
5940* decode:                                Invoking gpg-connect-agent.
5941                                                              (line 118)
5942* decrypt:                               Operational GPG Commands.
5943                                                              (line  59)
5944* decrypt <1>:                           Operational GPGSM Commands.
5945                                                              (line  11)
5946* decrypt <2>:                           gpgtar.              (line  29)
5947* decrypt-files:                         Operational GPG Commands.
5948                                                              (line 114)
5949* default-cache-ttl:                     Agent Options.       (line 181)
5950* default-cache-ttl <1>:                 Agent Options.       (line 190)
5951* default-cert-expire:                   GPG Esoteric Options.
5952                                                              (line 559)
5953* default-cert-level:                    GPG Configuration Options.
5954                                                              (line 366)
5955* default-key:                           GPG Configuration Options.
5956                                                              (line  10)
5957* default-key <1>:                       Input and Output.    (line  34)
5958* default-keyserver-url:                 GPG Esoteric Options.
5959                                                              (line 614)
5960* default-new-key-algo STRING:           GPG Esoteric Options.
5961                                                              (line 566)
5962* default-preference-list:               GPG Esoteric Options.
5963                                                              (line 609)
5964* default-recipient:                     GPG Configuration Options.
5965                                                              (line  19)
5966* default-recipient-self:                GPG Configuration Options.
5967                                                              (line  23)
5968* default-sig-expire:                    GPG Esoteric Options.
5969                                                              (line 545)
5970* delete-keys:                           Operational GPG Commands.
5971                                                              (line 224)
5972* delete-keys <1>:                       Certificate Management.
5973                                                              (line  71)
5974* delete-secret-and-public-key:          Operational GPG Commands.
5975                                                              (line 244)
5976* delete-secret-keys:                    Operational GPG Commands.
5977                                                              (line 233)
5978* deny-admin:                            Scdaemon Options.    (line 175)
5979* desig-revoke:                          OpenPGP Key Management.
5980                                                              (line 134)
5981* detach-sign:                           Operational GPG Commands.
5982                                                              (line  28)
5983* digest-algo:                           GPG Esoteric Options.
5984                                                              (line 232)
5985* directory:                             gpgtar.              (line  76)
5986* directory <1>:                         gpg-wks-client.      (line 108)
5987* directory <2>:                         gpg-wks-server.      (line  50)
5988* dirmngr:                               Invoking gpg-connect-agent.
5989                                                              (line  13)
5990* dirmngr-program:                       GPG Configuration Options.
5991                                                              (line 746)
5992* dirmngr-program <1>:                   Configuration Options.
5993                                                              (line  62)
5994* dirmngr-program <2>:                   Invoking gpg-connect-agent.
5995                                                              (line  94)
5996* disable-application:                   Scdaemon Options.    (line 185)
5997* disable-ccid:                          Scdaemon Options.    (line 141)
5998* disable-check-own-socket:              Agent Options.       (line 306)
5999* disable-check-own-socket <1>:          Dirmngr Options.     (line  79)
6000* disable-cipher-algo:                   GPG Esoteric Options.
6001                                                              (line 274)
6002* disable-crl-checks:                    Certificate Options. (line  13)
6003* disable-dsa2:                          GPG Configuration Options.
6004                                                              (line 190)
6005* disable-extended-key-format:           Agent Options.       (line 352)
6006* disable-http:                          Dirmngr Options.     (line 217)
6007* disable-ipv4:                          Dirmngr Options.     (line 211)
6008* disable-ipv6:                          Dirmngr Options.     (line 211)
6009* disable-large-rsa:                     GPG Configuration Options.
6010                                                              (line 181)
6011* disable-ldap:                          Dirmngr Options.     (line 214)
6012* disable-mdc:                           OpenPGP Options.     (line  30)
6013* disable-ocsp:                          Certificate Options. (line  53)
6014* disable-pinpad:                        Scdaemon Options.    (line 172)
6015* disable-policy-checks:                 Certificate Options. (line   8)
6016* disable-pubkey-algo:                   GPG Esoteric Options.
6017                                                              (line 279)
6018* disable-scdaemon:                      Agent Options.       (line 300)
6019* disable-signer-uid:                    OpenPGP Options.     (line  37)
6020* disable-trusted-cert-crl-check:        Certificate Options. (line  24)
6021* display:                               Agent Options.       (line 324)
6022* display-charset:                       GPG Configuration Options.
6023                                                              (line 279)
6024* display-charset:iso-8859-1:            GPG Configuration Options.
6025                                                              (line 289)
6026* display-charset:iso-8859-15:           GPG Configuration Options.
6027                                                              (line 295)
6028* display-charset:iso-8859-2:            GPG Configuration Options.
6029                                                              (line 292)
6030* display-charset:koi8-r:                GPG Configuration Options.
6031                                                              (line 298)
6032* display-charset:utf-8:                 GPG Configuration Options.
6033                                                              (line 301)
6034* dry-run:                               GPG Esoteric Options.
6035                                                              (line   8)
6036* dry-run <1>:                           gpgtar.              (line  72)
6037* dump-cert:                             Certificate Management.
6038                                                              (line  36)
6039* dump-chain:                            Certificate Management.
6040                                                              (line  40)
6041* dump-external-keys:                    Certificate Management.
6042                                                              (line  47)
6043* dump-keys:                             Certificate Management.
6044                                                              (line  36)
6045* dump-options:                          Agent Commands.      (line  19)
6046* dump-options <1>:                      Dirmngr Commands.    (line  18)
6047* dump-options <2>:                      General GPG Commands.
6048                                                              (line  20)
6049* dump-options <3>:                      General GPGSM Commands.
6050                                                              (line  19)
6051* dump-options <4>:                      Scdaemon Commands.   (line  18)
6052* dump-secret-keys:                      Certificate Management.
6053                                                              (line  43)
6054* edit-card:                             Operational GPG Commands.
6055                                                              (line 209)
6056* edit-key:                              OpenPGP Key Management.
6057                                                              (line 139)
6058* emit-version:                          GPG Esoteric Options.
6059                                                              (line 129)
6060* enable-crl-checks:                     Certificate Options. (line  13)
6061* enable-dsa2:                           GPG Configuration Options.
6062                                                              (line 190)
6063* enable-extended-key-format:            Agent Options.       (line 352)
6064* enable-issuer-based-crl-check:         Certificate Options. (line  45)
6065* enable-large-rsa:                      GPG Configuration Options.
6066                                                              (line 181)
6067* enable-ocsp:                           Certificate Options. (line  53)
6068* enable-passphrase-history:             Agent Options.       (line 247)
6069* enable-pinpad-varlen:                  Scdaemon Options.    (line 164)
6070* enable-policy-checks:                  Certificate Options. (line   8)
6071* enable-progress-filter:                GPG Esoteric Options.
6072                                                              (line  86)
6073* enable-putty-support:                  Agent Options.       (line 364)
6074* enable-special-filenames:              GPG Esoteric Options.
6075                                                              (line 596)
6076* enable-special-filenames <1>:          gpgv.                (line  97)
6077* enable-ssh-support:                    Agent Options.       (line 364)
6078* enable-trusted-cert-crl-check:         Certificate Options. (line  24)
6079* enarmor:                               Operational GPG Commands.
6080                                                              (line 403)
6081* encrypt:                               Operational GPG Commands.
6082                                                              (line  32)
6083* encrypt <1>:                           Operational GPGSM Commands.
6084                                                              (line   7)
6085* encrypt <2>:                           gpgtar.              (line  23)
6086* encrypt-files:                         Operational GPG Commands.
6087                                                              (line 111)
6088* encrypt-to:                            GPG Key related Options.
6089                                                              (line  35)
6090* enforce-passphrase-constraints:        Agent Options.       (line 208)
6091* escape-from-lines:                     GPG Esoteric Options.
6092                                                              (line 304)
6093* exec:                                  Invoking gpg-connect-agent.
6094                                                              (line  28)
6095* exec-path:                             GPG Configuration Options.
6096                                                              (line 219)
6097* exit-on-status-write-error:            GPG Configuration Options.
6098                                                              (line 775)
6099* expert:                                GPG Configuration Options.
6100                                                              (line 830)
6101* export:                                Operational GPG Commands.
6102                                                              (line 250)
6103* export <1>:                            Certificate Management.
6104                                                              (line  80)
6105* export-filter:                         GPG Input and Output.
6106                                                              (line 143)
6107* export-options:                        GPG Input and Output.
6108                                                              (line 232)
6109* export-ownertrust:                     Operational GPG Commands.
6110                                                              (line 364)
6111* export-secret-key-p12:                 Certificate Management.
6112                                                              (line  93)
6113* export-secret-key-p8:                  Certificate Management.
6114                                                              (line 102)
6115* export-secret-key-raw:                 Certificate Management.
6116                                                              (line 102)
6117* export-secret-keys:                    Operational GPG Commands.
6118                                                              (line 268)
6119* export-secret-subkeys:                 Operational GPG Commands.
6120                                                              (line 268)
6121* export-ssh-key:                        Operational GPG Commands.
6122                                                              (line 290)
6123* extra-digest-algo:                     Esoteric Options.    (line  16)
6124* extra-socket:                          Agent Options.       (line 338)
6125* extract:                               gpgtar.              (line  19)
6126* factory-reset:                         gpg-card.            (line 107)
6127* faked-system-time:                     Agent Options.       (line  52)
6128* faked-system-time <1>:                 GPG Esoteric Options.
6129                                                              (line  70)
6130* faked-system-time <2>:                 Esoteric Options.    (line  27)
6131* fast-list-mode:                        GPG Esoteric Options.
6132                                                              (line 494)
6133* fetch:                                 gpg-card.            (line 112)
6134* fetch-crl:                             Dirmngr Commands.    (line  52)
6135* fetch-keys:                            Operational GPG Commands.
6136                                                              (line 333)
6137* fingerprint:                           Operational GPG Commands.
6138                                                              (line 194)
6139* fixed-list-mode:                       GPG Input and Output.
6140                                                              (line 290)
6141* flush:                                 Dirmngr Commands.    (line  62)
6142* for-your-eyes-only:                    GPG Esoteric Options.
6143                                                              (line 200)
6144* force:                                 Dirmngr Options.     (line  93)
6145* force <1>:                             watchgnupg.          (line  31)
6146* force-aead:                            OpenPGP Options.     (line  24)
6147* force-crl-refresh:                     Certificate Options. (line  35)
6148* force-default-responder:               dirmngr-client.      (line  64)
6149* force-mdc:                             OpenPGP Options.     (line  30)
6150* force-sign-key:                        GPG Esoteric Options.
6151                                                              (line 582)
6152* forcesig:                              gpg-card.            (line 116)
6153* forget:                                Invoking gpg-preset-passphrase.
6154                                                              (line  26)
6155* from:                                  gpg-wks-server.      (line  54)
6156* full-gen-key:                          OpenPGP Key Management.
6157                                                              (line 111)
6158* full-generate-key:                     OpenPGP Key Management.
6159                                                              (line 110)
6160* full-timestrings:                      GPG Esoteric Options.
6161                                                              (line  79)
6162* gen-key:                               OpenPGP Key Management.
6163                                                              (line 104)
6164* gen-key <1>:                           Certificate Management.
6165                                                              (line   8)
6166* gen-prime:                             Operational GPG Commands.
6167                                                              (line 398)
6168* gen-random:                            Operational GPG Commands.
6169                                                              (line 391)
6170* gen-revoke:                            OpenPGP Key Management.
6171                                                              (line 120)
6172* generate:                              gpg-card.            (line 119)
6173* generate-designated-revocation:        OpenPGP Key Management.
6174                                                              (line 133)
6175* generate-key:                          OpenPGP Key Management.
6176                                                              (line 103)
6177* generate-key <1>:                      Certificate Management.
6178                                                              (line   7)
6179* generate-revocation:                   OpenPGP Key Management.
6180                                                              (line 119)
6181* gnupg:                                 Compliance Options.  (line  12)
6182* gpg:                                   gpgtar.              (line 110)
6183* gpg-agent-info:                        GPG Configuration Options.
6184                                                              (line 736)
6185* gpg-args:                              gpgtar.              (line 113)
6186* gpg-program:                           gpg-card.            (line  69)
6187* gpgconf-list:                          GPG Esoteric Options.
6188                                                              (line 630)
6189* gpgconf-test:                          GPG Esoteric Options.
6190                                                              (line 634)
6191* gpgsm-program:                         gpg-card.            (line  72)
6192* grab:                                  Agent Options.       (line 128)
6193* group:                                 GPG Key related Options.
6194                                                              (line  55)
6195* header:                                gpg-wks-server.      (line  57)
6196* help:                                  Agent Commands.      (line  15)
6197* help <1>:                              Dirmngr Commands.    (line  14)
6198* help <2>:                              General GPG Commands.
6199                                                              (line  12)
6200* help <3>:                              General GPGSM Commands.
6201                                                              (line  11)
6202* help <4>:                              Scdaemon Commands.   (line  14)
6203* help <5>:                              gpg-card.            (line  50)
6204* help <6>:                              watchgnupg.          (line  55)
6205* help <7>:                              dirmngr-client.      (line  44)
6206* help <8>:                              gpgtar.              (line 128)
6207* help <9>:                              gpg-wks-client.      (line 121)
6208* help <10>:                             gpg-wks-server.      (line  87)
6209* hex:                                   Invoking gpg-connect-agent.
6210                                                              (line 114)
6211* hidden-encrypt-to:                     GPG Key related Options.
6212                                                              (line  43)
6213* hidden-recipient:                      GPG Key related Options.
6214                                                              (line  14)
6215* hidden-recipient-file:                 GPG Key related Options.
6216                                                              (line  29)
6217* homedir:                               Agent Options.       (line  17)
6218* homedir <1>:                           GPG Configuration Options.
6219                                                              (line 258)
6220* homedir <2>:                           Configuration Options.
6221                                                              (line  16)
6222* homedir <3>:                           Scdaemon Options.    (line  13)
6223* homedir <4>:                           gpgv.                (line  69)
6224* homedir <5>:                           Invoking gpgconf.    (line 115)
6225* homedir <6>:                           Invoking gpg-connect-agent.
6226                                                              (line  43)
6227* honor-http-proxy:                      Dirmngr Options.     (line 236)
6228* http-proxy:                            Dirmngr Options.     (line 240)
6229* ignore-cache-for-signing:              Agent Options.       (line 175)
6230* ignore-cert:                           Dirmngr Options.     (line 390)
6231* ignore-cert-extension:                 Dirmngr Options.     (line 380)
6232* ignore-cert-extension <1>:             Certificate Options. (line  82)
6233* ignore-crc-error:                      GPG Esoteric Options.
6234                                                              (line 415)
6235* ignore-http-dp:                        Dirmngr Options.     (line 220)
6236* ignore-ldap-dp:                        Dirmngr Options.     (line 227)
6237* ignore-mdc-error:                      GPG Esoteric Options.
6238                                                              (line 422)
6239* ignore-ocsp-service-url:               Dirmngr Options.     (line 232)
6240* ignore-time-conflict:                  GPG Esoteric Options.
6241                                                              (line 401)
6242* ignore-time-conflict <1>:              gpgv.                (line  63)
6243* ignore-valid-from:                     GPG Esoteric Options.
6244                                                              (line 408)
6245* import:                                Operational GPG Commands.
6246                                                              (line 304)
6247* import <1>:                            Certificate Management.
6248                                                              (line 110)
6249* import-filter:                         GPG Input and Output.
6250                                                              (line 143)
6251* import-options:                        GPG Input and Output.
6252                                                              (line  53)
6253* import-ownertrust:                     Operational GPG Commands.
6254                                                              (line 370)
6255* include-certs:                         CMS Options.         (line   7)
6256* include-key-block:                     OpenPGP Options.     (line  45)
6257* input-size-hint:                       GPG Input and Output.
6258                                                              (line  37)
6259* interactive:                           GPG Esoteric Options.
6260                                                              (line  19)
6261* kdf-setup:                             gpg-card.            (line 126)
6262* keep-display:                          Agent Options.       (line 329)
6263* keep-tty:                              Agent Options.       (line 329)
6264* key-origin:                            GPG Input and Output.
6265                                                              (line  45)
6266* keyboxd:                               Invoking gpg-connect-agent.
6267                                                              (line  17)
6268* keyboxd-program:                       Invoking gpg-connect-agent.
6269                                                              (line  99)
6270* keydb-clear-some-cert-flags:           Certificate Management.
6271                                                              (line  63)
6272* keyedit:addcardkey:                    OpenPGP Key Management.
6273                                                              (line 281)
6274* keyedit:addkey:                        OpenPGP Key Management.
6275                                                              (line 278)
6276* keyedit:addphoto:                      OpenPGP Key Management.
6277                                                              (line 201)
6278* keyedit:addrevoker:                    OpenPGP Key Management.
6279                                                              (line 350)
6280* keyedit:adduid:                        OpenPGP Key Management.
6281                                                              (line 198)
6282* keyedit:bkuptocard:                    OpenPGP Key Management.
6283                                                              (line 295)
6284* keyedit:change-usage:                  OpenPGP Key Management.
6285                                                              (line 377)
6286* keyedit:check:                         OpenPGP Key Management.
6287                                                              (line 194)
6288* keyedit:clean:                         OpenPGP Key Management.
6289                                                              (line 363)
6290* keyedit:cross-certify:                 OpenPGP Key Management.
6291                                                              (line 386)
6292* keyedit:delkey:                        OpenPGP Key Management.
6293                                                              (line 326)
6294* keyedit:delsig:                        OpenPGP Key Management.
6295                                                              (line 184)
6296* keyedit:deluid:                        OpenPGP Key Management.
6297                                                              (line 211)
6298* keyedit:disable:                       OpenPGP Key Management.
6299                                                              (line 346)
6300* keyedit:enable:                        OpenPGP Key Management.
6301                                                              (line 346)
6302* keyedit:expire:                        OpenPGP Key Management.
6303                                                              (line 335)
6304* keyedit:key:                           OpenPGP Key Management.
6305                                                              (line 148)
6306* keyedit:keyserver:                     OpenPGP Key Management.
6307                                                              (line 228)
6308* keyedit:keytocard:                     OpenPGP Key Management.
6309                                                              (line 284)
6310* keyedit:keytotpm:                      OpenPGP Key Management.
6311                                                              (line 306)
6312* keyedit:lsign:                         OpenPGP Key Management.
6313                                                              (line 159)
6314* keyedit:minimize:                      OpenPGP Key Management.
6315                                                              (line 372)
6316* keyedit:notation:                      OpenPGP Key Management.
6317                                                              (line 235)
6318* keyedit:nrsign:                        OpenPGP Key Management.
6319                                                              (line 164)
6320* keyedit:passwd:                        OpenPGP Key Management.
6321                                                              (line 356)
6322* keyedit:pref:                          OpenPGP Key Management.
6323                                                              (line 243)
6324* keyedit:primary:                       OpenPGP Key Management.
6325                                                              (line 220)
6326* keyedit:quit:                          OpenPGP Key Management.
6327                                                              (line 397)
6328* keyedit:revkey:                        OpenPGP Key Management.
6329                                                              (line 332)
6330* keyedit:revsig:                        OpenPGP Key Management.
6331                                                              (line 189)
6332* keyedit:revuid:                        OpenPGP Key Management.
6333                                                              (line 217)
6334* keyedit:save:                          OpenPGP Key Management.
6335                                                              (line 394)
6336* keyedit:setpref:                       OpenPGP Key Management.
6337                                                              (line 255)
6338* keyedit:showphoto:                     OpenPGP Key Management.
6339                                                              (line 208)
6340* keyedit:showpref:                      OpenPGP Key Management.
6341                                                              (line 247)
6342* keyedit:sign:                          OpenPGP Key Management.
6343                                                              (line 152)
6344* keyedit:toggle:                        OpenPGP Key Management.
6345                                                              (line 359)
6346* keyedit:trust:                         OpenPGP Key Management.
6347                                                              (line 341)
6348* keyedit:tsign:                         OpenPGP Key Management.
6349                                                              (line 168)
6350* keyedit:uid:                           OpenPGP Key Management.
6351                                                              (line 144)
6352* keyid-format:                          GPG Configuration Options.
6353                                                              (line 617)
6354* keyring:                               GPG Configuration Options.
6355                                                              (line 223)
6356* keyring <1>:                           gpgv.                (line  38)
6357* keyserver:                             Dirmngr Options.     (line 148)
6358* keyserver <1>:                         GPG Configuration Options.
6359                                                              (line 626)
6360* keyserver <2>:                         Configuration Options.
6361                                                              (line  44)
6362* keyserver-options:                     GPG Configuration Options.
6363                                                              (line 645)
6364* kill:                                  Invoking gpgconf.    (line  84)
6365* known-notation:                        GPG Esoteric Options.
6366                                                              (line 166)
6367* lang:                                  gpg-card.            (line 129)
6368* launch:                                Invoking gpgconf.    (line  76)
6369* lc-ctype:                              Agent Options.       (line 324)
6370* lc-messages:                           Agent Options.       (line 324)
6371* ldap-proxy:                            Dirmngr Options.     (line 245)
6372* ldapserver:                            Dirmngr Options.     (line 275)
6373* ldapserver <1>:                        Configuration Options.
6374                                                              (line  44)
6375* ldapserverlist-file:                   Dirmngr Options.     (line 256)
6376* ldaptimeout:                           Dirmngr Options.     (line 306)
6377* learn-card:                            Certificate Management.
6378                                                              (line 115)
6379* legacy-list-mode:                      GPG Input and Output.
6380                                                              (line 296)
6381* limit-card-insert-tries:               GPG Configuration Options.
6382                                                              (line 784)
6383* list:                                  gpg-card.            (line 136)
6384* list-archive:                          gpgtar.              (line  39)
6385* list-chain:                            Certificate Management.
6386                                                              (line  32)
6387* list-config:                           GPG Esoteric Options.
6388                                                              (line 619)
6389* list-crls:                             Dirmngr Commands.    (line  40)
6390* list-gcrypt-config:                    GPG Esoteric Options.
6391                                                              (line 627)
6392* list-keys:                             Operational GPG Commands.
6393                                                              (line 119)
6394* list-keys <1>:                         Certificate Management.
6395                                                              (line  17)
6396* list-keys <2>:                         Certificate Management.
6397                                                              (line  28)
6398* list-only:                             GPG Esoteric Options.
6399                                                              (line  11)
6400* list-options:                          GPG Configuration Options.
6401                                                              (line  71)
6402* list-options:show-keyring:             GPG Configuration Options.
6403                                                              (line 119)
6404* list-options:show-keyserver-urls:      GPG Configuration Options.
6405                                                              (line 103)
6406* list-options:show-notations:           GPG Configuration Options.
6407                                                              (line  99)
6408* list-options:show-only-fpr-mbox:       GPG Configuration Options.
6409                                                              (line 134)
6410* list-options:show-photos:              GPG Configuration Options.
6411                                                              (line  79)
6412* list-options:show-policy-urls:         GPG Configuration Options.
6413                                                              (line  93)
6414* list-options:show-sig-expire:          GPG Configuration Options.
6415                                                              (line 123)
6416* list-options:show-sig-subpackets:      GPG Configuration Options.
6417                                                              (line 127)
6418* list-options:show-std-notations:       GPG Configuration Options.
6419                                                              (line  99)
6420* list-options:show-uid-validity:        GPG Configuration Options.
6421                                                              (line 107)
6422* list-options:show-unusable-subkeys:    GPG Configuration Options.
6423                                                              (line 115)
6424* list-options:show-unusable-uids:       GPG Configuration Options.
6425                                                              (line 111)
6426* list-options:show-usage:               GPG Configuration Options.
6427                                                              (line  87)
6428* list-options:show-user-notations:      GPG Configuration Options.
6429                                                              (line  99)
6430* list-options:sort-sigs:                GPG Configuration Options.
6431                                                              (line 138)
6432* list-packets:                          Operational GPG Commands.
6433                                                              (line 203)
6434* list-secret-keys:                      Operational GPG Commands.
6435                                                              (line 130)
6436* list-secret-keys <1>:                  Certificate Management.
6437                                                              (line  24)
6438* list-signatures:                       GPG Esoteric Options.
6439                                                              (line 482)
6440* list-sigs:                             GPG Esoteric Options.
6441                                                              (line 483)
6442* listen-backlog:                        Agent Options.       (line 334)
6443* listen-backlog <1>:                    Dirmngr Options.     (line 134)
6444* listen-backlog <2>:                    Scdaemon Options.    (line 115)
6445* load-crl:                              Dirmngr Commands.    (line  44)
6446* load-crl <1>:                          dirmngr-client.      (line  80)
6447* local-user:                            GPG Key related Options.
6448                                                              (line  77)
6449* local-user <1>:                        Input and Output.    (line  41)
6450* local-user <2>:                        gpgtar.              (line  53)
6451* locate-external-keys:                  Operational GPG Commands.
6452                                                              (line 170)
6453* locate-keys:                           Operational GPG Commands.
6454                                                              (line 170)
6455* lock-multiple:                         GPG Configuration Options.
6456                                                              (line 764)
6457* lock-never:                            GPG Configuration Options.
6458                                                              (line 768)
6459* lock-once:                             GPG Configuration Options.
6460                                                              (line 760)
6461* log-file:                              Agent Options.       (line 134)
6462* log-file <1>:                          Dirmngr Options.     (line  30)
6463* log-file <2>:                          GPG Esoteric Options.
6464                                                              (line 103)
6465* log-file <3>:                          Configuration Options.
6466                                                              (line  83)
6467* log-file <4>:                          Scdaemon Options.    (line 120)
6468* log-file <5>:                          gpgv.                (line  59)
6469* logger-fd:                             GPG Esoteric Options.
6470                                                              (line  99)
6471* logger-fd <1>:                         gpgv.                (line  56)
6472* login:                                 gpg-card.            (line 153)
6473* lookup:                                dirmngr-client.      (line  86)
6474* lsign-key:                             OpenPGP Key Management.
6475                                                              (line 412)
6476* mangle-dos-filenames:                  GPG Configuration Options.
6477                                                              (line 350)
6478* marginals-needed:                      GPG Configuration Options.
6479                                                              (line 705)
6480* max-cache-ttl:                         Agent Options.       (line 196)
6481* max-cache-ttl-ssh:                     Agent Options.       (line 202)
6482* max-cert-depth:                        GPG Configuration Options.
6483                                                              (line 713)
6484* max-output:                            GPG Input and Output.
6485                                                              (line  19)
6486* max-passphrase-days:                   Agent Options.       (line 242)
6487* max-replies:                           Dirmngr Options.     (line 377)
6488* min-cert-level:                        GPG Configuration Options.
6489                                                              (line 395)
6490* min-passphrase-len:                    Agent Options.       (line 212)
6491* min-passphrase-nonalpha:               Agent Options.       (line 217)
6492* multi-server:                          Scdaemon Commands.   (line  26)
6493* multifile:                             Operational GPG Commands.
6494                                                              (line 100)
6495* name:                                  gpg-card.            (line 159)
6496* nameserver:                            Dirmngr Options.     (line 203)
6497* no:                                    GPG Configuration Options.
6498                                                              (line  67)
6499* no-allow-external-cache:               Agent Options.       (line 160)
6500* no-allow-loopback-pinentry:            Agent Options.       (line 152)
6501* no-allow-mark-trusted:                 Agent Options.       (line 142)
6502* no-armor:                              GPG Input and Output.
6503                                                              (line  12)
6504* no-auto-key-import:                    GPG Configuration Options.
6505                                                              (line 571)
6506* no-auto-key-retrieve:                  GPG Configuration Options.
6507                                                              (line 583)
6508* no-auto-trust-new-key:                 GPG Esoteric Options.
6509                                                              (line 577)
6510* no-autostart:                          GPG Configuration Options.
6511                                                              (line 753)
6512* no-autostart <1>:                      Configuration Options.
6513                                                              (line  72)
6514* no-autostart <2>:                      gpg-card.            (line  53)
6515* no-autostart <3>:                      Invoking gpg-connect-agent.
6516                                                              (line  78)
6517* no-batch:                              GPG Configuration Options.
6518                                                              (line  45)
6519* no-common-certs-import:                Esoteric Options.    (line 124)
6520* no-default-keyring:                    GPG Esoteric Options.
6521                                                              (line 460)
6522* no-default-recipient:                  GPG Configuration Options.
6523                                                              (line  29)
6524* no-detach:                             Agent Options.       (line 114)
6525* no-detach <1>:                         Scdaemon Options.    (line 111)
6526* no-encrypt-to:                         GPG Key related Options.
6527                                                              (line  51)
6528* no-expensive-trust-checks:             GPG Esoteric Options.
6529                                                              (line 601)
6530* no-ext-connect:                        Invoking gpg-connect-agent.
6531                                                              (line  73)
6532* no-grab:                               Agent Options.       (line 128)
6533* no-greeting:                           GPG Configuration Options.
6534                                                              (line 798)
6535* no-groups:                             GPG Key related Options.
6536                                                              (line  73)
6537* no-include-key-block:                  OpenPGP Options.     (line  45)
6538* no-keyring:                            GPG Esoteric Options.
6539                                                              (line 470)
6540* no-literal:                            GPG Esoteric Options.
6541                                                              (line 502)
6542* no-mangle-dos-filenames:               GPG Configuration Options.
6543                                                              (line 350)
6544* no-options:                            GPG Configuration Options.
6545                                                              (line 325)
6546* no-random-seed-file:                   GPG Configuration Options.
6547                                                              (line 792)
6548* no-secmem-warning:                     GPG Configuration Options.
6549                                                              (line 801)
6550* no-secmem-warning <1>:                 Configuration Options.
6551                                                              (line  79)
6552* no-sig-cache:                          GPG Configuration Options.
6553                                                              (line 716)
6554* no-skip-hidden-recipients:             GPG Key related Options.
6555                                                              (line 127)
6556* no-symkey-cache:                       GPG Esoteric Options.
6557                                                              (line 365)
6558* no-tty:                                GPG Configuration Options.
6559                                                              (line  58)
6560* no-use-standard-socket:                Agent Options.       (line 314)
6561* no-use-tor:                            Dirmngr Options.     (line  98)
6562* no-verbose:                            GPG Configuration Options.
6563                                                              (line  37)
6564* not-dash-escaped:                      GPG Esoteric Options.
6565                                                              (line 294)
6566* null:                                  gpgtar.              (line  86)
6567* null <1>:                              gpg-check-pattern.   (line  59)
6568* ocsp:                                  dirmngr-client.      (line  61)
6569* ocsp-current-period:                   Dirmngr Options.     (line 372)
6570* ocsp-max-clock-skew:                   Dirmngr Options.     (line 364)
6571* ocsp-max-period:                       Dirmngr Options.     (line 368)
6572* ocsp-responder:                        Dirmngr Options.     (line 338)
6573* ocsp-signer:                           Dirmngr Options.     (line 343)
6574* only-ldap-proxy:                       Dirmngr Options.     (line 251)
6575* openpgp:                               Compliance Options.  (line  20)
6576* openpgp <1>:                           gpgtar.              (line  95)
6577* options:                               Agent Options.       (line  10)
6578* options <1>:                           Dirmngr Options.     (line  11)
6579* options <2>:                           Dirmngr Options.     (line  16)
6580* options <3>:                           GPG Configuration Options.
6581                                                              (line 320)
6582* options <4>:                           Configuration Options.
6583                                                              (line  10)
6584* options <5>:                           Scdaemon Options.    (line   7)
6585* output:                                GPG Input and Output.
6586                                                              (line  16)
6587* output <1>:                            Input and Output.    (line  51)
6588* output <2>:                            gpgv.                (line  45)
6589* output <3>:                            gpgtar.              (line  57)
6590* output <4>:                            gpg-wks-client.      (line  97)
6591* output <5>:                            gpg-wks-server.      (line  65)
6592* override-session-key:                  GPG Esoteric Options.
6593                                                              (line 526)
6594* p12-charset:                           Input and Output.    (line  24)
6595* passphrase:                            GPG Esoteric Options.
6596                                                              (line 340)
6597* passphrase <1>:                        Invoking gpg-preset-passphrase.
6598                                                              (line  36)
6599* passphrase-fd:                         GPG Esoteric Options.
6600                                                              (line 319)
6601* passphrase-fd <1>:                     Esoteric Options.    (line  92)
6602* passphrase-file:                       GPG Esoteric Options.
6603                                                              (line 329)
6604* passphrase-repeat:                     GPG Esoteric Options.
6605                                                              (line 311)
6606* passwd:                                OpenPGP Key Management.
6607                                                              (line 473)
6608* passwd <1>:                            Certificate Management.
6609                                                              (line 121)
6610* passwd <2>:                            gpg-card.            (line 163)
6611* pcsc-driver:                           Scdaemon Options.    (line 130)
6612* pcsc-shared:                           Scdaemon Options.    (line 124)
6613* pem:                                   dirmngr-client.      (line  58)
6614* permission-warning:                    GPG Configuration Options.
6615                                                              (line 804)
6616* personal-aead-preferences:             OpenPGP Options.     (line  66)
6617* personal-cipher-preferences:           OpenPGP Options.     (line  57)
6618* personal-compress-preferences:         OpenPGP Options.     (line  84)
6619* personal-digest-preferences:           OpenPGP Options.     (line  75)
6620* pgp6:                                  Compliance Options.  (line  43)
6621* pgp7:                                  Compliance Options.  (line  46)
6622* pgp8:                                  Compliance Options.  (line  53)
6623* photo-viewer:                          GPG Configuration Options.
6624                                                              (line 196)
6625* pinentry-formatted-passphrase:         Agent Options.       (line 261)
6626* pinentry-invisible-char:               Agent Options.       (line 250)
6627* pinentry-mode:                         GPG Esoteric Options.
6628                                                              (line 350)
6629* pinentry-mode <1>:                     Esoteric Options.    (line 101)
6630* pinentry-program:                      Agent Options.       (line 274)
6631* pinentry-timeout:                      Agent Options.       (line 255)
6632* pinentry-touch-file:                   Agent Options.       (line 287)
6633* ping:                                  dirmngr-client.      (line  69)
6634* policy-file:                           Configuration Options.
6635                                                              (line  52)
6636* prefer-system-dirmngr:                 Configuration Options.
6637                                                              (line  66)
6638* preserve-permissions:                  GPG Esoteric Options.
6639                                                              (line 604)
6640* preset:                                Invoking gpg-preset-passphrase.
6641                                                              (line  22)
6642* primary-keyring:                       GPG Configuration Options.
6643                                                              (line 241)
6644* print-md:                              Operational GPG Commands.
6645                                                              (line 386)
6646* privatedo:                             gpg-card.            (line 171)
6647* q:                                     gpg-card.            (line 177)
6648* q <1>:                                 Invoking gpg-connect-agent.
6649                                                              (line  40)
6650* quick-add-key:                         OpenPGP Key Management.
6651                                                              (line  69)
6652* quick-add-uid:                         OpenPGP Key Management.
6653                                                              (line 440)
6654* quick-gen-key:                         OpenPGP Key Management.
6655                                                              (line  10)
6656* quick-generate-key:                    OpenPGP Key Management.
6657                                                              (line  10)
6658* quick-lsign-key:                       OpenPGP Key Management.
6659                                                              (line 418)
6660* quick-revoke-sig:                      OpenPGP Key Management.
6661                                                              (line 455)
6662* quick-revoke-uid:                      OpenPGP Key Management.
6663                                                              (line 447)
6664* quick-set-expire:                      OpenPGP Key Management.
6665                                                              (line  60)
6666* quick-set-primary-uid:                 OpenPGP Key Management.
6667                                                              (line 465)
6668* quick-sign-key:                        OpenPGP Key Management.
6669                                                              (line 418)
6670* quiet:                                 Agent Options.       (line  45)
6671* quiet <1>:                             GPG Configuration Options.
6672                                                              (line  40)
6673* quiet <2>:                             gpg-card.            (line  44)
6674* quiet <3>:                             gpgv.                (line  35)
6675* quiet <4>:                             Invoking gpgconf.    (line 112)
6676* quiet <5>:                             Invoking gpg-connect-agent.
6677                                                              (line  40)
6678* quiet <6>:                             dirmngr-client.      (line  48)
6679* quiet <7>:                             gpgtar.              (line  65)
6680* quiet <8>:                             gpg-wks-client.      (line 115)
6681* quiet <9>:                             gpg-wks-server.      (line  81)
6682* quit:                                  gpg-card.            (line 177)
6683* raw-socket:                            Invoking gpg-connect-agent.
6684                                                              (line  22)
6685* readcert:                              gpg-card.            (line 180)
6686* reader-port:                           Scdaemon Options.    (line 147)
6687* rebuild-keydb-caches:                  Operational GPG Commands.
6688                                                              (line 380)
6689* receive-keys:                          Operational GPG Commands.
6690                                                              (line 313)
6691* recipient:                             GPG Key related Options.
6692                                                              (line   8)
6693* recipient <1>:                         Input and Output.    (line  46)
6694* recipient <2>:                         gpgtar.              (line  49)
6695* recipient-file:                        GPG Key related Options.
6696                                                              (line  22)
6697* recursive-resolver:                    Dirmngr Options.     (line 117)
6698* recv-keys:                             Operational GPG Commands.
6699                                                              (line 314)
6700* refresh-keys:                          Operational GPG Commands.
6701                                                              (line 317)
6702* reload:                                Invoking gpgconf.    (line  70)
6703* remove-socketdir:                      Invoking gpgconf.    (line  97)
6704* request-origin:                        GPG Esoteric Options.
6705                                                              (line 370)
6706* request-origin <1>:                    Esoteric Options.    (line 116)
6707* require-cross-certification:           GPG Configuration Options.
6708                                                              (line 823)
6709* require-secmem:                        GPG Configuration Options.
6710                                                              (line 818)
6711* reset:                                 gpg-card.            (line 187)
6712* resolver-timeout:                      Dirmngr Options.     (line 120)
6713* rfc2440:                               Compliance Options.  (line  36)
6714* rfc4880:                               Compliance Options.  (line  27)
6715* rfc4880bis:                            Compliance Options.  (line  32)
6716* run:                                   Invoking gpg-connect-agent.
6717                                                              (line 105)
6718* s:                                     Dirmngr Options.     (line  87)
6719* s2k-calibration:                       Agent Options.       (line 427)
6720* s2k-cipher-algo:                       OpenPGP Options.     (line  94)
6721* s2k-count:                             Agent Options.       (line 434)
6722* s2k-count <1>:                         OpenPGP Options.     (line 110)
6723* s2k-digest-algo:                       OpenPGP Options.     (line  99)
6724* s2k-mode:                              OpenPGP Options.     (line 103)
6725* salut:                                 gpg-card.            (line 191)
6726* salutation:                            gpg-card.            (line 191)
6727* scdaemon-program:                      Agent Options.       (line 296)
6728* search-keys:                           Operational GPG Commands.
6729                                                              (line 323)
6730* secret-keyring:                        GPG Configuration Options.
6731                                                              (line 246)
6732* send:                                  gpg-wks-client.      (line  58)
6733* send <1>:                              gpg-wks-server.      (line  60)
6734* send-keys:                             Operational GPG Commands.
6735                                                              (line 257)
6736* sender:                                GPG Key related Options.
6737                                                              (line  81)
6738* server:                                Agent Commands.      (line  23)
6739* server <1>:                            Dirmngr Commands.    (line  22)
6740* server <2>:                            Operational GPGSM Commands.
6741                                                              (line  24)
6742* server <3>:                            Scdaemon Commands.   (line  22)
6743* set-filename:                          GPG Esoteric Options.
6744                                                              (line 193)
6745* set-filename <1>:                      gpgtar.              (line 104)
6746* set-filesize:                          GPG Esoteric Options.
6747                                                              (line 506)
6748* set-notation:                          GPG Esoteric Options.
6749                                                              (line 139)
6750* set-policy-url:                        GPG Esoteric Options.
6751                                                              (line 175)
6752* sh:                                    Agent Options.       (line 121)
6753* sh <1>:                                Dirmngr Options.     (line  87)
6754* show-certs:                            Certificate Management.
6755                                                              (line  52)
6756* show-keyring:                          Deprecated Options.  (line  16)
6757* show-keys:                             Operational GPG Commands.
6758                                                              (line 185)
6759* show-notation:                         Deprecated Options.  (line  25)
6760* show-photos:                           Deprecated Options.  (line   8)
6761* show-policy-url:                       Deprecated Options.  (line  33)
6762* show-session-key:                      GPG Esoteric Options.
6763                                                              (line 510)
6764* shutdown:                              Dirmngr Commands.    (line  58)
6765* sig-keyserver-url:                     GPG Esoteric Options.
6766                                                              (line 185)
6767* sig-notation:                          GPG Esoteric Options.
6768                                                              (line 139)
6769* sig-policy-url:                        GPG Esoteric Options.
6770                                                              (line 175)
6771* sign:                                  Operational GPG Commands.
6772                                                              (line   8)
6773* sign <1>:                              Operational GPGSM Commands.
6774                                                              (line  16)
6775* sign-key:                              OpenPGP Key Management.
6776                                                              (line 408)
6777* skip-crypto:                           gpgtar.              (line  68)
6778* skip-hidden-recipients:                GPG Key related Options.
6779                                                              (line 127)
6780* skip-verify:                           GPG Esoteric Options.
6781                                                              (line 474)
6782* squid-mode:                            dirmngr-client.      (line 101)
6783* ssh-fingerprint-digest:                Agent Options.       (line 412)
6784* standard-resolver:                     Dirmngr Options.     (line 110)
6785* status-fd:                             GPG Esoteric Options.
6786                                                              (line  91)
6787* status-fd <1>:                         gpg-card.            (line  35)
6788* status-fd <2>:                         gpgv.                (line  52)
6789* status-fd <3>:                         Invoking gpgconf.    (line 162)
6790* status-fd <4>:                         gpg-wks-client.      (line 101)
6791* status-file:                           GPG Esoteric Options.
6792                                                              (line  95)
6793* store:                                 Operational GPG Commands.
6794                                                              (line  55)
6795* subst:                                 Invoking gpg-connect-agent.
6796                                                              (line 111)
6797* supervised:                            Agent Commands.      (line  36)
6798* supervised <1>:                        Dirmngr Commands.    (line  33)
6799* symmetric:                             Operational GPG Commands.
6800                                                              (line  42)
6801* tar:                                   gpgtar.              (line 122)
6802* tar-args:                              gpgtar.              (line 116)
6803* textmode:                              OpenPGP Options.     (line   8)
6804* throw-keyids:                          GPG Esoteric Options.
6805                                                              (line 285)
6806* time-only:                             watchgnupg.          (line  46)
6807* tls-debug:                             Dirmngr Options.     (line  69)
6808* tofu-default-policy:                   GPG Configuration Options.
6809                                                              (line 709)
6810* tofu-policy:                           Operational GPG Commands.
6811                                                              (line 416)
6812* trust-model:                           GPG Configuration Options.
6813                                                              (line 410)
6814* trust-model:always:                    GPG Configuration Options.
6815                                                              (line 491)
6816* trust-model:auto:                      GPG Configuration Options.
6817                                                              (line 500)
6818* trust-model:classic:                   GPG Configuration Options.
6819                                                              (line 418)
6820* trust-model:direct:                    GPG Configuration Options.
6821                                                              (line 483)
6822* trust-model:pgp:                       GPG Configuration Options.
6823                                                              (line 413)
6824* trust-model:tofu:                      GPG Configuration Options.
6825                                                              (line 421)
6826* trust-model:tofu+pgp:                  GPG Configuration Options.
6827                                                              (line 471)
6828* trustdb-name:                          GPG Configuration Options.
6829                                                              (line 251)
6830* trusted-key:                           GPG Configuration Options.
6831                                                              (line 401)
6832* try-all-secrets:                       GPG Key related Options.
6833                                                              (line 119)
6834* try-secret-key:                        GPG Key related Options.
6835                                                              (line 108)
6836* ttyname:                               Agent Options.       (line 324)
6837* ttytype:                               Agent Options.       (line 324)
6838* uif:                                   gpg-card.            (line 196)
6839* unblock:                               gpg-card.            (line 202)
6840* ungroup:                               GPG Key related Options.
6841                                                              (line  70)
6842* unwrap:                                Operational GPG Commands.
6843                                                              (line 408)
6844* update-trustdb:                        Operational GPG Commands.
6845                                                              (line 339)
6846* url:                                   gpg-card.            (line 207)
6847* url <1>:                               dirmngr-client.      (line  94)
6848* url <2>:                               dirmngr-client.      (line  98)
6849* use-agent:                             GPG Configuration Options.
6850                                                              (line 733)
6851* use-embedded-filename:                 GPG Esoteric Options.
6852                                                              (line 209)
6853* use-standard-socket:                   Agent Options.       (line 314)
6854* use-standard-socket-p:                 Agent Options.       (line 314)
6855* use-tor:                               Dirmngr Options.     (line  98)
6856* utf8-strings:                          GPG Configuration Options.
6857                                                              (line 306)
6858* utf8-strings <1>:                      gpgtar.              (line  90)
6859* v:                                     Dirmngr Options.     (line  25)
6860* v <1>:                                 Configuration Options.
6861                                                              (line  38)
6862* v <2>:                                 Scdaemon Options.    (line  35)
6863* v <3>:                                 dirmngr-client.      (line  53)
6864* validate:                              dirmngr-client.      (line  76)
6865* validation-model:                      Certificate Options. (line  73)
6866* verbose:                               Agent Options.       (line  39)
6867* verbose <1>:                           Dirmngr Options.     (line  25)
6868* verbose <2>:                           GPG Configuration Options.
6869                                                              (line  33)
6870* verbose <3>:                           Configuration Options.
6871                                                              (line  38)
6872* verbose <4>:                           Scdaemon Options.    (line  35)
6873* verbose <5>:                           gpg-card.            (line  41)
6874* verbose <6>:                           watchgnupg.          (line  49)
6875* verbose <7>:                           gpgv.                (line  30)
6876* verbose <8>:                           Invoking gpg-preset-passphrase.
6877                                                              (line  32)
6878* verbose <9>:                           Invoking gpg-connect-agent.
6879                                                              (line  36)
6880* verbose <10>:                          dirmngr-client.      (line  53)
6881* verbose <11>:                          gpgtar.              (line  61)
6882* verbose <12>:                          gpg-check-pattern.   (line  53)
6883* verbose <13>:                          gpg-wks-client.      (line 112)
6884* verbose <14>:                          gpg-wks-server.      (line  78)
6885* verify:                                Operational GPG Commands.
6886                                                              (line  67)
6887* verify <1>:                            Operational GPGSM Commands.
6888                                                              (line  20)
6889* verify <2>:                            gpg-card.            (line 212)
6890* verify-files:                          Operational GPG Commands.
6891                                                              (line 108)
6892* verify-options:                        GPG Configuration Options.
6893                                                              (line 144)
6894* verify-options:show-keyserver-urls:    GPG Configuration Options.
6895                                                              (line 163)
6896* verify-options:show-notations:         GPG Configuration Options.
6897                                                              (line 159)
6898* verify-options:show-photos:            GPG Configuration Options.
6899                                                              (line 149)
6900* verify-options:show-policy-urls:       GPG Configuration Options.
6901                                                              (line 153)
6902* verify-options:show-primary-uid-only:  GPG Configuration Options.
6903                                                              (line 175)
6904* verify-options:show-std-notations:     GPG Configuration Options.
6905                                                              (line 159)
6906* verify-options:show-uid-validity:      GPG Configuration Options.
6907                                                              (line 167)
6908* verify-options:show-unusable-uids:     GPG Configuration Options.
6909                                                              (line 171)
6910* verify-options:show-user-notations:    GPG Configuration Options.
6911                                                              (line 159)
6912* version:                               Agent Commands.      (line  10)
6913* version <1>:                           Dirmngr Commands.    (line  10)
6914* version <2>:                           General GPG Commands.
6915                                                              (line   7)
6916* version <3>:                           General GPGSM Commands.
6917                                                              (line   7)
6918* version <4>:                           Scdaemon Commands.   (line  10)
6919* version <5>:                           gpg-card.            (line  47)
6920* version <6>:                           watchgnupg.          (line  52)
6921* version <7>:                           dirmngr-client.      (line  40)
6922* version <8>:                           gpgtar.              (line 125)
6923* version <9>:                           gpg-wks-client.      (line 118)
6924* version <10>:                          gpg-wks-server.      (line  84)
6925* warranty:                              General GPG Commands.
6926                                                              (line  17)
6927* warranty <1>:                          General GPGSM Commands.
6928                                                              (line  15)
6929* weak-digest:                           GPG Esoteric Options.
6930                                                              (line 447)
6931* weak-digest <1>:                       gpgv.                (line  90)
6932* with-colons:                           GPG Input and Output.
6933                                                              (line 282)
6934* with-colons <1>:                       gpg-card.            (line  32)
6935* with-colons <2>:                       gpg-wks-client.      (line  62)
6936* with-dir:                              gpg-wks-server.      (line  69)
6937* with-ephemeral-keys:                   Esoteric Options.    (line  33)
6938* with-file:                             gpg-wks-server.      (line  73)
6939* with-fingerprint:                      GPG Input and Output.
6940                                                              (line 302)
6941* with-icao-spelling:                    GPG Input and Output.
6942                                                              (line 313)
6943* with-key-data:                         GPG Esoteric Options.
6944                                                              (line 478)
6945* with-key-data <1>:                     Input and Output.    (line  54)
6946* with-key-origin:                       GPG Input and Output.
6947                                                              (line 321)
6948* with-keygrip:                          GPG Input and Output.
6949                                                              (line 317)
6950* with-secret:                           GPG Input and Output.
6951                                                              (line 332)
6952* with-secret <1>:                       Input and Output.    (line  78)
6953* with-subkey-fingerprint:               GPG Input and Output.
6954                                                              (line 306)
6955* with-validation:                       Input and Output.    (line  60)
6956* with-wkd-hash:                         GPG Input and Output.
6957                                                              (line 327)
6958* writecert:                             gpg-card.            (line 217)
6959* writekey:                              gpg-card.            (line 224)
6960* xauthority:                            Agent Options.       (line 324)
6961* yes:                                   GPG Configuration Options.
6962                                                              (line  63)
6963* yubikey:                               gpg-card.            (line 229)
6964
6965