summaryrefslogtreecommitdiffstats
path: root/agent/ChangeLog
blob: c022852e8919bd18de94df08a02bd7fdfaafc8bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2011-02-03  Werner Koch  <wk@g10code.com>

	* protect.c (protect_info): Support ECC algos.

	* pksign.c (do_encode_dsa): Map public key algo number.  Extend
	DSA size check for ECDSA.

	* gpg-agent.c: Include cipher.h.
	(map_pk_openpgp_to_gcry): New.

	* findkey.c (key_parms_from_sexp): Support ECDH.

	* cvt-openpgp.c (get_keygrip): Support ECC algorithms.
	(convert_secret_key): Ditto.
	(do_unprotect): Ditto.

2011-02-02  Werner Koch  <wk@g10code.com>

	* cvt-openpgp.c (convert_secret_key): Remove algo mapping.

2011-01-31  Werner Koch  <wk@g10code.com>

	* cvt-openpgp.c (convert_to_openpgp): Adjust to reverted Libgcrypt
	ABI.

	* protect.c (protect_info): Adjust ECDSA and ECDH parameter names.
	Add "ecc".
	* findkey.c (key_parms_from_sexp): Ditto.

2011-01-19  Werner Koch  <wk@g10code.com>

	* trustlist.c (read_one_trustfile): Also chop an CR.

2011-01-21  Werner Koch  <wk@g10code.com>

	* pksign.c (do_encode_dsa): Compare MDLEN to bytes.

	* cvt-openpgp.c (GCRY_PK_ECDH) [!HAVE_GCRY_PK_ECDH]: New.

2010-12-02  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (CHECK_OWN_SOCKET_INTERVAL) [W32CE]: Set to 60
	seconds.

2010-11-29  Werner Koch  <wk@g10code.com>

	* cache.c (initialize_module_cache): Factor code out to ...
	(init_encryption): new.
	(new_data, agent_get_cache): Init encryption on on the fly.

2010-11-26  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (CHECK_OWN_SOCKET_INTERVAL): New.
	(handle_tick) [W32CE]: Don't check own socket.

2010-11-23  Werner Koch  <wk@g10code.com>

	* Makefile.am (gpg_agent_LDFLAGS): Add extra_bin_ldflags.

2010-11-11  Werner Koch  <wk@g10code.com>

	* agent.h (opt): Add field SIGUSR2_ENABLED.
	* gpg-agent.c (handle_connections): Set that flag.
	* call-scd.c (start_scd): Enable events depending on this flag.

2010-10-27  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (create_socket_name): Use TMPDIR.  Change callers.

2010-10-26  Werner Koch  <wk@g10code.com>

	* cache.c (agent_put_cache): Allow deletion even if TTL is passwd
	as 0.

	* genkey.c (agent_protect_and_store): Add arg PASSPHRASE_ADDR.
	* command.c (cmd_passwd): Add option --passwd-nonce.
	(struct server_local_s): Add LAST_CACHE_NONCE and LAST_PASSWD_NONCE.
	(clear_nonce_cache): New.
	(reset_notify): Clear the nonce cache.
	(start_command_handler): Ditto.

2010-10-25  Werner Koch  <wk@g10code.com>

	* command.c (cmd_export_key): Free CACHE_NONCE.
	(cmd_passwd): Add option --cache-nonce.

2010-10-18  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (start_pinentry): Print name of pinentry on
	connect error.

	* call-scd.c (agent_card_pksign): Make sure to return an unsigned
	number.

2010-10-14  Werner Koch  <wk@g10code.com>

	* command.c (cmd_genkey): Add option --no-protection.
	* genkey.c (agent_genkey): Add arg NO_PROTECTION.

2010-10-13  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_get_passphrase): Support the close_button.

	* gpg-agent.c (create_server_socket): Switch back to stderr
	logging if we are not starting a agent.

	* command.c (cmd_passwd, cmd_export_key): Move mapping of
	GPG_ERR_FULLY_CANCELED to ..
	(leave_cmd): .. here.
	(option_handler): Add option agent-awareness.
	* protect-tool.c (get_passphrase): Take care of
	GPG_ERR_FULLY_CANCELED.
	* findkey.c (try_unprotect_cb): Ditto.
	(unprotect): Remove the fully_canceled hack.
	* call-pinentry.c (start_pinentry): Ditto.
	(agent_askpin): Ditto.
	* pkdecrypt.c (agent_pkdecrypt): Ditto
	* pksign.c (agent_pksign_do): Ditto.
	* genkey.c (agent_ask_new_passphrase): Remove arg CANCEL_ALL.

2010-10-06  Werner Koch  <wk@g10code.com>

	* cvt-openpgp.c (convert_secret_key): Add missing break.

2010-10-05  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Don't set SSH_AGENT_PID so that ssh-agent -k
	won't kill out gpg-agent.

2010-09-30  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (agent_exit): Run cleanup.
	(cleanup): Run only once.

	* call-pinentry.c (close_button_status_cb): New.
	(agent_askpin): Add arg R_CANCEL_ALL.  Change all callers.
	* genkey.c (agent_ask_new_passphrase): Ditto.
	* findkey.c (unprotect): Return GPG_ERR_FULLY_CANCELED if needed.

	* command.c (cmd_export_key): Add support for OpenPGP keys.
	* findkey.c (unprotect): Add optional arg R_PASSPHRASE.
	(agent_key_from_file): Ditto.  Change all callers.

	* findkey.c (unprotect): Do not put the passphrase into the cache
	if it has been changed.

	* cvt-openpgp.c (convert_to_openpgp, apply_protection)
	(key_from_sexp): New.

2010-09-29  Werner Koch  <wk@g10code.com>

	* cvt-openpgp.c (convert_openpgp): Rename to convert_from_openpgp.

	* command.c (has_option): Stop at "--".
	(has_option_name, option_value): Ditto.
	(skip_options): Skip initial spaces.

2010-09-24  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main, reread_configuration): Always test whether
	the default configuration file has been created in the meantime.
	Fixes bug#1285.

2010-09-17  Werner Koch  <wk@g10code.com>

	* command.c (cmd_havekey): Allow testing of several keygrips.

2010-09-15  Werner Koch  <wk@g10code.com>

	* protect.c (calculate_mic): Take care of shared secret format.

	* agent.h (PROTECTED_SHARED_SECRET): New.

2010-09-02  Werner Koch  <wk@g10code.com>

	* cache.c (new_data): Change arg and callers to use a string and
	explicity return an error code.  We never used raw binary data and
	thus it is easier to use a string.  Adjust callers.
	(initialize_module_cache, deinitialize_module_cache): New.
	(new_data): Encrypt the cached data.
	(struct cache_item_s): Remove field LOCKCOUNT.  Change all users
	accordingly.
	(agent_unlock_cache_entry): Remove.
	(agent_get_cache): Return an allocated string and remove CACHE_ID.
	* genkey.c (agent_genkey): Remove cache marker stuff.
	* findkey.c (unprotect): Ditto.
	* cvt-openpgp.c (convert_openpgp): Ditto.
	* command.c (cmd_get_passphrase): Ditto.
	* gpg-agent.c (main, cleanup): Initialize and deinitialize the
	cache module.

2010-09-01  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (start_pinentry): Disable pinentry logging.

	* command.c (cmd_import_key, cmd_genkey, cmd_pksign): Add CACHE
	handling.
	* cvt-openpgp.c (convert_openpgp): Add arg CACHE_NONCE and try the
	cached nonce first.
	* genkey.c (agent_genkey): Add arg CACHE_NONCE.
	* cache.c (agent_get_cache): Require user and nonce cache modes
	to match the requested mode.
	(agent_put_cache): Ditto.
	* agent.h (CACHE_MODE_NONCE): New.
	* pksign.c (agent_pksign_do, agent_pksign): Add arg CACHE_NONCE.
	* findkey.c (agent_key_from_file): Ditto.
	(unprotect): Implement it.

2010-08-31  Werner Koch  <wk@g10code.com>

	* pksign.c (do_encode_dsa): Fix sign problem.
	* findkey.c (agent_is_dsa_key): Adjust to actual usage.

2010-08-30  Werner Koch  <wk@g10code.com>

	* protect.c (s2k_hash_passphrase): New public function.

2010-08-27  Werner Koch  <wk@g10code.com>

	* command.c (cmd_import_key): Support OpenPGP keys.
	* cvt-openpgp.h, cvt-openpgp.c: New.  Some of the code is based on
	code taken from g10/seckey-cert.c.

2010-08-26  Werner Koch  <wk@g10code.com>

	* command-ssh.c (open_control_file): Use estream to create the file.

	* findkey.c (agent_write_private_key): Explicitly create file with
	mode 600.
	* gpg-agent.c (main): Ditto.
	* trustlist.c (agent_marktrusted): Explicitly create file with
	mode 640.

2010-08-16  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: Replace remaining printf by es_printf.

2010-08-11  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_get_passphrase, agent_askpin): Fix
	setting of confidential flag.

	* call-scd.c (agent_card_scd): Pass assuan comment lines to the
	caller.
	(ASSUAN_CONVEY_COMMENTS): Provide replacement if needed.

2010-08-09  Werner Koch  <wk@g10code.com>

	* Makefile.am (t_common_ldadd): Add NETLIBS for sake of the TCP
	logging.

2010-06-24  Werner Koch  <wk@g10code.com>

	* genkey.c (check_passphrase_pattern): Use HANG option for
	gnupg_wait_progress.  Fixes regression from 2010-06-09.

2010-06-21  Werner Koch  <wk@g10code.com>

	* protect-tool.c (export_p12_file, import_p12_cert_cb)
	(import_p12_file, sexp_to_kparms, store_private_key): Remove
	unused code.

2010-06-18  Werner Koch  <wk@g10code.com>

	* protect-tool.c (store_private_key, rsa_key_check): Remove.

	* command.c (cmd_export_key): New.

2010-06-15  Werner Koch  <wk@g10code.com>

	* command.c (cmd_keywrap_key, cmd_import_key): New.

	* genkey.c (agent_genkey, agent_protect_and_store): Factor common
	code out to...
	(agent_ask_new_passphrase): .. new.

	* findkey.c (agent_write_private_key): Return GPG_ERR_EEXIST
	instead of GPG_ERR_GENERAL.

2010-06-14  Werner Koch  <wk@g10code.com>

	* protect-tool.c: Remove commands --p12-import and --p12-export.
	* minip12.c, minip12.h: Move to ../sm.
	* Makefile.am (gpg_protect_tool_SOURCES): Remove them.
	* preset-passphrase.c: Remove unneeded minip12.h.

	* command.c (cmd_keywrap_key): New.

	* command.c (leave_cmd): New.
	(cmd_istrusted, cmd_listtrusted, cmd_marktrusted, cmd_pksign)
	(cmd_pkdecrypt, cmd_genkey, cmd_readkey, cmd_keyinfo)
	(cmd_get_passphrase, cmd_get_confirmation, cmd_learn)
	(cmd_passwd, cmd_preset_passphrase, cmd_getval, cmd_putval): Use it.

2010-05-12  Werner Koch  <wk@g10code.com>

	* preset-passphrase.c (forget_passphrase): Actually implement
	this.  Fixes bug#1198.

2010-05-11  Werner Koch  <wk@g10code.com>

	* agent.h (opt): Add field USE_STANDARD_SOCKET.
	* gpg-agent.c (use_standard_socket): Remove.  Use new option instead.

	* command.c (cmd_killagent, cmd_reloadagent): Provide command also
	for non-W32 platforms.
	(cmd_getinfo): New subcommands std_session_env and std_startup_env.

2010-05-03  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (check_own_socket_thread): Do not release SOCKNAME
	too early.

2010-04-30  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Add command --use-standard-socket-p.

2010-04-26  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (create_server_socket) [W32]: Also check for EEXIST.

2010-04-19  Werner Koch  <wk@g10code.com>

	* pksign.c (get_dsa_qbits, do_encode_dsa): New.
	(agent_pksign_do): Detect DSA keys and use do_encode_dsa.
	* findkey.c (agent_public_key_from_file): Factor some code out to ..
	(key_parms_from_sexp): New.
	(agent_is_dsa_key): New.

	* command.c (cmd_sethash): Clear digeest.RAW_VALUE.

2010-04-14  Werner Koch  <wk@g10code.com>

	* Makefile.am (libexec_PROGRAMS) [W32CE]: Do not build
	gpg-preset-passphrase for now.
	(pwquery_libs) [W32CE]: Set to empty.

	* trustlist.c (read_one_trustfile): Use estream.

2010-04-13  Werner Koch  <wk@g10code.com>

	* findkey.c (read_key_file): Use estream.
	(agent_write_private_key): Ditto.

2010-04-07  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (handle_connections) [W32]: Assume that PTh support
	the handle event.  Use a dummy event for W32CE.
	(get_agent_scd_notify_event) [W32CE]: Do not build.

	* call-pinentry.c: Remove setenv.h.  Include sysutils.h.
	(atfork_cb): s/setenv/gnupg_setenv/.

	* gpg-agent.c: Do not include setenv.h.
	(main): s/unsetenv/gnupg_unsetenv/.

	* protect.c (calibrate_get_time) [W32CE]: Use GetThreadTimes.

2010-04-06  Werner Koch  <wk@g10code.com>

	* call-scd.c [!HAVE_SIGNAL_H]: Do not include signal.h.

	* findkey.c (agent_write_private_key): s/remove/gnupg_remove/.

	* command-ssh.c (search_control_file): Replace rewind by fseek and
	clearerr.
	* genkey.c (check_passphrase_pattern): Ditto.

	* gpg-agent.c [!HAVE_SIGNAL_H]: Do not include signal.h.
	(remove_socket): s/remove/gnupg_remove/.
	(create_private_keys_directory): Use gnupg_mkdir.

2010-03-11  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: Include "asshelp.h".
	(main): Remove assuan_set_assuan_log_prefix.  Add
	assuan_set_log_cb.
	(handle_signal): Disable pth ctrl dumping.
	(parse_rereadable_options, main): Remove assuan_set_assuan_log_stream.
	* call-scd.c (start_scd): Remove assuan_set_log_stream.

2010-03-10  Werner Koch  <wk@g10code.com>

	* Makefile.am (common_libs): Remove libjnlib.a.

	* trustlist.c, protect-tool.c, command-ssh.c: Remove estream.h.

2010-02-17  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (start_pinentry): Always free OPTSTR.  Send
	default-xxx strings.

2010-01-26  Werner Koch  <wk@g10code.com>

	* protect.c (do_encryption): Encode the s2kcount and no not use a
	static value of 96.

2009-12-21  Werner Koch  <wk@g10code.com>

	* command.c (cmd_getinfo): Add sub-command s2k_count.

2009-12-14  Werner Koch  <wk@g10code.com>

	* protect.c (agent_unprotect): Decode the S2K count here and take
	care of the new unencoded values.  Add a lower limit sanity check.
	(hash_passphrase): Do not decode here.
	(get_standard_s2k_count, calibrate_s2k_count): New.
	(calibrate_get_time, calibrate_elapsed_time): New.
	(do_encryption): Use get_standard_s2k_count.

2009-12-08  Werner Koch  <wk@g10code.com>

	* protect.c (agent_unprotect): Avoid compiler warning.

2009-12-08  Marcus Brinkmann  <marcus@g10code.de>

	* call-pinentry.c (start_pinentry): Convert posix fd to assuan fd.
	* call-scd.c (start_scd): Likewise.

2009-12-03  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (set_debug): Allow for numerical debug leveles.  Print
	active debug flags.

2009-12-02  Werner Koch  <wk@g10code.com>

	* trustlist.c (read_trustfiles): Store the pointer returned from
	shrinking the memory and not the orginal one.  Fixes bug#1163.
	Reported by TAKAHASHI Tamotsu.  Also return correct error after
	memory failure.

2009-11-27  Marcus Brinkmann  <marcus@g10code.de>

	* command.c (start_command_handler): Do not call
	assuan_set_log_stream anymore.
	* gpg-agent.c (main): But call assuan_set_assuan_log_stream here.

2009-11-25  Marcus Brinkmann  <marcus@g10code.de>

	* command.c (start_command_handler): Use assuan_fd_t and
	assuan_fdopen on fds.

2009-11-05  Marcus Brinkmann  <marcus@g10code.de>

	* call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not
	assuan_pipe_connect_ext.
	* command.c (start_command_handler): Change
	assuan_init_socket_server_ext into assuan_init_socket_server.
	* call-scd.c (start_scd): Update use of assuan_socket_connect and
	assuan_pipe_connect.
	* gpg-agent.c (check_own_socket_thread, check_for_running_agent):
	Update use of assuan_socket_connect.

2009-11-04  Werner Koch  <wk@g10code.com>

	* command.c (register_commands): Add help arg to
	assuan_register_command.  Convert all command comments to help
	strings.

2009-11-02  Marcus Brinkmann  <marcus@g10code.de>

	* command.c (reset_notify): Take LINE arg and return error.
	(register_commands): Use assuan_handler_t type.

2009-10-16  Marcus Brinkmann  <marcus@g10code.com>

	* gpg_agent_CFLAGS, gpg_agent_LDADD: Use libassuan instead of
	libassuan-pth.
	* gpg-agent.c: Invoke ASSUAN_SYSTEM_PTH_IMPL.
	(main): Call assuan_set_system_hooks and assuan_sock_init.
	Fix invocation of assuan_socket_connect.

2009-09-23  Werner Koch  <wk@g10code.com>

	* command.c (register_commands) [HAVE_ASSUAN_SET_IO_MONITOR]:
	Remove cpp condition.
	(start_command_handler) [HAVE_ASSUAN_SET_IO_MONITOR]: Ditto.

2009-09-23  Marcus Brinkmann  <marcus@g10code.de>

	* gpg-agent.c (parse_rereadable_options): Don't set global assuan
	log file (there ain't one anymore).
	(main): Update to new API.
	(check_own_socket_pid_cb): Return gpg_error_t instead of int.
	(check_own_socket_thread, check_for_running_agent): Create assuan
	context before connecting to server.
	* command.c: Include "scdaemon.h" before <assuan.h> because of
	GPG_ERR_SOURCE_DEFAULT check.
	(write_and_clear_outbuf): Use gpg_error_t instead of
	assuan_error_t.
	(cmd_geteventcounter, cmd_istrusted, cmd_listtrusted)
	(cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc)
	(cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey)
	(cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase)
	(cmd_get_confirmation, cmd_learn, cmd_passwd)
	(cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval)
	(cmd_updatestartuptty, cmd_killagent, cmd_reloadagent)
	(cmd_getinfo, option_handler): Return gpg_error_t instead of int.
	(post_cmd_notify): Change type of ERR to gpg_error_t from int.
	(io_monitor): Add hook argument.  Use symbols for constants.
	(register_commands): Change return type of HANDLER to gpg_error_t.
	(start_command_handler): Allocate assuan context before starting
	server.
	* call-pinentry.c: Include "scdaemon.h" before <assuan.h> because
	of GPG_ERR_SOURCE_DEFAULT check.
	(unlock_pinentry): Call assuan_release instead of
	assuan_disconnect.
	(getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int.
	(start_pinentry): Allocate assuan context before connecting to
	server.
	* call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb)
	(membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru)
	(pass_data_thru): Change return type to gpg_error_t.
	(start_scd): Allocate assuan context before connecting to server.

2009-09-04  Marcus Brinkmann  <marcus@g10code.com>

	* command.c (start_command_handler): Add comment about gap in
	implementation (in dead code), for future reference.

2009-08-11  Werner Koch  <wk@g10code.com>

	* divert-scd.c (ask_for_card): I18n a prompt string.

2009-07-06  Werner Koch  <wk@g10code.com>

	* agent.h: Include session-env.h.
	(opt): Replace most of the startup_xxx fields by a session_env_t.
	(struct server_control_s): Likewise.
	* gpg-agent.c (main): Rewrite setting of the startup fields.
	(handle_connections, main): Allocate SESSION_ENV.
	(agent_init_default_ctrl, agent_deinit_default_ctrl): Change
	accordingly.
	* command.c (option_handler): Ditto.
	(cmd_updatestartuptty): Change accordingly.  Protect old values
	from out of core failures.
	* command-ssh.c (start_command_handler_ssh): Ditto.
	(start_command_handler_ssh): Replace strdup by xtrystrdup.
	* call-pinentry.c (atfork_cb): Pass new envrinmnet variables.
	(start_pinentry): Use session_env stuff.
	* protect-tool.c (main): Adjust call to gnupg_prepare_get_passphrase.

2009-06-24  Werner Koch  <wk@g10code.com>

	* genkey.c (agent_protect_and_store): Return RC and not 0.
	* protect.c (do_encryption): Fix ignored error code from malloc.
	Reported by Fabian Keil.

2009-06-17  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_get_confirmation): Add arg WITH_CANCEL.
	Change all callers.
	* trustlist.c (agent_marktrusted): Use WITH_CANCEL

2009-06-09  Werner Koch  <wk@g10code.com>

	* learncard.c (send_cert_back): Ignore certain error codes.

2009-06-05  Werner Koch  <wk@g10code.com>

	* protect-tool.c (store_private_key): Fix last change by appending
	a ".key".

2009-06-03  Werner Koch  <wk@g10code.com>

	* protect-tool.c: Include estream.h.
	(store_private_key): Replace stdio streams by estream functions
	for a portable use of the "x" mode.
	* trustlist.c: Include estream.h.
	(agent_marktrusted): Replace stdio stream by estream functions.

	* protect-tool.c (store_private_key): Use bin2hex.

2009-06-02  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Run pth_kill after fork.  Fixes bug#1066.

2009-05-19  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (JNLIB_NEED_AFLOCAL): Define.
	(create_server_socket): Use SUN_LEN macro.

2009-05-15  Werner Koch  <wk@g10code.com>

	Fix bug #1053.

	* agent.h (lookup_ttl_t): New.
	* findkey.c (unprotect): Add arg LOOKUP_TTL.
	(agent_key_from_file): Ditto.
	* pksign.c (agent_pksign_do): Ditto.
	* command-ssh.c (ttl_from_sshcontrol): New.
	(data_sign): Pass new function to agent_pksign_do.
	(search_control_file): Add new arg R_TTL.

2009-05-14  Werner Koch  <wk@g10code.com>

	* command.c (cmd_get_passphrase): Add option --qualitybar.
	* call-pinentry.c (agent_askpin): Factor some code out to ...
	(setup_qualitybar): .. new.
	(agent_get_passphrase): Add arg WITH_QUALITYBAR and implement it.

2009-04-14  Marcus Brinkmann  <marcus@g10code.de>

	* call-pinentry.c (agent_get_confirmation): Try SETNOTOK command
	with pinentry.

2009-04-01  Werner Koch  <wk@g10code.com>

	* protect-tool.c (pe_opt): New.
	(opts): Add option --agent-program.  Use ARGPARSE macros.
	(get_new_passphrase): Remove.
	(get_passphrase): Use gpg-agent directly. Remove arg OPT_CHECK and
	change all callers.
	* Makefile.am (gpg_protect_tool_LDADD): Replace pwquery_libs by
	LIBASSUAN_LIBS.
	(gpg_protect_tool_CFLAGS): New.

	* command.c (percent_plus_unescape): Remove.
	(cmd_putval): Use percent_plus_unescape_inplace.
	* call-scd.c (unescape_status_string): Remove.
	(card_getattr_cb): Use percent_plus_unescape.
	* protect-tool.c (main): Use percent_plus_unescape from common/.
	(percent_plus_unescape, percent_plus_unescape_string): Remove.

2009-03-27  Werner Koch  <wk@g10code.com>

	* learncard.c (agent_handle_learn): Add new certtype 111.

2009-03-26  Werner Koch  <wk@g10code.com>

	* agent.h (MAX_DIGEST_LEN): Change to 64.
	* command.c (cmd_sethash): Allow digest length of 48 and 64.
	(cmd_sethash): Allow more hash algos.

	* trustlist.c (reformat_name): New.
	(agent_marktrusted): Use a reformatted name.  Reload the table
	before the update and always reload it at the end.
	(agent_istrusted): Check early for the disabled flag.

2009-03-25  Werner Koch  <wk@g10code.com>

	* pkdecrypt.c (agent_pkdecrypt): Return a specific error message
	if the key is not available.

	* gpg-agent.c (main): Print a started message to show the real pid.

2009-03-20  Werner Koch  <wk@g10code.com>

	* learncard.c (struct kpinfo_cp_parm_s): Add field CTRL.
	(struct certinfo_cb_parm_s): Ditto.
	(agent_handle_learn): Set CTRL field.
	(kpinfo_cb, certinfo_cb): Send progress status.

	* agent.h (agent_write_status): Flag with GNUPG_GCC_A_SENTINEL.

2009-03-19  Werner Koch  <wk@g10code.com>

	* trustlist.c (struct trustitem_s): Add field DISABLED.
	(read_one_trustfile): Parse the '!' flag.
	(agent_istrusted, agent_listtrusted): Check flag.
	(agent_istrusted): Add arg R_DISABLED.  Change all callers.
	(agent_marktrusted): Do not ask if flagged as disabled.  Reverse
	the order of the questions.  Store the disabled flag.

	* gpg-agent.c (main): Save signal mask and open fds.  Restore mask
	and close all fds prior to the exec.  Fixes bug#1013.

2009-03-17  Werner Koch  <wk@g10code.com>

	* command.c (cmd_get_passphrase): Break repeat loop on error.
	Show error message.
	(cmd_getinfo): Add subcommand "cmd_has_option".
	(command_has_option): New.

2009-03-17  Daiki Ueno  <ueno@unixuser.org>

	* command.c (option_value): New function.
	(cmd_get_passphrase): Accept new option --repeat, which makes
	gpg-agent to ask passphrase several times.

2009-03-06  Werner Koch  <wk@g10code.com>

	* command.c (cmd_keyinfo): New command.
	(register_commands): Register it.
	(agent_write_status): Make sure not to print LR or CR.
	* divert-scd.c (ask_for_card): Factor shadow info parsing out to ...
	* protect.c (parse_shadow_info): New.
	* findkey.c (agent_key_from_file): Use make_canon_sexp.
	(agent_write_private_key, unprotect, read_key_file)
	(agent_key_available): Use bin2hex.
	(agent_key_info_from_file): New.
	(read_key_file): Log no error message for ENOENT.

2009-03-05  Werner Koch  <wk@g10code.com>

	* divert-scd.c (getpin_cb): Support flag 'P'.  Change max_digits
	from 8 to 16.  Append a message about keypads.
	* findkey.c (unprotect): Change max digits to 16.

2009-03-02  Werner Koch  <wk@g10code.com>

	* command.c (cmd_getinfo): Add subcommand "scd_running".

	* call-scd.c (agent_scd_check_running): New.

	* gpg-agent.c: Add missing option strings for "--batch" and
	"--homedir".  Reported by Petr Uzel.

	* protect-tool.c (import_p12_file): Take care of canceled
	passphrase entry.  Fixes bug#1003.
	(export_p12_file): Ditto.

2008-12-17  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (handle_connections): Set action of all pth event
	handled signals to SIG_IGN.  Use a different pth_sigmask strategy.

2008-12-10  Werner Koch  <wk@g10code.com>

	* command.c (cmd_get_passphrase): Implement option --no-ask.

2008-12-09  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Call i18n_init before init_common_subsystems.
	* preset-passphrase.c (main): Ditto.
	* protect-tool.c (main): Ditto.

	* command.c (cmd_preset_passphrase): Allow an arbitrary string for
	the cache id.

2008-12-08  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (handle_connections): Sync the ticker to the next
	full second.  This is bug#871.

2008-12-05  Werner Koch  <wk@g10code.com>

	* minip12.c (decrypt_block): Fix const modified of CHARSETS.
	* learncard.c (sinfo_cb_parm_s): Remove superflous semicolon.
	Reported by Stoyan Angelov.

2008-11-18  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (make_libversion): New.
	(my_strusage): Print libgcrypt version

2008-11-11  Werner Koch  <wk@g10code.com>

	* call-scd.c (membuf_data_cb): Change return type to
	assuan_error_t to avoid warnings with newer libassuan versions.

2008-11-04  Werner Koch  <wk@g10code.com>

	* command.c (cmd_killagent): Stop the agent immediately.
	(start_command_handler): Take care of GPG_ERR_EOF.

2008-10-29  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.
	(create_socket_name): Remove arg USE_STANDARD_SOCKET.  Change all
	callers.
	(create_server_socket): Remove IS_STANDARD_NAME and replace it by
	USE_STANDARD_SOCKET.  Change all callers.
	(check_own_socket_running): New.
	(check_own_socket, check_own_socket_thread): New.
	(handle_tick): Check server socket once a minute.
	(handle_connections): Remove the extra pth_wait in the shutdown
	case.

2008-10-20  Werner Koch  <wk@g10code.com>

	* command.c (cmd_geteventcounter): Mark unused arg.
	(cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
	(cmd_updatestartuptty, post_cmd_notify): Ditto.
	* command-ssh.c (add_control_entry)
	(ssh_handler_request_identities, ssh_handler_remove_identity)
	(ssh_handler_remove_all_identities, ssh_handler_lock)
	(ssh_handler_unlock): Ditto.
	* call-pinentry.c (pinentry_active_p, popup_message_thread)
	(agent_popup_message_stop): Ditto.
	* findkey.c (agent_public_key_from_file): Ditto.
	* genkey.c (check_passphrase_pattern): Ditto.
	* call-scd.c (atfork_cb): Ditto.
	* protect-tool.c (import_p12_cert_cb): Ditto.
	* t-protect.c (main): Ditto.

2008-10-17  Werner Koch  <wk@g10code.com>

	* call-scd.c (start_scd) [W32]: Use snprintf again because we now
	always use the estream variant.

2008-10-15  Werner Koch  <wk@g10code.com>

	* call-scd.c (start_scd): Enable assuan loggging if requested.
	(agent_scd_check_aliveness) [W32]: Fix use of GetExitCodeProcess.

2008-10-14  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (get_agent_scd_notify_event): Need to use a manual
	reset event.

2008-09-29  Werner Koch  <wk@g10code.com>

	* agent.h (GCRY_MD_USER): Rename to GCRY_MODULE_ID_USER.
	(GCRY_MD_USER_TLS_MD5SHA1): Rename to MD_USER_TLS_MD5SHA1 and
	change all users.

2008-09-25  Werner Koch  <wk@g10code.com>

	* divert-scd.c (getpin_cb): Support a Reset Code style PINs..

2008-09-03  Werner Koch  <wk@g10code.com>

	* command.c (parse_keygrip): Use hex2bin.
	(cmd_preset_passphrase): Decode the passphrase.  Reported by Kiss
	Gabor.  Fixes #679 again.
	* preset-passphrase.c (make_hexstring): Remove.
	(preset_passphrase): Use bin2hex.

2008-05-27  Werner Koch  <wk@g10code.com>

	* trustlist.c (insert_colons): Fix stupidly wrong allocation size
	computation.

2008-05-26  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Re-initialize default assuan log stream if a
	log file is used.

	* trustlist.c (agent_marktrusted): Use xtryasprintf and xfree.

	* gpg-agent.c (main, agent_deinit_default_ctrl): Always use xfree
	because our asprintf is mapped to an xmalloc style function in
	util.h. Replace xstrdup by xtrystrdup.
	* w32main.c (build_argv): Ditto.
	* preset-passphrase.c (preset_passphrase): Ditto.
	* divert-scd.c (ask_for_card): Ditto.
	* command.c (option_handler): Ditto.
	* command-ssh.c (ssh_handler_request_identities): Ditto.
	* call-pinentry.c (start_pinentry): Ditto.

	* gpg-agent.c (start_connection_thread)
	(start_connection_thread_ssh): Use pth_thread_id for useful output
	under W32.
	(pth_thread_id) [!PTH_HAVE_PTH_THREAD_ID]: New.

2008-03-17  Werner Koch  <wk@g10code.com>

	* agent.h (agent_inq_pinentry_launched): New prototype.

	* call-pinentry.c: Include sys/types.h and signal.h.

2008-02-14  Werner Koch  <wk@g10code.com>

	* command.c (agent_inq_pinentry_launched): New.
	(option_handler): Add option allow-pinentry-notify.
	* call-pinentry.c (getinfo_pid_cb): New.
	(start_pinentry): Ask for the PID and notify the client.

2008-01-15  Marcus Brinkmann  <marcus@g10code.de>

	* call-pinentry.c (start_pinentry): Start pinentry in detached
	mode.

2007-12-04  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_askpin): Use gnupg_get_help_string.

2007-12-03  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): s/standard_socket/use_standard_socket/ for
	clarity.
	(create_server_socket): New arg IS_SSH to avoid testing with
	assuan commands.

2007-11-20  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (get_agent_scd_notify_event): New.
	(handle_signal): Factor SIGUSR2 code out to:
	(agent_sigusr2_action): .. New.
	(agent_sighup_action): Print info message here and not in
	handle_signal.
	(handle_connections) [PTH_EVENT_HANDLE]: Call agent_sigusr2_action.

	* call-scd.c (agent_scd_check_aliveness) [W32]: Implemented.
	(start_scd) [W32]: Send event-signal option.

2007-11-19  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_askpin): Set the tooltip for the quality
	bar.

2007-11-15  Werner Koch  <wk@g10code.com>

	* agent.h (struct server_control_s): Add XAUTHORITY and
	PINENTRY_USER_DATA.
	* gpg-agent.c: New option --xauthority.
	(main, agent_init_default_ctrl)
	(agent_deinit_default_ctrl): Implemented
	* command.c (cmd_updatestartuptty): Ditto.
	* command-ssh.c (start_command_handler_ssh): Ditto.
	* call-pinentry.c (atfork_cb): Set the environment.
	(start_pinentry): Pass CTRL as arg to atfork_cb.

2007-11-14  Werner Koch  <wk@g10code.com>

	* call-scd.c (start_scd) [W32]: Take care of fflush peculiarities.

2007-11-07  Werner Koch  <wk@g10code.com>

	* agent.h: Remove errors.h.

2007-10-24  Werner Koch  <wk@g10code.com>

	* genkey.c (check_passphrase_constraints): Changed the wording of
	the warning messages.

2007-10-19  Werner Koch  <wk@g10code.com>

	* protect-tool.c (get_passphrase): Use new utf8 switch fucntions.

2007-10-15  Daiki Ueno  <ueno@unixuser.org>  (wk)

	* command-ssh.c (reenter_compare_cb): New function; imported from
	genkey.c.
	(ssh_identity_register): Ask initial passphrase twice.

2007-10-02  Werner Koch  <wk@g10code.com>

	* command.c (cmd_getinfo): Add "pid" subcommand.

2007-10-01  Werner Koch  <wk@g10code.com>

	* agent.h (struct server_control_s): Remove unused CONNECTION_FD.

	* gpg-agent.c: Remove w32-afunix.h.  Include mkdtemp.h.
	(socket_nonce, socket_nonce_ssh): New.
	(create_server_socket): Use assuan socket wrappers.  Remove W32
	specific stuff.  Save the server nonce.
	(check_nonce): New.
	(start_connection_thread, start_connection_thread_ssh): Call it.
	(handle_connections): Change args to gnupg_fd_t.
	* command.c (start_command_handler): Change LISTEN_FD to gnupg_fd_t.
	* command-ssh.c (start_command_handler_ssh): Ditto.

2007-09-18  Werner Koch  <wk@g10code.com>

	* agent.h (struct pin_entry_info_s): Add element WITH_QUALITYBAR.
	* genkey.c (check_passphrase_constraints): New arg SILENT.
	Changed all callers.
	(agent_protect_and_store, agent_genkey): Enable qualitybar.
	* call-pinentry.c (agent_askpin): Send that option.
	(unescape_passphrase_string): New.
	(inq_quality): New.
	(estimate_passphrase_quality): New.

2007-09-14  Marcus Brinkmann  <marcus@g10code.de>

	* call-pinentry.c (agent_popup_message_stop): Implement kill for
	Windows.

2007-08-28  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Add option --faked-system-time.

	* protect-tool.c (read_and_unprotect): Print the protected-at date.

	* agent.h (struct server_control_s): Add member IN_PASSWD.
	* command.c (cmd_passwd): Set it.
	* findkey.c (try_unprotect_cb): Use it.

	* protect.c (do_encryption): Replace asprintf by xtryasprint.
	(agent_protect): Create the protected-at item.
	(agent_unprotect): Add optional arg PROTECTED_AT.
	(merge_lists): Add args CUTOFF and CUTLEN.
	(agent_unprotect): Use them.
	* findkey.c (try_unprotect_cb): Add code to test for expired keys.
	(unprotect): Allow changing the passphrase.

2007-08-27  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: Add options --min-passphrase-nonalpha,
	--check-passphrase-pattern and --enforce-passphrase-constraints.
	(MIN_PASSPHRASE_NONALPHA): Init nonalpha option to 1.
	(main): Declare options for gpgconf.
	* agent.h (struct): Add members MIN_PASSPHRASE_NONALPHA,
	ENFORCE_PASSPHRASE_CONSTRAINTS and CHECK_PASSPHRASE_PATTERN.
	* genkey.c (nonalpha_charcount): New.
	(check_passphrase_pattern): New.
	(check_passphrase_constraints): Implement.  Factor some code out...
	(take_this_one_anyway, take_this_one_anyway2): .. New.

	* call-pinentry.c (agent_show_message): New.
	(agent_askpin): We better reset the pin buffer before asking.

	* trustlist.c (insert_colons): New.
	(agent_marktrusted): Pretty print the fpr.

2007-08-22  Werner Koch  <wk@g10code.com>

	* findkey.c (O_BINARY): Make sure it is defined.
	(agent_write_private_key): Use O_BINARY

	* protect-tool.c (import_p12_file): Add hack to allow importing of
	gnupg 2.0.4 generated files.

2007-08-06  Werner Koch  <wk@g10code.com>

	* trustlist.c (read_one_trustfile): Add flag "cm".
	(agent_istrusted): Ditto.

2007-08-02  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: Include gc-opt-flags.h and remove their definition
	here.

2007-07-13  Werner Koch  <wk@g10code.com>

	* genkey.c (check_passphrase_constraints): Require a confirmation
	for an empty passphrase.
	(agent_genkey, agent_protect_and_store): No need to repeat an
	empty passphrase.

2007-07-05  Werner Koch  <wk@g10code.com>

	* call-scd.c (struct inq_needpin_s): New.
	(inq_needpin): Pass unknown inquiries up.

2007-07-04  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (TIMERTICK_INTERVAL): New.
	(fixed_gcry_pth_init, main): Kludge to fix Pth initialization.

2007-07-03  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (handle_connections): Do not use FD_SETSIZE for
	select but compute the correct number.

2007-07-02  Werner Koch  <wk@g10code.com>

	* command.c (cmd_reloadagent) [W32]: New.
	(register_commands) [W32]: New command RELOADAGENT.

	* Makefile.am (gpg_agent_SOURCES): Remove w32main.c and w32main.h.
	(gpg_agent_res_ldflags): Remove icon file as we don't have a
	proper icon yet.
	* gpg-agent.c (main): do not include w32main.h.  Remove all calls
	to w32main.c.
	(agent_sighup_action): New.
	(handle_signal): Use it.

2007-06-26  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (create_directories) [W32]: Made it work.

2007-06-21  Werner Koch  <wk@g10code.com>

	* agent.h (ctrl_t): Remove.  It is now declared in ../common/util.h.

	* gpg-agent.c (check_for_running_agent): New arg SILENT.  Changed
	all callers.
	(create_server_socket): If the standard socket is in use check
	whether a agent is running and avoid starting another one.

2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* gpg-agent.c (main): Percent escape pathname in --gpgconf-list
	output.

2007-06-18  Werner Koch  <wk@g10code.com>

	* w32main.c (build_argv): New.
	(WinMain): Use it.

	* command.c (cmd_killagent) [W32]: New.
	(cmd_getinfo): New.
	* gpg-agent.c (get_agent_ssh_socket_name): New.
	(no_force_standard_socket) New.
	(create_server_socket): Use it.
	* Makefile.am (gpg_agent_res_ldflags): Pass windows option to ld.

2007-06-14  Werner Koch  <wk@g10code.com>

	* protect-tool.c (main): Setup default socket name for
	simple-pwquery.
	(MAP_SPWQ_ERROR_IMPL): New.  Use map_spwq_error for spqw related
	error codes.
	* preset-passphrase.c (main): Setup default socket name for
	simple-pwquery.
	(map_spwq_error): Remove.
	(MAP_SPWQ_ERROR_IMPL): New.

	* call-pinentry.c (start_pinentry): Use gnupg_module_name.
	* call-scd.c (start_scd): Ditto.

2007-06-12  Werner Koch  <wk@g10code.com>

	* taskbar.c: New.

	* trustlist.c (read_one_trustfile): Replace GNUPG_SYSCONFDIR by a
	function call.
	(read_trustfiles): Ditto.

	* gpg-agent.c (main): Replace some calls by init_common_subsystems.
	* preset-passphrase.c (main): Ditto.
	* protect-tool.c (main): Ditto.

2007-06-11  Werner Koch  <wk@g10code.com>

	* Makefile.am (common_libs): Use libcommonstd macro.
	(commonpth_libs): Use libcommonpth macro.

	* protect-tool.c (main) [W32]: Call pth_init.

	* preset-passphrase.c (main) [W32]: Replace the explicit Winsocket
	init by a call to pth_init.

	* trustlist.c (initialize_module_trustlist): New.
	* gpg-agent.c (main): Call it.

	* call-pinentry.c (initialize_module_query): Rename to
	initialize_module_call_pinentry.

	* minip12.c: Remove iconv.h. Add utf8conf.h.  Changed all iconv
	calss to use these jnlib wrappers.

2007-06-06  Werner Koch  <wk@g10code.com>

	* minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
	defines such a symbol to access the process context.

	* call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
	* call-scd.c (dump_mutex_state): Ditto.

	* protect-tool.c (i18n_init): Remove.
	* preset-passphrase.c (i18n_init): Remove.
	* gpg-agent.c (i18n_init): Remove.

2007-05-19  Marcus Brinkmann  <marcus@g10code.de>

	* protect-tool.c (get_passphrase): Free ORIG_CODESET on error.

2007-05-14  Werner Koch  <wk@g10code.com>

	* protect.c (make_shadow_info): Replace sprintf by smklen.

2007-04-20  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (my_gcry_logger, my_gcry_outofcore_handler): Removed.
	(main): Call the setup_libgcrypt_logging helper.
	* protect-tool.c (my_gcry_logger): Removed.
	(main): Call the setup_libgcrypt_logging helper.

2007-04-03  Werner Koch  <wk@g10code.com>

	* trustlist.c (read_trustfiles): Take a missing trustlist as an
	empty one.

2007-03-20  Werner Koch  <wk@g10code.com>

	* protect-tool.c: New option --p12-charset.
	* minip12.c (p12_build): Implement it.

2007-03-19  Werner Koch  <wk@g10code.com>

	* minip12.c: Include iconv.h.
	(decrypt_block): New.
	(parse_bag_encrypted_data, parse_bag_data): Use it here.
	(bag_data_p, bag_decrypted_data_p): New helpers.

2007-03-06  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main) <gpgconf>: Add entries for all ttl options.

2007-02-20  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (start_pinentry): Fix for OS X to allow loading
	of the bundle.  Tested by Benjamin Donnachie.

2007-02-14  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: New option --pinentry-touch-file.
	(get_agent_socket_name): New.
	* agent.h (opt):  Add pinentry_touch_file.
	* call-pinentry.c (start_pinentry): Send new option to the
	pinentry.

2007-01-31  Moritz Schulte  <moritz@g10code.com>  (wk)

	* command-ssh.c (stream_read_string): Initialize LENGTH to zero.
	(start_command_handler_ssh): Use es_fgetc/es_ungetc to check if
	EOF has been reached before trying to process another request.

2007-01-31  Werner Koch  <wk@g10code.com>

	* command-ssh.c (start_command_handler_ssh):

	* Makefile.am (t_common_ldadd): Add LIBICONV.

2007-01-25  Werner Koch  <wk@g10code.com>

	* genkey.c (check_passphrase_constraints): Get ngettext call right
	and use UTF-8 aware strlen.

	* protect-tool.c (get_passphrase): New arg OPT_CHECK.
	(get_new_passphrase): Enable OPT_CHECK on the first call.
	* command.c (cmd_get_passphrase): Implement option --check.

2007-01-24  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (MIN_PASSPHRASE_LEN): New
	(parse_rereadable_options): New option 	--min-passphrase-len.
	* genkey.c (check_passphrase_constraints): New.
	(agent_genkey, agent_protect_and_store): Call new function.  Fix
	memory leak.

	* call-pinentry.c (agent_askpin): Allow translation of the displayed
	error message.
	(agent_popup_message_start): Remove arg CANCEL_BTN.
	(popup_message_thread): Use --one-button option.

	* command.c (cmd_passwd): Now that we don't distinguish between
	assuan and regular error codes we can jump to the end on error.

2006-12-07  David Shaw  <dshaw@jabberwocky.com>

	* Makefile.am: Link to iconv for jnlib dependency.

2006-11-20  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_popup_message_stop): Use SIGKILL.
	* call-scd.c (inq_needpin): Implement POPUPKEYPADPROMPT and
	DISMISSKEYPADPROMPT.

2006-11-15  Werner Koch  <wk@g10code.com>

	* protect.c (make_shadow_info): Cast printf arg to unsigned int.
	* minip12.c (parse_bag_encrypted_data): Ditto.
	(parse_bag_data, p12_parse): Ditto.
	* command-ssh.c (ssh_identity_register): Changed buffer_n to
	size_t.

	* agent.h (struct server_control_s): New field thread_startup.
	* command.c (start_command_handler): Moved CTRL init code to ..
	* gpg-agent.c (start_connection_thread): .. here.
	(agent_deinit_default_ctrl): New.
	(agent_init_default_ctrl): Made static.
	(handle_connections): Allocate CTRL and pass it pth_spawn.
	* command-ssh.c (start_command_handler_ssh): Moved CTRL init code
	to ..
	* gpg-agent.c (start_connection_thread_ssh): .. here.

2006-11-14  Werner Koch  <wk@g10code.com>

	* command.c (bump_key_eventcounter): New.
	(bump_card_eventcounter): New.
	(cmd_geteventcounter): New command.
	* gpg-agent.c (handle_signal): Call bump_card_eventcounter.
	* findkey.c (agent_write_private_key): Call bump_key_eventcounter.
	* trustlist.c (agent_reload_trustlist): Ditto.

	* command.c (post_cmd_notify, io_monitor): New.
	(register_commands, start_command_handler): Register them.

2006-11-09  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): In detached mode connect standard
	descriptors to /dev/null.

	* trustlist.c (read_trustfiles): Make sure not to pass a zero size
	to realloc as the C standards says that this behaves like free.

2006-11-06  Werner Koch  <wk@g10code.com>

	* protect-tool.c (my_strusage): Fixed typo.

2006-10-23  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): New command --gpgconf-test.

	* minip12.c (parse_bag_encrypted_data, parse_bag_data): Allow for
	a salt of 20 bytes.

2006-10-20  Werner Koch  <wk@g10code.com>

	* Makefile.am (t_common_ldadd): Use GPG_ERROR_LIBS instead -o just -l

2006-10-19  Werner Koch  <wk@g10code.com>

	* findkey.c (unprotect): Use it to avoid unnecessary calls to
	agent_askpin.
	* call-pinentry.c (pinentry_active_p): New.

2006-10-17  Werner Koch  <wk@g10code.com>

	* Makefile.am (gpg_agent_LDADD): Link to libcommonpth.
	(gpg_agent_CFLAGS): New.  This allows to only link this with Pth.

2006-10-16  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_get_confirmation): Map Cancel code here too.
	* trustlist.c (agent_marktrusted): Return Cancel instead of
	Not_Confirmed for the first question.

2006-10-12  Werner Koch  <wk@g10code.com>

	* protect-tool.c (get_passphrase): Fix if !HAVE_LANGINFO_CODESET.

2006-10-06  Werner Koch  <wk@g10code.com>

	* Makefile.am (AM_CFLAGS): Use PTH version of libassuan.
	(gpg_agent_LDADD): Ditto.

	* divert-scd.c (divert_pksign): Use PKAUTH for the TLS algo.

2006-10-05  Werner Koch  <wk@g10code.com>

	* command.c (has_option_name): New.
	(cmd_sethash): New --hash option.
	* pksign.c (do_encode_raw_pkcs1): New.
	(agent_pksign_do): Use it here for the TLS algo.
	* agent.h (GCRY_MD_USER_TLS_MD5SHA1): New.
	* divert-scd.c (pksign): Add case for tls-md5sha1.

	* divert-scd.c (encode_md_for_card): Check that the algo is valid.

2006-10-04  Werner Koch  <wk@g10code.com>

	* call-pinentry.c (agent_get_passphrase): Changed to return the
	unencoded passphrase.
	(agent_askpin, agent_get_passphrase, agent_get_confirmation): Need
	to map the cancel error.
	* command.c (send_back_passphrase): New.
	(cmd_get_passphrase): Use it here.  Also implement --data option.
	(skip_options): New.

2006-09-26  Werner Koch  <wk@g10code.com>

	* learncard.c (agent_handle_learn): Send back the keypair
	information.

2006-09-25  Werner Koch  <wk@g10code.com>

	* trustlist.c (read_one_trustfile): Allow extra flags.
	(struct trustitem_s): Replaced KEYFLAGS by a FLAGS struct.
	Changed all code to use this.
	(agent_istrusted): New arg CTRL. Changed all callers.  Send back
	flags.
	* command.c (agent_write_status): New.

2006-09-20  Werner Koch  <wk@g10code.com>

	* Makefile.am: Changes to allow parallel make runs.

2006-09-15  Werner Koch  <wk@g10code.com>

	* trustlist.c: Entirely rewritten.
	(agent_trustlist_housekeeping): Removed and removed all calls.

2006-09-14  Werner Koch  <wk@g10code.com>

 	Replaced all call gpg_error_from_errno(errno) by
	gpg_error_from_syserror().

	* call-pinentry.c (start_pinentry): Replaced pipe_connect2 by
	pipe_connect_ext.
	* call-scd.c (start_scd): Ditto.
	* command.c (start_command_handler): Replaced
	init_connected_socket_server by init_socket_server_ext.

2006-09-13  Werner Koch  <wk@g10code.com>

	* preset-passphrase.c (main) [W32]: Check for WSAStartup error.

2006-09-08  Werner Koch  <wk@g10code.com>

	* call-scd.c: Add signal.h as we are referencing SIGUSR2.

2006-09-06  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (AM_CFLAGS): Add $(GPG_ERR_CFLAGS).
	(gpg_agent_LDADD): Replace -lgpg-error with $(GPG_ERROR_LIBS).

2006-09-06  Werner Koch  <wk@g10code.com>

	* query.c: Renamed to ..
	* call-pinentry.c: .. this.

	* agent.h (out_of_core): Removed.
	(CTRL): Removed and changed everywhere to ctrl_t.

	Replaced all Assuan error codes by libgpg-error codes.  Removed
	all map_to_assuan_status and map_assuan_err.

	* gpg-agent.c (main): Call assuan_set_assuan_err_source to have Assuan
	switch to gpg-error codes.
	* command.c (set_error): Adjusted.

2006-09-04  Werner Koch  <wk@g10code.com>

	* command.c (percent_plus_unescape): New.
	(cmd_get_val, cmd_putval): New.

2006-08-29  Werner Koch  <wk@g10code.com>

	* command-ssh.c (stream_read_mpi): Sanity check for early
	detecting of too large keys.
	* gpg-agent.c (my_gcry_outofcore_handler): New.
	(main): Register it.
	(main): No allocate 32k secure memory (was 16k).

2006-07-31  Werner Koch  <wk@g10code.com>

	* preset-passphrase.c (make_hexstring): For consistency use
	xtrymalloc and changed caller to use xfree.  Fixed function
	comment.

2006-07-29  Marcus Brinkmann  <marcus@g10code.de>

	* preset-passphrase.c (preset_passphrase): Do not strip off last
	character of passphrase.
	(make_hexstring): New function.
	* command.c (cmd_preset_passphrase): Use parse_hexstring to syntax
	check passphrase argument.  Truncate passphrase at delimiter.

2006-07-24  Werner Koch  <wk@g10code.com>

	* minip12.c (build_key_bag): New args SHA1HASH and
	KEYIDSTR. Append bag Attributes if these args are given.
	(build_cert_sequence): ditto.
	(p12_build): Calculate certificate hash and pass to build
	functions.

2006-07-21  Werner Koch  <wk@g10code.com>

	* minip12.c (oid_pkcs_12_keyBag): New.
	(parse_bag_encrypted_data): New arg R_RESULT. Support keybags and
	return the key object.
	(p12_parse): Take new arg into account.  Free RESULT on error.

2006-06-26  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (handle_signal): Print info for SIGUSR2 only in
	verbose mode.

2006-06-22  Werner Koch  <wk@g10code.com>

	* command-ssh.c (make_cstring): Use memcpy instead of strncpy.
	(ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
	xtrycalloc instead of xtrymalloc followed by memset.

2006-06-20  Werner Koch  <wk@g10code.com>

	* minip12.c (create_final): New arg PW. Add code to calculate the
	MAC.

2006-06-09  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpg_agent_LDADD): Add $(NETLIBS).
	(gpg_protect_tool_LDADD): Likewise.
	(gpg_preset_passphrase_LDADD): Likewise.

2006-04-09  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_request_process): Removed FIXME mentioning a
	possible DoS attack.

2006-04-01  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_identity_register): Make KEY_GRIP_RAW be 20
	instead of 21 bytes long; do not fill KEY_GRIP_RAW[20] with NUL
	byte - KEY_GRIP_RAW is a raw binary string anyway.

2006-02-09  Werner Koch  <wk@g10code.com>

	* call-scd.c (struct scd_local_s): New field next_local.
	(scd_local_list): New.
	(start_scd): Put new local into list.
	(agent_reset_scd): Remove it from the list.
	(agent_scd_check_aliveness): Here is the actual reason why we need
	all this stuff.
	(agent_reset_scd): Send the new command RESTART instead of RESET.

2005-12-16  Werner Koch  <wk@g10code.com>

	* minip12.c (cram_octet_string): New
	(p12_parse): Use it for NDEFed bags.
	(parse_bag_data): Ditto.
	(string_to_key, set_key_iv, crypt_block): New arg SALTLEN.
	(p12_build): Use old value 8 for new arg.
	(parse_bag_encrypted_data, parse_bag_data): Allow for salts of 8
	to 16 bytes.  Add new arg R_CONSUMED.

2005-11-24  Werner Koch  <wk@g10code.com>

	* minip12.c (p12_parse): Fixed for case that the key object comes
	prior to the certificate.

2005-10-19  Werner Koch  <wk@g10code.com>

	* divert-scd.c (getpin_cb): Hack to use it for a keypad message.

	* call-scd.c (inq_needpin): Reworked to support the new KEYPADINFO.

	* query.c (start_pinentry): Keep track of the owner.
	(popup_message_thread, agent_popup_message_start)
	(agent_popup_message_stop, agent_reset_query): New.
	* command.c (start_command_handler): Make sure a popup window gets
	closed.

2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
	(gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
	(gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.

2005-09-16  Werner Koch  <wk@g10code.com>

	* minip12.c (build_key_sequence, build_cert_sequence): Fixed
	padding.

2005-09-15  Moritz Schulte  <moritz@g10code.com>

	* t-protect.c (test_agent_protect): Implemented.
	(main): Disable use of secure memory.

2005-09-09  Werner Koch  <wk@g10code.com>

	* minip12.c (p12_build): Oops, array needs to be larger for the
	certificate.
	(build_cert_bag): Fixed yesterdays change.

	* command-ssh.c (card_key_available): Let the card handler decide
	whether the card is supported here.  Also get a short serial
	number to return from the card handler.

2005-09-08  Werner Koch  <wk@g10code.com>

	* minip12.c (build_cert_bag): Use a non constructed object.
	i.e. 0x80 and not 0xa0.

2005-08-16  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Use a default file name for --write-env-file.

2005-07-25  Werner Koch  <wk@g10code.com>

	* findkey.c (agent_public_key_from_file): Fixed array assignment.
	This was the cause for random segvs.

2005-06-29  Werner Koch  <wk@g10code.com>

	* command-ssh.c (data_sign): Removed empty statement.

2005-06-21  Werner Koch  <wk@g10code.com>

	* minip12.c (create_final): Cast size_t to ulong for printf.
	(build_key_bag, build_cert_bag, build_cert_sequence): Ditto.

2005-06-16  Werner Koch  <wk@g10code.com>

	* protect-tool.c (make_advanced): Makde RESULT a plain char.
	* call-scd.c (unescape_status_string): Need to cast unsigned char*
	for strcpy.
	(agent_card_pksign): Made arg R_BUF an unsigned char**.
	* divert-scd.c (divert_pksign): Made SIGVAL unsigned char*.
	(encode_md_for_card): Initialize R_VAL and R_LEN.
	* genkey.c (store_key): Made BUF unsigned.
	* protect.c (do_encryption): Ditto.
	(do_encryption): Made arg PROTBEGIN unsigned. Initialize RESULT
	and RESULTLEN even on error.
	(merge_lists): Need to cast unsigned char * for strcpy. Initialize
	RESULTand RESULTLEN even on error.
	(agent_unprotect): Likewise for strtoul.
	(make_shadow_info): Made P and INFO plain char.
	(agent_shadow_key): Made P plain char.

2005-06-15  Werner Koch  <wk@g10code.com>

	* query.c (agent_get_passphrase): Made HEXSTRING a char*.
	* command-ssh.c (ssh_key_grip): Made arg BUFFER unsigned.
	(ssh_key_grip): Simplified.
	(data_sign): Initialize variables with the definition.
	(ssh_convert_key_to_blob): Make sure that BLOB and BLOB_SIZE
	are set to NULL on error.  Cool, gcc-4 detects uninitialized stuff
	beyond function boundaries; well it can't know that we do error
	proper error handling so that this was not a real error.
	(file_to_buffer): Likewise for BUFFER and BUFFER_N.
	(data_sign): Likewise for SIG and SIG_N.
	(stream_read_byte): Set B to a value even on error.
	* command.c (cmd_genkey): Changed VALUE to char.
	(cmd_readkey): Cast arg for gcry_sexp_sprint.
	* agent.h (struct server_control_s): Made KEYGRIP unsigned.

2005-06-13  Werner Koch  <wk@g10code.com>

	* command-ssh.c (start_command_handler_ssh): Reset the SCD.

2005-06-09  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (create_socket_name): New option --max-cache-ttl-ssh.
	* cache.c (housekeeping): Use it.
	(agent_put_cache): Use a switch to get the default ttl so that it
	is easier to add more cases.

2005-06-06  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: New option --default-cache-ttl-ssh.
	* agent.h (cache_mode_t): New.
	* pksign.c (agent_pksign_do): New arg CACHE_MODE to replace the
	ARG IGNORE_CACHE. Changed all callers.
	(agent_pksign): Ditto.
	* findkey.c (agent_key_from_file): Ditto. Canged all callers.
	(unprotect): Ditto.
	* command-ssh.c (data_sign): Use CACHE_MODE_SSH.
	* cache.c (agent_get_cache): New arg CACHE_MODE.
	(agent_put_cache): Ditto.  Store it in the cache.

	* query.c (agent_query_dump_state, dump_mutex_state): New.
	(unlock_pinentry): Reset the global context before releasing the
	mutex.
	* gpg-agent.c (handle_signal): Dump query.c info on SIGUSR1.

	* call-scd.c (agent_scd_check_aliveness): Always do a waitpid and
	add a timeout to the locking.

2005-06-03  Werner Koch  <wk@g10code.com>

	* command.c (cmd_updatestartuptty): New.

	* gpg-agent.c: New option --write-env-file.

	* gpg-agent.c (handle_connections): Make sure that the signals we
	are handling are not blocked.Block signals while creating new
	threads.

2005-06-02  Werner Koch  <wk@g10code.com>

	* call-scd.c (agent_scd_dump_state, dump_mutex_state): New.
	* gpg-agent.c (handle_signal): Print it on SIGUSR1.
	(handle_connections): Include the file descriptor into the
	threadnames.

2005-06-01  Werner Koch  <wk@g10code.com>

	* gpg-agent.c: Include setenv.h.

2005-05-31  Werner Koch  <wk@g10code.com>

	* agent.h (out_of_core): s/__inline__/inine.  Noted by Ray Link.

2005-05-25  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Do not unset the DISPLAY when we are
	continuing as child.

2005-05-24  Werner Koch  <wk@g10code.com>

	* call-scd.c (inq_needpin): Skip leading spaces in of PIN
	description.
	* divert-scd.c (getpin_cb): Enhanced to cope with description
	flags.
	* query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all
	callers.

2005-05-21  Werner Koch  <wk@g10code.com>

	* call-scd.c (start_scd): Don't test for an alive scdaemon here.
	(agent_scd_check_aliveness): New.
	* gpg-agent.c (handle_tick): Test for an alive scdaemon.
	(handle_signal): Print thread info on SIGUSR1.

2005-05-20  Werner Koch  <wk@g10code.com>

	* protect-tool.c: New option --canonical.
	(show_file): Implement it.

	* keyformat.txt: Define the created-at attribute for keys.

2005-05-18  Werner Koch  <wk@g10code.com>

	* divert-scd.c (ask_for_card): Removed the card reset kludge.

2005-05-17  Werner Koch  <wk@g10code.com>

	* call-scd.c (unlock_scd): Add new arg CTRL. Changed all callers.
	(start_scd): Reoworked to allow for additional connections.
	* agent.h (ctrl_t): Add local data for the SCdaemon.
	* command.c (start_command_handler): Release SERVER_LOCAL.

	* gpg-agent.c (create_server_socket): Use xmalloc.
	(main): Removed option --disable-pth a dummy.  Removed non-pth
	code path.
	(cleanup_sh): Removed.  Not needed anymore.

2005-05-05  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_key_to_buffer): Rename to ...
	(ssh_key_to_protected_buffer): ... this; change callers.
	Improved documentation.
	Use ssh_key_grip(), where gcry_pk_get_keygrip() has been used
	before.
	(ssh_handler_sign_request): Removed unusued variable P.

2005-04-20  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_handler_request_identities): Removed
	debugging code (sleep call), which was commited unintenionally.

2005-04-20  Werner Koch  <wk@g10code.com>

	* minip12.c (parse_bag_encrypted_data): Fix the unpadding hack.

	* gpg-agent.c: New option --disable-scdaemon.
	(handle_connections): Add time event to drive ...
	(handle_tick): New function.
	(main): Record the parent PID. Fixed segv when using ssh and a
	command.

	* call-scd.c (start_scd): Take care of this option.

2005-04-03  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_request_spec): New member: secret_input.
	(REQUEST_SPEC_DEFINE): New argument: secret_input.
	(request_specs): Add secret_input flag.
	(request_spec_lookup): New function ...
	(ssh_request_process): ... use it here; depending on secret_input
	flag allocate secure or non-secure memory.

2005-03-02  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (sexp_key_extract): Removed FIXME, since
	xtrymallos does set errno correctly by now.
	(sexp_extract_identifier): Remove const attribute from identifier.
	(ssh_handler_request_identities): Remove const attribute from
	key_type; removes ugly casts and FIXME.
	(sexp_key_extract): Remove const attribute from comment.
	(ssh_send_key_public): Remove const attribute from
	key_type/comment; removes ugly cast.
	(data_sign): Remove const attribute from identifier; removes ugly
	cast.
	(key_secret_to_public): Remove const attribute from comment;
	removes ugly cast.
	(ssh_handler_sign_request): Remove const attribute from p.
	(sexp_key_extract): Use make_cstring().
	(ssh_key_extract_comment): Likewise.
	(ssh_key_to_buffer): Use secure memory for memory area to hold the
	key S-Expression.
	Added more comments.

2005-02-25  Werner Koch  <wk@g10code.com>

	* findkey.c (modify_description): Keep invalid % escapes, so that
	%0A may pass through.

	* agent.h (server_control_s): New field USE_AUTH_CALL.
	* call-scd.c (agent_card_pksign): Make use of it.
	* command-ssh.c (data_sign): Set the flag.
	(ssh_send_key_public): New arg OVERRIDE_COMMENT.
	(card_key_available): Add new arg CARDSN.
	(ssh_handler_request_identities): Use the card s/n as comment.
	(sexp_key_extract): Use GCRYMPI_FMT_STD.
	(data_sign): Ditto.

	* learncard.c (make_shadow_info): Moved to ..
	* protect.c (make_shadow_info): .. here. Return NULL on malloc
	failure. Made global.
	* agent.h: Add prototype.

2005-02-24  Werner Koch  <wk@g10code.com>

	* call-scd.c (unescape_status_string): New. Actual a copy of
	../g10/call-agent.c
	(card_getattr_cb, agent_card_getattr): New.

	* command-ssh.c (card_key_available): New.
	(ssh_handler_request_identities): First see whether a card key is
	available.

	* gpg-agent.c (handle_connections): Need to check for events if
	select returns with -1.

2005-02-23  Werner Koch  <wk@g10code.com>

	* command-ssh.c (get_passphrase): Removed.
	(ssh_identity_register): Partly rewritten.
	(open_control_file, search_control_file, add_control_entry): New.
	(ssh_handler_request_identities): Return only files listed in our
	control file.

	* findkey.c (unprotect): Check for allocation error.

	* agent.h (opt): Add fields to record the startup terminal
	settings.
	* gpg-agent.c (main): Record them and do not force keep display
	with --enable-ssh-support.
	* command-ssh.c (start_command_handler_ssh): Use them here.

	* gpg-agent.c: Renamed option --ssh-support to
	--enable-ssh-support.

	* command.c (cmd_readkey): New.
	(register_commands): Register new command "READKEY".

	* command-ssh.c (ssh_request_process): Improved logging.

	* findkey.c (agent_write_private_key): Always use plain open.
	Don't depend on an umask for permissions.
	(agent_key_from_file): Factored file reading code out to ..
	(read_key_file): .. new function.
	(agent_public_key_from_file): New.

2005-02-22  Werner Koch  <wk@g10code.com>

	* command-ssh.c (stream_read_string): Removed call to abort on
	memory error because the CVS version of libgcrypt makes sure
	that ERRNO gets always set on error even with a faulty user
	supplied function.

2005-02-19  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
	not use elems_secret member of key_spec.
	(ssh_key_type_spec): Removed member: elems_secret.
	(ssh_key_types): Removed elems_secret data.
	(ssh_sexp_construct): Renamed to ...
	(sexp_key_construct): ... this; changed callers.
	(ssh_sexp_extract): Renamed to ...
	(sexp_key_extract): ... this; changed callers.
	(ssh_sexp_extract_key_type): Renamed to ...
	(sexp_extract_identifier): ... this; changed callers; use
	make_cstring().
	Added more comments.

2005-02-18  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
	template, clarified.
	(ssh_sexp_extract): Support shadowed-private-key-sexp; treat
	protected-private key and shadowed-private-key as public keys.
	(key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
	and ssh_sexp_construct().

2005-02-15  Werner Koch  <wk@g10code.com>

	* findkey.c (modify_description): Don't increment OUT_LEN during
	the second pass.

2005-02-14  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (es_read_byte): Renamed to ...
	(stream_es_read_byte): ... this; changed callers.
	(es_write_byte): Renamed to ...
	(stream_write_byte): ... this; changed callers.
	(es_read_uint32): Renamed to ...
	(stream_read_uint32): ... this; changed callers.
	(es_write_uint32): Renamed to ...
	(stream_write_uint32): ... this; changed callers.
	(es_read_data): Renamed to ...
	(stream_read_data): ... this; changed callers.
	(es_write_data): Renamed to ...
	(stream_write_data): ... this; changed callers.
	(es_read_string): Renamed to ...
	(stream_read_string): ... this; changed callers.
	(es_read_cstring): Renamed to ...
	(stream_read_cstring): ... this; changed callers.
	(es_write_string): Renamed to ...
	(stream_write_string): ... this; changed callers.
	(es_write_cstring): Renamed to ...
	(stream_write_cstring): ... this; changed callers.
	(es_read_mpi): Renamed to ...
	(stream_read_mpi): ... this; changed callers.
	(es_write_mpi): Renamed to ...
	(stream_write_mpi): ... this; changed callers.
	(es_copy): Renamed to ...
	(stream_copy): ... this; changed callers.
	(es_read_file): Renamed to ...
	(file_to_buffer): ... this; changed callers.
	(ssh_identity_register): Removed variable description_length;
	changed code to use asprintf for description.
	(stream_write_uint32): Do not filter out the last byte of shift
	expression.
	(uint32_construct): New macro ...
	(stream_read_uint32): ... use it; removed unnecessary cast.

2005-02-03  Werner Koch  <wk@g10code.com>

	* agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
	function won't return.

	* gpg-agent.c (check_for_running_agent): Initialize pid to a
	default value if not needed.

	* command-ssh.c: Removed stdint.h.  s/byte_t/unsigned char/,
	s/uint32/u32/ becuase that is what we have always used in GnuPG.
	(ssh_request_specs): Moved to top of file.
	(ssh_key_types): Ditto.
	(make_cstring): Ditto.
	(data_sign): Don't use a variable for the passphrase prompt, make
	it translatable.
	(ssh_request_process):


	* findkey.c (modify_description): Renamed arguments for clarity,
	polished documentation.  Make comment a C-string.  Fixed case of
	DESCRIPTION being just "%".
	(agent_key_from_file): Make sure comment string to a C-string.

	* gpg-agent.c (create_socket_name): Cleanup the implemntation, use
	DIMof, agent_exit, removed superflous args and return the
	allocated string as value.  Documented.  Changed callers.
	(create_server_socket): Cleanups similar to above.  Changed callers.
	(cleanup_do): Renamed to ..
	(remove_socket): .. this.  Changed caller.
	(handle_connections): The signals are to be handled in the select
	and not in the accept.  Test all FDs after returning from a
	select.  Remove the event tests from the accept calls.  The select
	already assured that the accept won't block.

2005-01-29  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_handler_request_identities)
	(ssh_handler_sign_request, ssh_handler_add_identity)
	(ssh_handler_remove_identity, ssh_handler_remove_all_identities)
	(ssh_handler_lock, ssh_handler_unlock): Changed to return an error
	code instead of a boolean.
	(ssh_request_process): Changed to return a boolean instead of an
	error; adjust caller.
	(ssh_request_handle_t): Adjusted type.
	(ssh_request_spec): New member: identifier.
	(REQUEST_SPEC_DEFINE): New macro; use it for initialization of
	request_specs[].
	(ssh_request_process): In debugging mode, log identifier of
	handler to execute.
	(start_command_handler_ssh): Moved most of the stream handling
	code ...
	(ssh_request_process): ... here.

2005-01-28  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_handler_add_identity): Pass ctrl to
	ssh_identity_register().
	(ssh_identity_register): New argument: ctrl; pass ctrl to
	get_passphrase().
	(get_passphrase): Pass ctrl instead of NULL to agent_askpin().
	(start_command_handler_ssh): Use agent_init_default_ctrl();
	deallocate structure members, which might be dynamically
	allocated.
	(lifetime_default): Removed variable.
	(ssh_handler_add_identity): Fix ttl handling; renamed variable
	`death' to `ttl'.
	(ssh_identity_register): Fix key grip handling.

2005-01-26  Moritz Schulte  <moritz@g10code.com>

	* command-ssh.c (ssh_handler_sign_request): Confirm to agent
	protocol in case of failure.

	* command-ssh.c: New file.

	* Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.

	* findkey.c (modify_description): New function.
	(agent_key_from_file): Support comment field in key s-expressions.

	* gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
	(opts) New entry for oSSHSupport.
	New variable: socket_name_ssh.
	(cleanup_do): New function based on cleanup().
	(cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
	(main): New switch case for oSSHSupport.
	(main): Move socket name creation code to ...
	(create_socket_name): ... this new function.
	(main): Use create_socket_name() for creating socket names for
	socket_name and for socket_name_ssh in case ssh support is
	enabled.
	Move socket creation code to ...
	(create_server_socket): ... this new function.
	(main): Use create_server_socket() for creating sockets.
	In case standard_socket is set, do not only store a socket name in
	socket_name, but also in socket_name_ssh.
	Generate additional environment info strings for ssh support.
	Pass additional ssh socket argument to handle_connections.
	(start_connection_thread_ssh): New function.
	(handle_connections): Use select to multiplex between gpg-agent
	and ssh-agent protocol.

	* agent.h (struct opt): New member: ssh_support.
	(start_command_handler_ssh): Add prototype.

2005-01-04  Werner Koch  <wk@g10code.com>

	* trustlist.c (agent_marktrusted): Use "Cancel" for the first
	confirmation and made the strings translatable.

	* cache.c (agent_put_cache): Fix the test for using the default
	TTL.

2004-12-21  Werner Koch  <wk@g10code.com>

	* preset-passphrase.c (preset_passphrase): Handle --passphrase.

	* Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
	pwquery may use stuff from jnlib.  Conditionally add -lwsock2
	(gpg_protect_tool_LDADD): Ditto.

	* preset-passphrase.c (main): Use default_homedir().
	(main) [W32]: Initialize sockets.

2004-12-21  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (libexec_PROGRAMS): Add gpg-preset-passphrase.
	(gpg_preset_passphrase_SOURCES, gpg_preset_passphrase_LDADD): New
	targets.
	* agent.h (opt): New member allow_cache_passphrase.
	* cache.c (housekeeping): Check if R->ttl is not negative.
	(agent_put_cache): Allow ttl to be negative.
	* command.c (parse_hexstring): Allow something to follow the
	hexstring.
	(cmd_cache_passphrase): New function.
	(register_commands): Add it.
	* gpg-agent.c: Handle --allow-preset-passphrase.
	* preset-passphrase.c: New file.

2004-12-21  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main): Use default_homedir().
	* protect-tool.c (main): Ditto.

2004-12-20  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
	the pth_init kludge.
	(main): Add new options --[no-]use-standard-socket.
	(check_for_running_agent): Check whether it is running on the
	standard socket.

	* call-scd.c (init_membuf, put_membuf, get_membuf): Removed.  We
	now use the identical implementation from ../common/membuf.c.

	* pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
	membuf functions to return the value.
	* pkdecrypt.c (agent_pkdecrypt): Ditto.
	* genkey.c (agent_genkey): Ditto.
	* command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
	assuan_get_data_fp() by a the membuf scheme.
	(clear_outbuf, write_and_clear_outbuf): New.

2004-12-19  Werner Koch  <wk@g10code.com>

	* query.c (initialize_module_query): New.
	* call-scd.c (initialize_module_call_scd): New.
	* gpg-agent.c (main): Call them.

2004-12-18  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (main):  Remove special Pth initialize.

	* agent.h (map_assuan_err): Define in terms of
	map_assuan_err_with_source.

2004-12-17  Moritz Schulte  <moritz@g10code.com>

	* query.c: Undo change from 2004-12-05.

2004-12-15  Werner Koch  <wk@g10code.com>

	* gpg-agent.c [W32]: Various hacks to make it work.

	* findkey.c (agent_write_private_key) [W32]: Adjust open call.

	* call-scd.c (start_scd) [W32]: Don't check whether the daemon
	didn't died.  To hard to do under Windows.
	(start_scd) [W32]: Disable sending of the event signal option.

	* protect-tool.c (read_file, export_p12_file) [W32]: Use setmode
	to get stdout and stin into binary mode.

2004-12-05  Moritz Schulte  <moritz@g10code.com>

	* query.c (start_pinentry): Allow CTRL be NULL.

2004-10-22  Werner Koch  <wk@g10code.com>

	* gpg-agent.c (parse_rereadable_options): Return "not handled"
	when the log file has not beend hadled.  This is will let the main
	option processing continue. Fixed a bug introduced on 2004-09-4
	resulting in logging to stderr until a HUP has been given.
	(main): Don't close the listen FD.

2004-09-30  Werner Koch  <wk@g10code.com>

	* Makefile.am: Adjusted from gettext 1.14.

2004-09-29  Werner Koch  <wk@g10code.com>

	* minip12.c (parse_bag_encrypted_data): Print error if a bad
	passphrase has been given.

2004-09-28  Werner Koch  <wk@g10code.com>

	* protect.c (agent_unprotect): Fixed wiping of CLEARTEXT.  Thanks
	to Moritz for pointing this out.

2004-09-25  Moritz Schulte  <moritz@g10code.com>

	* agent.h: Declare: agent_pksign_do.
	(struct server_control_s): New member: raw_value.

	* pksign.c (do_encode_md): New argument: raw_value; support
	generation of raw (non-pkcs1) data objects; adjust callers.
	(agent_pksign_do): New function, based on code ripped
	out from agent_pksign.
	(agent_pksign): Use agent_pksign_do.

	* command.c (start_command_handler): Set ctrl.digest.raw_value.

2004-09-09  Werner Koch  <wk@g10code.de>

	* gpg-agent.c (check_for_running_agent): New.
	(main): The default action is now to check for an already running
	agent.
	(parse_rereadable_options): Set logfile only on reread.
	(main): Do not print the "is development version" note.

2004-08-20  Werner Koch  <wk@g10code.de>

	* gpg-agent.c: New option --max-cache-ttl.  Suggested by Alexander
	Belopolsky.
	* cache.c (housekeeping): Use it here instead of the hardwired
	default of 1 hour.

	* query.c (start_pinentry): Use a timeout for the pinentry lock.

2004-08-18  Werner Koch  <wk@g10code.de>

	* protect-tool.c (get_passphrase): Make sure that the default
	prompts passed to gpg-agent are utf-8 encoded. Add new prompt values.
	(import_p12_file, import_p12_file, export_p12_file): Changed calls
	to get_passphrase so that better prompts are displayed.
	(get_new_passphrase): New.

2004-07-22  Werner Koch  <wk@g10code.de>

	* trustlist.c (read_list): Allow colons in the fingerprint.
	(headerblurb): Rephrased.

	* gpg-agent.c (handle_connections): Increase the stack size ot 256k.

2004-06-20  Moritz Schulte  <moritz@g10code.com>

	* gpg-agent.c: Include <sys/stat.h> (build fix for BSD).

2004-05-11  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (handle_signal): Reload the trustlist on SIGHUP.
	(start_connection_thread): Hack to simulate a ticker.
	* trustlist.c (agent_trustlist_housekeeping)
	(agent_reload_trustlist): New.  Protected all global functions
	here with a simple counter which is sufficient for Pth.

2004-05-03  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c: Remove help texts for options lile --lc-ctype.
	(main): New option --allow-mark-trusted.
	* trustlist.c (agent_marktrusted): Use it here.

2004-04-30  Werner Koch  <wk@gnupg.org>

	* protect-tool.c: New option --enable-status-msg.
	(store_private_key): Print status messages for imported keys.
	(read_and_unprotect): Ditto for bad passphrase.

	* gpg-agent.c (parse_rereadable_options): New arg REREAD.  Allow
	changing oLogFile.
	(current_logfile): New.

2004-04-26  Werner Koch  <wk@gnupg.org>

	* call-scd.c (start_scd): Do not register an event signal if we
	are running as a pipe server.

2004-04-21  Werner Koch  <wk@gnupg.org>

	* call-scd.c (start_scd): Send event-signal option. Always check
	that the scdaemon is still running.

	* gpg-agent.c (handle_signal): Do not use SIGUSR{1,2} anymore for
	changing the verbosity.

2004-04-16  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Tell the logging code that we are running
	detached.

2004-04-06  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Use new libgcrypt thread library register
	scheme.

2004-03-23  Marcus Brinkmann  <marcus@g10code.de>

	* gpg-agent.c (main): For now, always print the default config
	file name for --gpgconf-list.

2004-03-17  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main) <gpgconf>: Fixed default value quoting.

2004-03-16  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (parse_rereadable_options): Use the new
	DEFAULT_CACHE_TTL macro.
	(main): Updated --gpgconf-list output.

2004-02-21  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_passwd): Take acount of a key description.

	* genkey.c (reenter_compare_cb): Do not set the error text.
	(agent_protect_and_store, agent_genkey): Force a re-enter after a
	non-matching passphrase.
	* query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed
	all callers.

2004-02-19  Werner Koch  <wk@gnupg.org>

	* protect-tool.c: New options --have-cert and --prompt.
	(export_p12_file): Read a certificate from STDIN and pass it to
	p12_build.  Detect a keygrip and construct the filename in that
	case.  Unprotcet a key if needed.  Print error messages for key
	formats we can't handle.
	(release_passphrase): New.
	(get_passphrase): New arg PROMPTNO. Return the allocated
	string. Changed all callers.

	* minip12.c: Revamped the build part.
	(p12_build): New args CERT and CERTLEN.

2004-02-18  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (main): Setup the used character set.
	* gpg-agent.c (main): Ditto.

	* gpg-agent.c (set_debug): New.  New option --debug-level.
	(main): New option --gpgconf-list.

2004-02-17  Werner Koch  <wk@gnupg.org>

	* pksign.c (do_encode_md): Cleaned up by using gcry_sexp_build.

	* Makefile.am (gpg_protect_tool_SOURCES): Removed
	simple-pwquery.[ch], as we once moved it to ../common.

2004-02-13  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_setkeydesc): New.
	(register_commands): Add command SETKEYDESC.
	(cmd_pksign, cmd_pkdecrypt): Use the key description.
	(reset_notify): Reset the description.
	* findkey.c (unprotect): Add arg DESC_TEXT.
	(agent_key_from_file): Ditto.
	* pksign.c (agent_pksign): Ditto.
	* pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an
	unsigned char*.

	* protect-tool.c (main): New options --no-fail-on-exist, --homedir.
	(store_private_key): Use them here.

2004-02-12  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (read_file, main): Allow reading from stdin.

	* Makefile.am: Include cmacros.am for common flags.
	(libexec_PROGRAMS): Put gpg-protect-tool there.

2004-02-10  Werner Koch  <wk@gnupg.org>

	* minip12.c (parse_bag_encrypted_data): Finished implementation.
	(p12_parse): Add callback args.
	* protect-tool.c (import_p12_cert_cb): New.
	(import_p12_file): Use it.

2004-02-06  Werner Koch  <wk@gnupg.org>

	* minip12.c (crypt_block): Add arg CIPHER_ALGO; changed all callers.
	(set_key_iv): Add arg KEYBYTES; changed caller.

2004-02-03  Werner Koch  <wk@gnupg.org>

	* findkey.c (agent_key_from_file): Extra paranoid wipe.
	* protect.c (agent_unprotect): Ditto.
	(merge_lists): Ditto. Add arg RESULTLEN.
	* pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in
	debug mode.

	* protect.c: Add DSA and Elgamal description.

2004-01-29  Werner Koch  <wk@gnupg.org>

	* agent.h (server_control_s): Add connection_fd field.
	* command.c (start_command_handler): Init it here.
	* gpg-agent.c (agent_init_default_ctrl): and here.
	* call-scd.c: Add the CTRL arg to all functions calling start_scd
	and pass it to start_scd.  Changed all callers
	(start_scd): Keep track of the current active connection.
	(agent_reset_scd): New.
	* command.c (start_command_handler): Call it here.
	* learncard.c (agent_handle_learn): Add arg CTRL; changed caller.
	(send_cert_back): Ditto.

2004-01-28  Werner Koch  <wk@gnupg.org>

	* trustlist.c (agent_marktrusted): Check whether the trustlist is
	writable.

2004-01-27  Werner Koch  <wk@gnupg.org>

	* sexp-parse.h: Moved to ../common.

2004-01-24  Werner Koch  <wk@gnupg.org>

	* call-scd.c (atfork_cb): New.
	(start_scd): Make sure secmem gets cleared.
	* query.c  (atfork_cb): New.
	(start_pinentry): Make sure secmem gets cleared.

2004-01-16  Werner Koch  <wk@gnupg.org>

	* findkey.c (agent_key_from_file): Now return an error code so
	that we have more detailed error messages in the upper layers.
	This fixes the handling of pinentry's cancel button.
	* pksign.c (agent_pksign): Changed accordingly.
	* pkdecrypt.c (agent_pkdecrypt): Ditto.
	* command.c (cmd_passwd): Ditto.

2003-12-16  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Set the prefixes for assuan logging.

2003-12-15  Werner Koch  <wk@gnupg.org>

	* protect.c (do_encryption): Use gcry_create_nonce instad of the
	obsolete WEAK_RANDOM.

2003-11-20  Werner Koch  <wk@gnupg.org>

	* sexp-parse.h (snext): Don't use atoi_1 and digitp macros, so
	that this file is useful by other applications too.

2003-10-27  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_get_confirmation): New command.

2003-08-20  Timo Schulz  <twoaday@freakmail.de>

	* pksign.c (do_encode_md): Allocate enough space. Cast md
	byte to unsigned char to prevent sign extension.

2003-08-14  Timo Schulz  <twoaday@freakmail.de>

	* pksign.c (do_encode_md): Due to the fact pkcs#1 padding
	is now in Libgcrypt, use the new interface.

2003-07-31  Werner Koch  <wk@gnupg.org>

	* Makefile.am (gpg_agent_LDADD): Added INTLLIBS.
	(gpg_protect_tool_SOURCES): Added simple-pwquery.[ch]

2003-07-27  Werner Koch  <wk@gnupg.org>

	Adjusted for gcry_mpi_print and gcry_mpi_scan API change.

2003-07-15  Werner Koch  <wk@gnupg.org>

	* simple-pwquery.c, simple-pwquery.h:  Moved to ../common.
	* Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
	Removed it from xx_SOURCES.

2003-07-04  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (handle_connections): Kludge to allow use of Pth 1
	and 2.

2003-06-30  Werner Koch  <wk@gnupg.org>

	* call-scd.c (learn_status_cb): Store the serialno in PARM.

2003-06-26  Werner Koch  <wk@gnupg.org>

	* call-scd.c (agent_card_serialno): Don't do a RESET anymore.

2003-06-25  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_scd): New.
	* call-scd.c (agent_card_scd): New.
	* divert-scd.c (divert_generic_cmd): New

	* call-scd.c (agent_card_learn): New callback args SINFO.
	(learn_status_cb): Pass all other status lines to the sinfo
	callback.
	* learncard.c (release_sinfo, sinfo_cb): New.
	(agent_handle_learn): Pass the new cb to the learn function and
	pass the collected information back to the client's assuan
	connection.

	* gpg-agent.c (main): Moved pth_init before gcry_check_version.

2003-06-24  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (handle_connections): Adjusted for Pth 2.0

	Adjusted for changes in the libgcrypt API. Some more fixes for the
	libgpg-error stuff.

2003-06-04  Werner Koch  <wk@gnupg.org>

	Renamed error codes from INVALID to INV and removed _ERROR suffixes.

2003-06-03  Werner Koch  <wk@gnupg.org>

	Changed all error codes in all files to the new libgpg-error scheme.

	* agent.h: Include gpg-error.h and errno.h
	* Makefile.am: Link with libgpg-error

	* query.c: assuan.h is now a system header.
	* genkey.c (agent_genkey): Fixed silly use of xmalloc by
	xtrymalloc.

2003-04-29  Werner Koch  <wk@gnupg.org>

	* command.c (register_commands): Adjusted for new Assuan semantics.

	* Makefile.am: Don't override LDFLAGS.

2002-12-04  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c: New variable config_filename.
	(parse_rereadable_options): New.
	(main): Use it here.  Add setting of default values, set
	config_filename.
	(reread_configuration): Filled with actual code.

2002-12-03  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (read_key): Don't run make_canonical on a NULL
	buffer.

	* command.c (parse_hexstring): New.
	(cmd_sethash): Use it.
	(parse_keygrip): New.
	(cmd_havekey, cmd_sigkey): Use it.
	(cmd_passwd): New.
	* genkey.c (agent_protect_and_store): New.
	(store_key): Add arg FORCE.
	(agent_genkey): Pass false to this force of store_key.

2002-11-13  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Switch all messages to utf-8.

	* simple-pwquery.c (agent_send_all_options): Use $GPG_TTY and
	stdin with ttyname.

	* cache.c (new_data): Uiih - /sizeof d/sizeof *d/.

2002-11-10  Werner Koch  <wk@gnupg.org>

	* command.c (option_handler): Fix keep_tty check.

2002-11-06  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Make sure we have a default ttyname.
	* command.c (option_handler): Check opt.keep_tty here
	* query.c (start_pinentry): but not anymore here.

2002-11-05  Werner Koch  <wk@gnupg.org>

	* agent.h (opt,server_control_s): Move display and lc_ variables
	to the control struct so that they are per connection.
	* gpg-agent.c (agent_init_default_ctrl): New.
	(main): Assign those command line options to new default_* variables.
	Reset DISPLAY in server mode so that tehre is no implicit default.
	* command.c (start_command_handler): Initialize and deinitialize
	the control values.
	(option_handler): Work on the ctrl values and not on the opt.
	* query.c (start_pinentry): New argument CTRL to set the display
	connection specific.  Changed all callers to pass this value.
	(agent_askpin,agent_get_passphrase,agent_get_confirmation): Add
	CTRL arg and pass it ot start_pinentry.
	* command.c (cmd_get_passphrase): Pass CTRL argument.
	* trustlist.c (agent_marktrusted):  Add CTRL argument
	* command.c (cmd_marktrusted): Pass CTRL argument
	* divert-scd.c (ask_for_card):  Add CTRL arg.
	(divert_pksign,divert_pkdecrypt): Ditto.  Changed caller.
	(getpin_cb): Use OPAQUE to pass the CTRL variable.  Changed both
	users.
	* findkey.c (unprotect): Add CTRL arg.
	(agent_key_from_file): Ditto.

	* query.c (unlock_pinentry): Disconnect the pinentry so that we
	start a new one for each request.  This is required to support
	clients with different environments (e.g. X magic cookies).

2002-09-05  Neal H. Walfield  <neal@cs.uml.edu>

	* gpg-agent.c (main) [USE_GNU_PTH]: No need to call
	assuan_set_io_func as assuan is smart.

2002-09-25  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (handle_signal): Flush cache on SIGHUP.
	* cache.c (agent_flush_cache): New.

	* gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
	* query.c (start_pinentry): Implement them.  The option passing
	needs more thoughts.

2002-09-09  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (create_private_keys_directory)
	(create_directories): New.
	(main): Try to create a home directory.

2002-09-04  Neal H. Walfield  <neal@g10code.de>

	* gpg-agent.c (main): Use sigaction, not signal.

2002-09-03  Neal H. Walfield  <neal@g10code.de>

	* findkey.c: Include <fcntl.h>.
	(agent_write_private_key): Prefer POSIX compatibity, open and
	fdopen, over the simplicity of GNU extensions, fopen(file, "x").

2002-08-22  Werner Koch  <wk@gnupg.org>

	* query.c (agent_askpin): Provide the default desc text depending
	on the pininfo.  Do the basic PIN verification only when
	min_digits is set.

2002-08-21  Werner Koch  <wk@gnupg.org>

	* query.c (agent_askpin): Hack to show the right default prompt.
	(agent_get_passphrase): Ditto.

	* trans.c: Removed and replaced all usages with standard _()

	* divert-scd.c (getpin_cb): Pass a more descritive text to the
	pinentry.

	* Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
	* protect-tool.c: Removed the note about internal use only.

	* gpg-agent.c (main): New option --daemon so that the program is
	not accidently started in the background.

2002-08-16  Werner Koch  <wk@gnupg.org>

	* call-scd.c (learn_status_cb): Handle CERTINFO status.
	(agent_card_learn): Add args for certinfo cb.
	* learncard.c (release_certinfo,certinfo_cb): New.
	(send_cert_back): New. With factored out code from ..
	(agent_handle_learn): here.  Return certinfo stuff.

2002-07-26  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): New option --ignore-cache-for-signing.
	* command.c (option_handler): New server option
	use-cache-for-signing defaulting to true.
	(cmd_pksign): handle global and per session option.
	* findkey.c (agent_key_from_file, unprotect): New arg
	ignore_cache.  Changed all callers.
	* pksign.c (agent_pksign): Likewise.

2002-06-29  Werner Koch  <wk@gnupg.org>

	* query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
	* call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.

2002-06-28  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (export_p12_file): New.
	(main): New command --p12-export.
	* minip12.c (create_final,p12_build,compute_tag_length): New.
	(store_tag_length): New.

2002-06-27  Werner Koch  <wk@gnupg.org>

	* minip12.c (crypt_block): Renamed from decrypt_block, add arg to
	allow encryption.

	* Makefile.am (pkglib_PROGRAMS): Put protect-tool there.

	* findkey.c (agent_write_private_key,agent_key_from_file)
	(agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
	* gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.

	* protect-tool.c (store_private_key): New.
	(import_p12_file): Store the new file if requested.
	(main): New options --force and --store.

	* gpg-agent.c (main): Set a global flag when running detached.
	* query.c (start_pinentry): Pass the list of FD to keep in the
	child when not running detached.
	* call-scd.c (start_scd): Ditto.

2002-06-26  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted)
	(cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_get_passphrase)
	(cmd_learn): Print an error message for a failed operation.

	* simple-pwquery.c, simple-pwquery.h: New.
	* protect-tool. (get_passphrase): New, used to get a passphrase
	from the agent if none was given on the command line.

2002-06-25  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (rsa_key_check): New.
	(import_p12_file): New.
	(main): New command --p12-import.
	* minip12.c, minip12.h: New.

2002-06-24  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (read_file): New.
	(read_key): Factored most code out to read_file.

2002-06-17  Werner Koch  <wk@gnupg.org>

	* agent.h: Add a callback function to the pin_entry_info structure.
	* query.c (agent_askpin): Use the callback to check for a correct
	PIN.  Removed the start_err_text argument because it is not
	anymore needed; changed callers.
	* findkey.c (unprotect): Replace our own check loop by a callback.
	(try_unprotect_cb): New.
	* genkey.c (reenter_compare_cb): New.
	(agent_genkey): Use this callback here.  Fixed setting of the pi2
	variable and a segv in case of an empty PIN.

	* divert-scd.c (getpin_cb): Removed some unused stuff and
	explained what we still have to change.

2002-06-12  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): New option --disable-pth.

2002-06-11  Werner Koch  <wk@gnupg.org>

	* protect-tool.c: Add command --show-keygrip
	(show_keygrip): New.

2002-05-23  Werner Koch  <wk@gnupg.org>

	* call-scd.c: Seirialized all scdaeom access when using Pth.

	* cache.c: Made the cache Pth-thread-safe.
	(agent_unlock_cache_entry): New.
	* findkey.c (unprotect): Unlock the returned cache value.
	* command.c (cmd_get_passphrase): Ditto.

	* gpg-agent.c (main): Register pth_read/write with Assuan.

2002-05-22  Werner Koch  <wk@gnupg.org>

	* query.c: Serialized all pinentry access when using Pth.

	* gpg-agent.c (handle_signal,start_connection_thread)
	(handle_connections): New
	(main): Use the new Pth stuff to allow concurrent connections.
	* command.c (start_command_handler): Add new arg FD so that the
	fucntion can also be used for an already connected socket.
	* Makefile.am: Link with Pth.

2002-05-14  Werner Koch  <wk@gnupg.org>

	* cache.c (housekeeping, agent_put_cache): Use our time() wrapper.

2002-04-26  Werner Koch  <wk@gnupg.org>

	* cache.c (agent_put_cache): Reinitialize the creation time and
	the ttl when reusing a slot.

	* call-scd.c (start_scd): Print debug messages only with debug
	flags set.
	* query.c (start_pinentry): Ditto.

2002-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* agent.h (agent_get_confirmation): Replace paramter prompt with
	two parameters ok and cancel.
	* query.c (agent_get_confirmation): Likewise.  Implement this.
	* trustlist.c (agent_marktrusted): Fix invocation of
	agent_get_confirmation.
	* divert-scd.c (ask_for_card): Likewise.

2002-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* agent.h (struct opt): Add members display, ttyname, ttytype,
	lc_ctype, and lc_messages.
	* gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
	oTTYtype, oLCctype, and LCmessages.
	(main): Handle these options.
	* command.c (option_handler): New function.
	(register_commands): Register option handler.
	* query.c (start_pinentry): Pass the various display and tty
	options to the pinentry.

2002-04-05  Werner Koch  <wk@gnupg.org>

	* protect-tool.c (show_file): New.  Used as default action.

2002-03-28  Werner Koch  <wk@gnupg.org>

	* divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
	the scdaemon should take care of it.
	(ask_for_card): Hack to not display the trailing zero.

2002-03-11  Werner Koch  <wk@gnupg.org>

	* learncard.c (kpinfo_cb): Remove the content restrictions from
	the keyID.

2002-03-06  Werner Koch  <wk@gnupg.org>

	* learncard.c: New.
	* divert-scd.c (ask_for_card): The serial number is binary so
	convert it to hex here.
	* findkey.c (agent_write_private_key): New.
	* genkey.c (store_key): And use it here.

	* pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
	* divert-scd.c (divert_pkdecrypt): Changed interface and
	implemented it.

2002-03-05  Werner Koch  <wk@gnupg.org>

	* call-scd.c (inq_needpin): New.
	(agent_card_pksign): Add getpin_cb args.
	(agent_card_pkdecrypt): New.

2002-03-04  Werner Koch  <wk@gnupg.org>

	* pksign.c (agent_pksign): Changed how the diversion is done.
	* divert-scd.c (divert_pksign): Changed interface and implemented it.
	(encode_md_for_card): New.
	* call-scd.c (agent_card_pksign): New.

2002-02-28  Werner Koch  <wk@gnupg.org>

	* pksign.c (agent_pksign): Detect whether a Smartcard is to be
	used and divert the operation in this case.
	* pkdecrypt.c (agent_pkdecrypt): Likewise
	* findkey.c (agent_key_from_file): Add optional arg shadow_info
	and have it return information about a shadowed key.
	* protect.c (agent_get_shadow_info): New.

	* protect.c (snext,sskip,smatch): Moved to
	* sexp-parse.h: New file.
	* divert-scd.c: New.

2002-02-27  Werner Koch  <wk@gnupg.org>

	* protect.c (agent_shadow_key): New.

	* command.c (cmd_learn): New command LEARN.
	* gpg-agent.c: New option --scdaemon-program.
	* call-scd.c (start_scd): New. Based on query.c
	* query.c: Add 2 more arguments to all uses of assuan_transact.

2002-02-18  Werner Koch  <wk@gnupg.org>

	* findkey.c (unprotect): Show an error message for a bad passphrase.

	* command.c (cmd_marktrusted): Implemented.
	* trustlist.c (agent_marktrusted): New.
	(open_list): Add APPEND arg.

	* query.c (agent_get_confirmation): New.

2002-02-06  Werner Koch  <wk@gnupg.org>

	* cache.c (housekeeping): Fixed linking in the remove case.

2002-02-01  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c: New option --default-cache-ttl.
	* cache.c (agent_put_cache): Use it.

	* cache.c: Add a few debug outputs.

	* protect.c (agent_private_key_type): New.
	* agent.h: Add PRIVATE_KEY_ enums.
	* findkey.c (agent_key_from_file): Use it to decide whether we
	have to unprotect a key.
	(unprotect): Cache the passphrase.

	* findkey.c (agent_key_from_file,agent_key_available): The key
	files do now require a ".key" suffix to make a script's life
	easier.
	* genkey.c (store_key): Ditto.

2002-01-31  Werner Koch  <wk@gnupg.org>

	* genkey.c (store_key): Protect the key.
	(agent_genkey): Ask for the passphrase.
	* findkey.c (unprotect): Actually unprotect the key.
	* query.c (agent_askpin): Add an optional start_err_text.

2002-01-30  Werner Koch  <wk@gnupg.org>

	* protect.c: New.
	(hash_passphrase): Based on the GnuPG 1.0.6 version.
	* protect-tool.c: New

2002-01-29  Werner Koch  <wk@gnupg.org>

	* findkey.c (agent_key_available): New.
	* command.c (cmd_havekey): New.
	(register_commands): And register new command.

2002-01-20  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_get_passphrase): Remove the plus signs.

	* query.c (start_pinentry): Send no-grab option to pinentry
	* gpg-agent.c (main): Move variable grab as no_grab to agent.h.

2002-01-19  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): Disable core dumps.

	* cache.c: New.
	* command.c (cmd_get_passphrase): Use the cache.
	(cmd_clear_passphrase): Ditto.

	* gpg-agent.c:  Removed unused cruft and implement the socket
	based server.
	(my_strusage): Take bug report address from configure.ac.
	* command.c (start_command_handler): Add an argument to start as
	regular server.
	(start_command_handler): Enable Assuan logging.

2002-01-15  Werner Koch  <wk@gnupg.org>

	* trustlist.c: New.
	* command.c (cmd_istrusted, cmd_listtrusted, cmd_marktrusted): New.

2002-01-07  Werner Koch  <wk@gnupg.org>

	* genkey.c: Store the secret part and return the public part.

2002-01-03  Werner Koch  <wk@gnupg.org>

	* command.c (cmd_get_passphrase): New.
	(cmd_clear_passphrase): New.
	* query.c (agent_get_passphrase): New.

2002-01-02  Werner Koch  <wk@gnupg.org>

	* genkey.c: New.
	* command.c (cmd_genkey): New.

	* command.c (rc_to_assuan_status): Removed and changed all callers
	to use map_to_assuan_status.

2001-12-19  Werner Koch  <wk@gnupg.org>

	* keyformat.txt: New.

2001-12-19  Marcus Brinkmann  <marcus@g10code.de>

	* query.c (start_pinentry): Add new argument to assuan_pipe_connect.

2001-12-18  Werner Koch  <wk@gnupg.org>

	* Makefile.am: Use LIBGCRYPT macros

2001-12-14  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): New option --batch.  New option --debug-wait
	n, so that it is possible to attach gdb when used in server mode.
	* query.c (agent_askpin): Don't ask in batch mode.

	* command.c: Removed the conversion macros as they are now in
	../common/util.h.

2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* query.c (LINELENGTH): Removed.
	(agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.

2001-11-19  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c: Removed all GUI code, removed code for old
	protocol.  New code to use the Assuan protocol as a server and
	also to communicate with a new ask-passphrase utility.

2000-11-22  Werner Koch  <wk@gnupg.org>

	* gpg-agent.c (main): csh support by Dan Winship, new options --sh
	and --csh and set default by consulting $SHELL.

Mon Aug 21 17:59:17 CEST 2000  Werner Koch  <wk@openit.de>

	* gpg-agent.c (passphrase_dialog): Cleanup the window and added the
        user supplied text to the window.
        (main): Fixed segv in gtk_init when used without a command to start.

	* gpg-agent.c: --flush option.
        (req_flush): New.
        (req_clear_passphrase): Implemented.

Fri Aug 18 14:27:14 CEST 2000  Werner Koch  <wk@openit.de>

	* gpg-agent.c: New.
	* Makefile.am: New.


 Copyright 2001, 2002, 2003, 2004, 2005,
	   2007, 2008, 2009, 2010 Free Software Foundation, Inc.

 This file is free software; as a special exception the author gives
 unlimited permission to copy and/or distribute it, with or without
 modifications, as long as this notice is preserved.

 This file is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.