~ubuntu-branches/ubuntu/raring/gnupg2/raring-proposed

« back to all changes in this revision

Viewing changes to doc/gpg-agent.texi

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-11-06 11:25:58 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20121106112558-kxptsug6ivixhx8m
Tags: 2.0.19-1ubuntu1
* Resynchronize on Debian, remaining changes:
  - Add udev rules to give gpg access to some smartcard readers;
    Debian #543217.
    . debian/gnupg2.dev: udev rules to set ACLs on SCM smartcard readers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
@c This is part of the GnuPG manual.
3
3
@c For copying conditions, see the file gnupg.texi.
4
4
 
5
 
@c Note that we use this texinfo file for all versions of GnuPG: 
 
5
@c Note that we use this texinfo file for all versions of GnuPG:
6
6
@c 2.0 and 2.1.  The macro "gpgtwoone" controls parts which are only
7
7
@c valid for GnuPG 2.1 and later.
8
8
 
26
26
.IR dir ]
27
27
.RB [ \-\-options
28
28
.IR file ]
29
 
.RI [ options ]  
30
 
.br
31
 
.B  gpg-agent
32
 
.RB [ \-\-homedir
33
 
.IR dir ]
34
 
.RB [ \-\-options
35
 
.IR file ]
36
 
.RI [ options ]  
37
 
.B  \-\-server 
38
 
.br
39
 
.B  gpg-agent
40
 
.RB [ \-\-homedir
41
 
.IR dir ]
42
 
.RB [ \-\-options
43
 
.IR file ]
44
 
.RI [ options ]  
45
 
.B  \-\-daemon 
 
29
.RI [ options ]
 
30
.br
 
31
.B  gpg-agent
 
32
.RB [ \-\-homedir
 
33
.IR dir ]
 
34
.RB [ \-\-options
 
35
.IR file ]
 
36
.RI [ options ]
 
37
.B  \-\-server
 
38
.br
 
39
.B  gpg-agent
 
40
.RB [ \-\-homedir
 
41
.IR dir ]
 
42
.RB [ \-\-options
 
43
.IR file ]
 
44
.RI [ options ]
 
45
.B  \-\-daemon
46
46
.RI [ command_line ]
47
47
@end ifset
48
48
 
106
106
It reads the data out of the file and exports the variables.  If you
107
107
don't use Secure Shell, you don't need the last two export statements.
108
108
@end ifclear
109
 
 
 
109
 
110
110
@noindent
111
111
You should always add the following lines to your @code{.bashrc} or
112
112
whatever initialization file is used for all shell invocations:
204
204
 
205
205
@item -v
206
206
@item --verbose
207
 
@opindex v
208
207
@opindex verbose
209
208
Outputs additional information while running.
210
209
You can increase the verbosity by giving several
212
211
 
213
212
@item -q
214
213
@item --quiet
215
 
@opindex q
216
214
@opindex quiet
217
215
Try to be as quiet as possible.
218
216
 
235
233
@item none
236
234
No debugging at all.  A value of less than 1 may be used instead of
237
235
the keyword.
238
 
@item basic  
 
236
@item basic
239
237
Some basic debug messages.  A value between 1 and 2 may be used
240
238
instead of the keyword.
241
239
@item advanced
263
261
@table @code
264
262
@item 0  (1)
265
263
X.509 or OpenPGP protocol related data
266
 
@item 1  (2)  
267
 
values of big number integers 
 
264
@item 1  (2)
 
265
values of big number integers
268
266
@item 2  (4)
269
267
low level crypto operations
270
268
@item 5  (32)
300
298
@itemx --sh
301
299
@itemx -c
302
300
@itemx --csh
303
 
@opindex s
304
301
@opindex sh
305
 
@opindex c
306
302
@opindex csh
307
303
Format the info output in daemon mode for use with the standard Bourne
308
304
shell or the C-shell respectively.  The default is to guess it based on
348
344
@file{trustlist.txt} file.  This is by default not allowed to make it
349
345
harder for users to inadvertently accept Root-CA keys.
350
346
 
 
347
@ifset gpgtwoone
 
348
@anchor{option --allow-loopback-pinentry}
 
349
@item --allow-loopback-pinentry
 
350
@opindex allow-loopback-pinentry
 
351
Allow clients to use the loopback pinentry features; see the option
 
352
@option{pinentry-mode} for details.
 
353
@end ifset
 
354
 
351
355
@item --ignore-cache-for-signing
352
356
@opindex ignore-cache-for-signing
353
357
This option will let @command{gpg-agent} bypass the passphrase cache for all
398
402
Check the passphrase against the pattern given in @var{file}.  When
399
403
entering a new passphrase matching one of these pattern a warning will
400
404
be displayed. @var{file} should be an absolute filename.  The default is
401
 
not to use any pattern file. 
 
405
not to use any pattern file.
402
406
 
403
407
Security note: It is known that checking a passphrase against a list of
404
408
pattern or even against a complete dictionary is not very effective to
408
412
users passphrases to catch the very simple ones.
409
413
 
410
414
@item --max-passphrase-days @var{n}
411
 
@opindex max-passphrase-days 
 
415
@opindex max-passphrase-days
412
416
Ask the user to change the passphrase if @var{n} days have passed since
413
417
the last change.  With @option{--enforce-passphrase-constraints} set the
414
418
user may not bypass this check.
477
481
@itemx --lc-ctype @var{string}
478
482
@itemx --lc-messages @var{string}
479
483
@itemx --xauthority @var{string}
480
 
@opindex display 
481
 
@opindex ttyname 
482
 
@opindex ttytype 
483
 
@opindex lc-ctype 
 
484
@opindex display
 
485
@opindex ttyname
 
486
@opindex ttytype
 
487
@opindex lc-ctype
484
488
@opindex lc-messages
485
489
@opindex xauthority
486
490
These options are used with the server mode to pass localization
563
567
  two dashes may not be entered and the option may not be abbreviated.
564
568
  This file is also read after a @code{SIGHUP} however only a few
565
569
  options will actually have an effect.  This default name may be
566
 
  changed on the command line (@pxref{option --options}).  
 
570
  changed on the command line (@pxref{option --options}).
567
571
  You should backup this file.
568
572
 
569
573
@item trustlist.txt
576
580
  allows to cut and paste the fingerprint from a key listing output.  If
577
581
  the line is prefixed with a @code{!} the key is explicitly marked as
578
582
  not trusted.
579
 
  
 
583
 
580
584
  Here is an example where two keys are marked as ultimately trusted
581
585
  and one as not trusted:
582
 
  
 
586
 
583
587
  @example
584
588
  # CN=Wurzel ZS 3,O=Intevation GmbH,C=DE
585
589
  A6935DD34EF3087973C706FC311AA2CCF733765B S
586
 
  
 
590
 
587
591
  # CN=PCA-1-Verwaltung-02/O=PKI-1-Verwaltung/C=DE
588
 
  DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S 
 
592
  DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S
589
593
 
590
594
  # CN=Root-CA/O=Schlapphuete/L=Pullach/C=DE
591
595
  !14:56:98:D3:FE:9C:CA:5A:31:6E:BC:81:D3:11:4E:00:90:A3:44:C2 S
592
596
  @end example
593
 
  
 
597
 
594
598
Before entering a key into this file, you need to ensure its
595
599
authenticity.  How to do this depends on your organisation; your
596
600
administrator might have already entered those keys which are deemed
625
629
 
626
630
@end table
627
631
 
628
 
  
 
632
 
629
633
@item sshcontrol
630
634
@cindex sshcontrol
631
635
This file is used when support for the secure shell agent protocol has
640
644
optional field for arbitrary flags.  A non-zero TTL overrides the global
641
645
default as set by @option{--default-cache-ttl-ssh}.
642
646
 
 
647
The only flag support is @code{confirm}.  If this flag is found for a
 
648
key, each use of the key will pop up a pinentry to confirm the use of
 
649
that key.  The flag is automatically set if a new key was loaded into
 
650
@code{gpg-agent} using the option @option{-c} of the @code{ssh-add}
 
651
command.
 
652
 
643
653
The keygrip may be prefixed with a @code{!} to disable an entry entry.
644
 
    
 
654
 
645
655
The following example lists exactly one key.  Note that keys available
646
656
through a OpenPGP smartcard in the active smartcard reader are
647
657
implicitly added to this list; i.e. there is no need to list them.
648
 
  
 
658
 
649
659
  @example
650
 
  # Key added on 2005-02-25 15:08:29
651
 
  5A6592BF45DC73BD876874A28FD4639282E29B52 0
 
660
  # Key added on: 2011-07-20 20:38:46
 
661
  # Fingerprint:  5e:8d:c4:ad:e7:af:6e:27:8a:d6:13:e4:79:ad:0b:81
 
662
  34B62F25E277CF13D3C6BCEBFD3F85D08F0A864B 0 confirm
652
663
  @end example
653
664
 
654
665
@item private-keys-v1.d/
675
686
@node Agent Signals
676
687
@section Use of some signals.
677
688
A running @command{gpg-agent} may be controlled by signals, i.e. using
678
 
the @command{kill} command to send a signal to the process. 
 
689
the @command{kill} command to send a signal to the process.
679
690
 
680
691
Here is a list of supported signals:
681
692
 
714
725
 
715
726
@end table
716
727
 
717
 
@c 
 
728
@c
718
729
@c  Examples
719
730
@c
720
731
@mansect examples
757
768
@noindent
758
769
to your shell initialization file (e.g. @file{~/.bashrc}).
759
770
 
760
 
@c 
 
771
@c
761
772
@c  Assuan Protocol
762
773
@c
763
774
@manpause
800
811
* Agent UPDATESTARTUPTTY:: Change the Standard Display
801
812
* Agent GETEVENTCOUNTER:: Get the Event Counters
802
813
* Agent GETINFO::         Return information about the process
 
814
* Agent OPTION::          Set options for the session
803
815
@end menu
804
816
 
805
817
@node Agent PKDECRYPT
831
843
    C: D xxxx)
832
844
    C: END
833
845
@end example
834
 
    
 
846
 
835
847
Please note that the server may send status info lines while reading the
836
848
data lines from the client.  The data send is a SPKI like S-Exp with
837
849
this structure:
838
850
 
839
851
@example
840
 
     (enc-val   
 
852
     (enc-val
841
853
       (<algo>
842
854
         (<param_name1> <mpi>)
843
855
           ...
850
862
if there is an inconsistency.
851
863
 
852
864
If the decryption was successful the decrypted data is returned by
853
 
means of "D" lines. 
 
865
means of "D" lines.
854
866
 
855
867
Here is an example session:
856
868
 
857
869
@example
858
870
   C: PKDECRYPT
859
871
   S: INQUIRE CIPHERTEXT
860
 
   C: D (enc-val elg (a 349324324) 
 
872
   C: D (enc-val elg (a 349324324)
861
873
   C: D    (b 3F444677CA)))
862
874
   C: END
863
875
   S: # session key follows
864
876
   S: D (value 1234567890ABCDEF0)
865
877
   S: OK descryption successful
866
 
@end example         
 
878
@end example
867
879
 
868
880
 
869
881
@node Agent PKSIGN
911
923
passphrase and as a result the server returns the signature as an SPKI
912
924
like S-expression in "D" lines:
913
925
 
914
 
@example  
915
 
     (sig-val   
 
926
@example
 
927
     (sig-val
916
928
       (<algo>
917
929
         (<param_name1> <mpi>)
918
930
           ...
960
972
of the PSE, a special export tool has to be used.
961
973
 
962
974
@example
963
 
   GENKEY 
 
975
   GENKEY
964
976
@end example
965
977
 
966
978
Invokes the key generation process and the server will then inquire
1095
1107
table:
1096
1108
 
1097
1109
@table @code
1098
 
@item @@FPR16@@ 
 
1110
@item @@FPR16@@
1099
1111
Format the fingerprint according to gpg rules for a v3 keys.
1100
 
@item @@FPR20@@ 
 
1112
@item @@FPR20@@
1101
1113
Format the fingerprint according to gpg rules for a v4 keys.
1102
1114
@item @@FPR@@
1103
1115
Choose an appropriate format to format the fingerprint.
1104
 
@item @@@@ 
 
1116
@item @@@@
1105
1117
Replaced by a single @code{@@}
1106
1118
@end table
1107
1119
 
1123
1135
convention either the hexified fingerprint of the key shall be used for
1124
1136
@var{cache_id} or an arbitrary string prefixed with the name of the
1125
1137
calling application and a colon: Like @code{gpg:somestring}.
1126
 
  
 
1138
 
1127
1139
@var{error_message} is either a single @code{X} for no error message or
1128
1140
a string to be shown as an error message like (e.g. "invalid
1129
1141
passphrase").  Blanks must be percent escaped or replaced by @code{+}'.
1147
1159
 
1148
1160
If the option @option{--no-ask} is used and the passphrase is not in the
1149
1161
cache the user will not be asked to enter a passphrase but the error
1150
 
code @code{GPG_ERR_NO_DATA} is returned.  
 
1162
code @code{GPG_ERR_NO_DATA} is returned.
1151
1163
 
1152
1164
If the option @option{--qualitybar} is used and a minimum passphrase
1153
1165
length has been configured, a visual indication of the entered
1279
1291
has not been enabled the error @code{GPG_ERR_NO_DATA} will be returned.
1280
1292
@end table
1281
1293
 
 
1294
@node Agent OPTION
 
1295
@subsection Set options for the session
 
1296
 
 
1297
Here is a list of session options which are not yet described with
 
1298
other commands.  The general syntax for an Assuan option is:
 
1299
 
 
1300
@smallexample
 
1301
OPTION  @var{key}=@var{value}
 
1302
@end smallexample
 
1303
 
 
1304
@noindent
 
1305
Supported @var{key}s are:
 
1306
 
 
1307
@table @code
 
1308
@item agent-awareness
 
1309
This may be used to tell gpg-agent of which gpg-agent version the
 
1310
client is aware of.  gpg-agent uses this information to enable
 
1311
features which might break older clients.
 
1312
 
 
1313
@item putenv
 
1314
Change the session's environment to be used for the
 
1315
Pinentry.  Valid values are:
 
1316
 
 
1317
  @table @code
 
1318
  @item @var{name}
 
1319
  Delete envvar @var{name}
 
1320
  @item @var{name}=
 
1321
  Set envvar @var{name} to the empty string
 
1322
  @item @var{name}=@var{value}
 
1323
  Set envvar @var{name} to the string @var{value}.
 
1324
  @end table
 
1325
 
 
1326
@item use-cache-for-signing
 
1327
See Assuan command @code{PKSIGN}.
 
1328
 
 
1329
@item allow-pinentry-notify
 
1330
This does not need any value.  It is used to enable the
 
1331
PINENTRY_LAUNCHED inquiry.
 
1332
 
 
1333
@ifset gpgtwoone
 
1334
@item pinentry-mode
 
1335
This option is used to change the operation mode of the pinentry.  The
 
1336
following values are defined:
 
1337
 
 
1338
  @table @code
 
1339
  @item ask
 
1340
  This is the default mode which pops up a pinentry as needed.
 
1341
 
 
1342
  @item cancel
 
1343
  Instead of popping up a pinentry, return the error code
 
1344
  @code{GPG_ERR_CANCELED}.
 
1345
 
 
1346
  @item error
 
1347
  Instead of popping up a pinentry, return the error code
 
1348
  @code{GPG_ERR_NO_PIN_ENTRY}.
 
1349
 
 
1350
  @item loopback
 
1351
  Use a loopback pinentry.  This fakes a pinentry by using inquiries
 
1352
  back to the caller to ask for a passphrase.  This option may only be
 
1353
  set if the agent has been configured for that.
 
1354
  Use the @xref{option --allow-loopback-pinentry}.
 
1355
 
 
1356
  @end table
 
1357
@end ifset
 
1358
 
 
1359
@ifset gpgtwoone
 
1360
@item cache-ttl-opt-preset
 
1361
This option sets the cache TTL for new entries created by GENKEY and
 
1362
PASSWD commands when using the @option{--preset} option.  It it is not
 
1363
used a default value is used.
 
1364
@end ifset
 
1365
 
 
1366
@ifset gpgtwoone
 
1367
@item s2k-count
 
1368
Instead of using the standard S2K count (which is computed on the
 
1369
fly), the given S2K count is used for new keys or when changing the
 
1370
passphrase of a key.  Values below 65536 are considered to be 0.  This
 
1371
option is valid for the entire session or until reset to 0.  This
 
1372
option is useful if the key is later used on boxes which are either
 
1373
much slower or faster than the actual box.
 
1374
@end ifset
 
1375
 
 
1376
@end table
 
1377
 
1282
1378
 
1283
1379
@mansect see also
1284
1380
@ifset isman
1285
 
@command{gpg2}(1), 
1286
 
@command{gpgsm}(1), 
 
1381
@command{gpg2}(1),
 
1382
@command{gpgsm}(1),
1287
1383
@command{gpg-connect-agent}(1),
1288
1384
@command{scdaemon}(1)
1289
1385
@end ifset