version 0.14
[gnuk/gnuk.git] / ChangeLog
1 2011-10-07  NIIBE Yutaka  <gniibe@fsij.org>
2
3         * Version 0.14.
4         * src/usb_desc.c (gnukStringSerial): Updated.
5
6         * src/random.c (random_init): Call neug_prng_reseed.
7
8 2011-10-06  NIIBE Yutaka  <gniibe@fsij.org>
9
10         * src/Makefile.in (random_bits): Remove.
11
12         * src/openpgp.c (GPGthread): Remove unused event message.
13
14         * src/main.c (main): Call random_init.
15
16         * src/gnuk.ld.in (__process_stack_size__): Fix.
17         (.gnuk_random): Removed.
18
19         * src/flash.c (flash_erase_binary, flash_write_binary): Remove
20         support of random_byte in flash ROM.
21
22         * src/neug.c (adccb): Use old API (was: chEvtSignalFlagsI).
23         (adccb_err): Remove.
24         (rng_gen, rng): Add the last argument adccb for adcStartConversion:
25         This is old API of ADC driver.
26         (adcgrpcfg): Remove callbacks, add CONT and SWSTART: This is old
27         API of ADC driver.
28         (adccb): Remove the first argument: This is old API of ADC driver.
29         (neug_wait_full): New.
30
31         * ChibiOS_2.0.8/os/hal/platforms/STM32/adc_lld.h (ADC_SAMPLE_1P5):
32         Add (from new API).
33
34         * src/random.c (random_init): New.
35         (random_bytes_get, random_bytes_free, get_salt): Use NeuG.
36
37         * src/Makefile.in (CSRC): Add neug.c.
38
39         * src/neug.c: New.  Verbatim copy of NeuG/src/random.c.
40
41         * boards/common/mcuconf-common.h (USE_STM32_ADC1): TRUE for NewG RNG.
42         * src/chconf.h (CH_USE_SEMAPHORES): TRUE as ADC driver requires it.
43         * src/halconf.h (CH_HAL_USE_ADC); TRUE for NewG RNG.
44
45 2011-07-22  NIIBE Yutaka  <gniibe@fsij.org>
46
47         * boards/OLIMEX_STM32_H103/board.h (BOARD_NAME): Fixed.
48
49         * boards/STBEE_MINI/mcuconf.h: Added missing include of
50         mcuconf-common.h.
51
52 2011-07-04  NIIBE Yutaka  <gniibe@fsij.org>
53
54         * ChibiOS_2.0.8/os/ports/GCC/ARMCMx/chcore_v7m.c
55         (_port_irq_epilogue, _port_switch_from_isr): Apply a patch of 2.2.6.
56
57         * ChibiOS_2.0.8/os/hal/platforms/STM32/adc_lld.h: Apply a patch of
58         ADC from the branch of ChibiOS_2.0.X.
59
60 2011-06-15  NIIBE Yutaka  <gniibe@fsij.org>
61
62         * Version 0.13.
63         * src/usb_desc.c (gnukStringSerial): Updated.
64
65 2011-06-08  NIIBE Yutaka  <gniibe@fsij.org>
66
67         * polarssl-0.14.0/include/polarssl/bn_mul.h [__arm__]
68         (MULADDC_1024_CORE, MULADDC_1024_LOOP): New.
69         * polarssl-0.14.0/library/bignum.c (mpi_mul_hlp): Use
70         MULADDC_1024_LOOP.
71
72 2011-05-31  NIIBE Yutaka  <gniibe@fsij.org>
73
74         * polarssl-0.14.0/include/polarssl/bn_mul.h [__arm__]
75         (MULADDC_HUIT, MULADDC_INIT, MULADDC_CORE, MULADDC_STOP): Tweak.
76
77 2011-05-27  NIIBE Yutaka  <gniibe@fsij.org>
78
79         * tool/gnuk_put_binary.py (main): Confirm Serial ID is written
80         correctly.
81
82         * src/openpgp.c (cmd_write_binary): Fix FILE_EF_SERIAL comparison.
83
84         * src/gnuk.ld.in (.gnuk_random, .gnuk_ch_certificate): Put LONG to
85         have CONTENTS.
86
87         * polarssl-0.14.0/include/polarssl/bn_mul.h [__arm__]
88         (MULADDC_HUIT): New.
89
90 2011-05-26  NIIBE Yutaka  <gniibe@fsij.org>
91
92         * polarssl-0.14.0/include/polarssl/bn_mul.h [__arm__]
93         (MULADDC_INIT): Add ADDS instruction to clear of carry flag.
94         (MULADDC_CORE): Tune to 6 instructions and less registers.
95         (MULADDC_STOP): Add ADC instruction to save carry flag.
96
97 2011-05-25  NIIBE Yutaka  <gniibe@fsij.org>
98
99         * tool/hub_ctrl.py: New.  Port of original C implementation.
100
101 2011-05-16  NIIBE Yutaka  <gniibe@fsij.org>
102
103         * src/main.c (main): Call flash_unlock at the beginning.
104         (device_initialize_once): Don't call flash_unlock here.
105         * src/flash.c (flash_init): Likewise.
106
107         * src/openpgp.c (cmd_select_file): Don't use write_res_apdu.
108         (set_res_apdu): Rename from write_res_apdu.  Just SW1 and SW2.
109
110 2011-05-13  NIIBE Yutaka  <gniibe@fsij.org>
111
112         * Version 0.12.
113
114 2011-05-12  NIIBE Yutaka  <gniibe@fsij.org>
115
116         * src/openpgp.c (cmd_pso, cmd_internal_authenticate)
117         (cmd_update_binary, cmd_write_binary): Don't check pw locked.
118
119         * tool/dfuse.py (DFU_STM32.verify): Add missing colon.
120         * tool/dfuse.py (get_device): Restrict to STMicro DfuSe.
121
122         * tool/gnuk_put_binary.py (main): Add -p option to enter password.
123
124         * src/ac.c (verify_user_0): New.
125         (verify_pso_cds, verify_admin_0): Use verify_user_0.
126         * src/openpgp.c (cmd_change_password): Use verify_user_0.
127
128         * src/random.c (get_salt): Rename from get_random.
129         (random_bytes_get, random_bytes_free): It's 16-byte.
130
131         * src/ac.c (verify_admin_0): Use PW_ERR_PW1 counter when
132         authenticated by PW1.
133
134 2011-05-11  NIIBE Yutaka  <gniibe@fsij.org>
135
136         * src/ac.c (verify_pso_cds, verify_other): Fail (with no counter
137         update) if key is not registered yet.
138         (verify_admin_0): Compare to OPENPGP_CARD_INITIAL_PW3 when empty
139         PW3 and non-empty PW1 but signing key is not registered yet.
140
141         * tool/gnuk_put_binary.py: New implementation by pyscard.
142
143         * src/main.c (device_initialize_once): New.
144         * src/usb_prop.c (gnukStringSerial): Move to...
145         * src/usb_desc.c (gnukStringSerial): here.  Bump version to 0.12.
146         Fill by 0xff.
147         * src/usb_prop.c (gnuk_device_init)
148         (gnuk_device_GetStringDescriptor): Don't use RAM for
149         gnukStringSerial, use ROM like other string descriptor.
150         * src/usb_desc.c (String_Descriptor): Add gnukStringSerial.
151
152         * src/openpgp-do.c (gpg_get_pw1_lifetime): Make static.
153         (gpg_do_load_prvkey, gpg_do_write_prvkey): Use kdi.
154         (gpg_increment_digital_signature_counter): Call gpg_get_pw1_lifetime.
155         * src/openpgp.c (cmd_pso): Follow the change.
156         * src/flash.c (keystore_pool): Remove.  Use &_keystore_pool.
157         * src/ac.c (auth_status): Don't assign 0 as it's automatically
158         cleared.
159
160 2011-05-10  NIIBE Yutaka  <gniibe@fsij.org>
161
162         * src/openpgp-do.c (gpg_pw_locked): Rename from gpg_passwd_locked.
163         (gpg_pw_get_err_counter): Rename from gpg_get_pw_err_counter.
164         (gpg_pw_reset_err_counter): Rename from gpg_reset_pw_err_counter.
165         (gpg_pw_increment_err_counter): Rename from gpg_increment_err_counter.
166         * src/ac.c, src/openpgp.c, src/gnuk.h: Follow the change.
167
168         Bug fixes.
169         * src/openpgp.c (cmd_reset_user_password, cmd_change_password)
170         * src/openpgp-do.c (proc_resetting_code): Fix check of return value.
171         * src/ac.c (ac_fini): Clear keystring_md_pw3.
172
173         Prevent observation of PW3 is emptiness by PW3's error counter.
174         Support verify_admin by PW1 when PW3 is empty.
175         * src/ac.c (admin_authorized): New.
176         (verify_admin_0): Set admin_authorized.
177         * src/openpgp-do.c (proc_resetting_code): Use admin_authorized.
178         (gpg_do_write_prvkey): Clear dek_encrypted_3 when keystring_admin
179         is NULL.
180         (proc_key_import): Checking admin_authorized, set keystring_admin.
181         * src/openpgp.c (cmd_reset_user_password): Use admin_authorized.
182
183 2011-04-18  NIIBE Yutaka  <gniibe@fsij.org>
184
185         * gnuk.svg: Updated.
186
187 2011-04-15  NIIBE Yutaka  <gniibe@fsij.org>
188
189         * Version 0.11.
190
191         * src/usb_prop.c (gnukStringSerial): Updated.
192
193 2011-04-11  NIIBE Yutaka  <gniibe@fsij.org>
194
195         * tool/dfuse.py (DFU_STM32.verify): support data size of non-1-KiB.
196
197 2011-02-24  NIIBE Yutaka  <gniibe@fsij.org>
198
199         * src/usb_prop.c (gnuk_device_SetInterface): Fix argument to
200         ClearDTOG_TX.
201
202 2011-02-10  NIIBE Yutaka  <gniibe@fsij.org>
203
204         * Version 0.10.
205
206         * src/configure, src/Makefile.in (BOARD_DIR): New.
207
208         * boards/CQ_STARM/board.mk, boards/OLIMEX_STM32_H103/board.mk:
209         Removed.
210         * boards/STBEE/board.mk, boards/STBEE_MINI/board.mk: Removed.
211         * boards/STM32_PRIMER2/board.mk, boards/STM8S_DISCOVERY/board.mk:
212         Removed.
213
214         * src/Makefile.in (OUTFILES): Don't include random_bits.
215
216 2011-02-09  NIIBE Yutaka  <gniibe@fsij.org>
217
218         * src/usb_prop.c (gnukStringSerial): Updated.
219
220         * tool/gnuk_put_binary.py (gnuk_token.__del__): Removed.
221         Releasing the interface is done in PyUSB.
222
223         * tool/dfuse.py (DFU_STM32.__del__): Removed.
224
225         * src/openpgp.c (cmd_write_binary): Support random bits and card
226         holder certificate as well.
227
228         * src/openpgp-do.c (do_openpgpcard_aid): Add volatile to prevent
229         compiler optimization to access AID.
230
231 2011-02-08  NIIBE Yutaka  <gniibe@fsij.org>
232
233         * tool/gnuk_put_binary.py: Renamed (was: gnuk_update_binary.py).
234         (gnuk_token.cmd_write_binary): New.
235         (main): Support writing serial number.
236
237         * GNUK_SERIAL_NUMBER: Renamed (was: FSIJ_SERIAL_NUMBER).
238
239         * src/config.h.in (@SERIAL_DEFINE@): Removed.
240
241         * src/gnuk.h (FILEID_SERIAL_NO): New.
242
243         * src/openpgp.c (INS_WRITE_BINARY, cmd_write_binary): New.
244
245         * src/configure: Remove --with-fixed-serial support.
246
247         * src/openpgp-do.c (do_openpgpcard_aid): Remove support of
248         SERIAL_NUMBER_IN_AID.
249
250         * src/flash.c (flash_write_binary): Support FILEID_SERIAL_NO.
251
252 2011-02-04  NIIBE Yutaka  <gniibe@fsij.org>
253
254         * tool/gnuk_update_binary.py: Support updating random bits.
255
256         * src/random.c (random_bits_start): Renamed.
257         (random_bytes_get): Check initial erased state.
258
259         * src/Makefile.in (random-data.o): Removed.
260
261         * src/gnuk.ld.in (.gnuk_random): Don't have .gnuk_random any more.
262
263         * src/flash.c (flash_erase_binary): Support FILEID_RANDOM.
264         (flash_write_binary): Ditto.
265
266         * src/openpgp.c (cmd_reset_user_password): Fix PINPAD_SUPPORT case
267         with reset code.
268
269 2011-02-01  NIIBE Yutaka  <gniibe@fsij.org>
270
271         * Version 0.9.
272
273         * src/openpgp-do.c (extended_capabilities): Change value for card
274         holder certificate.
275
276         * src/usb_prop.c (gnuk_device_SetInterface): New.
277
278 2011-01-29  NIIBE Yutaka  <gniibe@fsij.org>
279
280         * src/usb_prop.c (gnuk_device_Get_Interface_Setting): Handle the
281         case where we have multiple interfaces.
282
283 2011-01-28  NIIBE Yutaka  <gniibe@fsij.org>
284
285         * tool/gnuk_update_binary.py: New.
286
287         * src/openpgp-do.c (gpg_do_get_data): Fix length adding two for
288         status word at the end and adding four for the tag and the length.
289
290         * src/usb-icc.c (icc_handle_data): Fix decrementing res_APDU_size.
291         (icc_power_off): Status should be the one *after* power off.
292
293         * src/openpgp.c (cmd_update_binary): Fix return code.
294
295 2011-01-27  NIIBE Yutaka  <gniibe@fsij.org>
296
297         * src/usb-icc.c (res_APDU_pointer): New.
298         (icc_handle_data, USBthread): Handle res_APDU_pointer.
299
300         * src/openpgp.h (GPG_COMMAND_NOT_ALLOWED): New.
301
302         * src/openpgp.c (INS_UPDATE_BINARY, FILE_EF_CH_CERTIFICATE)
303         (FILE_EF_RANDOM, cmd_update_binary): New.
304         (process_command_apdu): Initialize res_APDU_pointer.
305
306         * src/openpgp-do.c (gpg_do_get_data): Handle GPG_DO_CH_CERTIFICATE.
307
308         * src/gnuk.ld.in (.gnuk_ch_certificate): New.
309
310         * src/flash.c (flash_check_blank, flash_erase_binary)
311         (flash_write_binary): New.
312
313         * src/openpgp-do.c (gpg_do_table): Exclude GPG_DO_CH_CERTIFICATE.
314
315         * src/openpgp.c (cmd_reset_user_password): Add PINPAD_SUPPORT.
316
317         * src/gnuk.ld.in: Fix alignment and filling.
318
319 2011-01-26  NIIBE Yutaka  <gniibe@fsij.org>
320
321         * boards/STBEE/mcuconf.h: New.
322         * boards/STBEE/board.mk: New.
323         * boards/STBEE/board.h: New.
324         * boards/STBEE/board.c: New.
325
326         * tool/dfuse.py (DFU_STM32.verify): Add double ll_clear_status.
327
328         * src/configure (target): Add STBEE.
329
330 2011-01-25  NIIBE Yutaka  <gniibe@fsij.org>
331
332         * src/openpgp.c (cmd_pso): Support DigestInfo by MD5 (for opensc).
333
334 2011-01-22  NIIBE Yutaka  <gniibe@fsij.org>
335
336         * src/openpgp.c (cmd_pgp_gakp): Handle case of non-extended Lc.
337         (cmd_select_file): Return DF name when FCI is requested.
338
339         * src/openpgp-do.c (copy_do): Don't add tag if not requested.
340
341         * src/gnuk.h (memmove): Add declaration.
342
343 2011-01-21  NIIBE Yutaka  <gniibe@fsij.org>
344
345         * src/openpgp-do.c (copy_do): Fix off-by-one error.
346
347         * src/openpgp.c (get_pinpad_input): Ifdef-out PINPAD_SUPPORT.
348
349 2011-01-19  NIIBE Yutaka  <gniibe@fsij.org>
350
351         * Version 0.8.
352
353         * src/pin-cir.c (pin_main): Fix typo, call cir_ext_disable.
354
355         * src/usb_prop.c (gnukStringSerial): Updated.
356
357         * src/pin-dial.c: New.
358
359         * boards/STBEE_MINI/board.c (hwinit1): Add PINPAD_DIAL_SUPPORT.
360         (dial_sw_disable, dial_sw_enable, EXTI2_IRQHandler): New.
361
362         * src/gnuk.h: Add PINPAD_DIAL_SUPPORT.
363
364         * src/usb-icc.c (icc_handle_data): Handle PIN modification.
365
366         * src/usb_desc.c (gnukConfigDescriptor): bPinSupport = 3 when
367         PINPAD_DIAL_SUPPORT is enabled.
368
369 2011-01-18  NIIBE Yutaka  <gniibe@fsij.org>
370
371         * src/pin-cir.c (pin_main): Call cir_ext_disable at the end.
372
373 2011-01-17  NIIBE Yutaka  <gniibe@fsij.org>
374
375         * src/gnuk.h (PIN_INPUT_CURRENT, PIN_INPUT_NEW)
376         (PIN_INPUT_CONFIRM): New.
377
378         * src/pin-cir.c (pin_main): New argument MSG_CODE.
379
380         * src/openpgp.c (get_pinpad_input): New.
381         (cmd_verify): Use get_pinpad_input.
382         (cmd_change_password): Added PINPAD_SUPPORT.
383
384         * src/openpgp.c (cmd_nop): Removed.
385
386         * src/config.h.in: ifdef-out (not for ASSEMBLER).
387
388 2011-01-15  NIIBE Yutaka  <gniibe@fsij.org>
389
390         * Version 0.7.
391
392         * src/usb-icc.c (icc_handle_data): Bug fix: add break for case
393         ICC_STATE_SEND.
394
395 2011-01-14  NIIBE Yutaka  <gniibe@fsij.org>
396
397         * Version 0.6.
398
399         * src/usb_prop.c (gnukStringSerial): Include version number (again).
400
401         * boards/STM8S_DISCOVERY/board.c (hwinit1): Initialize TIM3 and
402         remap TIM3.
403         (cir_ext_disable, cir_ext_enable, EXTI9_5_IRQHandler)
404         (TIM3_IRQHandler): New.
405
406         * boards/STBEE_MINI/board.h (HAVE_7SEGLED): New.
407
408         * boards/STM8S_DISCOVERY/board.h: Include "config.h".
409         (VAL_GPIOBODR): PB0 (TIM3_CH3) is pull-down for PINPAD_SUPPORT.
410
411         * src/pin-cir.c (pindisp): Handle the board with no 7 segment
412         display.
413
414 2011-01-11  NIIBE Yutaka  <gniibe@fsij.org>
415
416         * src/openpgp-do.c (do_openpgpcard_aid): Fix length of res_p;
417
418 2011-01-08  NIIBE Yutaka  <gniibe@fsij.org>
419
420         * src/usb-icc.c (icc_handle_data): Handle the case of
421         ICC_STATE_SEND (back again to the implementation of v0.4).
422         (USBthread): Don't send back larger block (for libccid 1.3.11).
423
424 2011-01-07  NIIBE Yutaka  <gniibe@fsij.org>
425
426         * src/openpgp.c (cmd_read_binary): Call gpg_do_get_data for AID.
427
428         * src/openpgp-do.c (gpg_do_get_data): Added new argument WITH_TAG.
429
430         * src/usb_prop.c (gnuk_device_init)
431         (gnuk_device_GetStringDescriptor): gnukStringSerial with unique
432         chip ID.
433
434         * src/openpgp-do.c (do_openpgpcard_aid): New.
435         (openpgpcard_aid): Removed.
436
437         * boards/common/hw_config.c (unique_device_id): New.
438
439 2011-01-06  NIIBE Yutaka  <gniibe@fsij.org>
440
441         * src/config.h.in (PINPAD_MORE_DEFINE): Added.
442
443         * src/configure: Requiring bash (for variable substitution), added
444         PINPAD.
445
446         * src/Makefile.in: Support PINPAD.
447
448         * src/pin-cir.c (cir_timer_interrupt): Support Sharp protocol.
449
450 2011-01-04  NIIBE Yutaka  <gniibe@fsij.org>
451
452         * src/chconf.h (CH_USE_DYNAMIC): It's TRUE now.
453
454         * src/usb_desc.c (gnukConfigDescriptor): Added PINPAD_SUPPORT.
455
456         * src/pin-cir.c (cir_timer_interrupt): Added CIR_PERIOD_INHIBIT_CHATTER.
457
458 2010-12-29  NIIBE Yutaka  <gniibe@fsij.org>
459
460         * src/pin-cir.c (cir_timer_interrupt): Support Philips RC-5 protocol.
461
462 2010-12-28  NIIBE Yutaka  <gniibe@fsij.org>
463
464         * src/pin-cir.c (cir_timer_interrupt): Support Philips RC-6 protocol.
465
466 2010-12-27  NIIBE Yutaka  <gniibe@fsij.org>
467
468         * src/pin-cir.c (cir_timer_interrupt): Support Sony protocol.
469
470 2010-12-24  NIIBE Yutaka  <gniibe@fsij.org>
471
472         * src/pin-cir.c: New file.
473
474 2010-12-20  NIIBE Yutaka  <gniibe@fsij.org>
475
476         * src/openpgp.c (GPGthread): Added PINPAD_SUPPORT.
477         * boards/STBEE_MINI/mcuconf.h: Simplified.
478         * boards/STBEE_MINI/board.h: Include config.h.
479         (PINPAD_SUPPORT): Added.
480         * boards/STBEE_MINI/board.c (hwinit1): Added PINPAD_SUPPORT.
481
482 2010-12-15  NIIBE Yutaka  <gniibe@fsij.org>
483
484         * src/configure (FLASH_SIZE): Without 'k'.
485         * src/gnuk.ld.in (MEMORY): Append "k" here.
486         (.gnuk_flash): End point should be aligned too.
487
488         * src/config.h.in (@PINPAD_DEFINE@): New.
489         * src/Makefile.in (@PINPAD_MAKE_OPTION@): New.
490         * src/configure (PINPAD_MAKE_OPTION, PINPAD_DEFINE): New.
491
492 2010-12-14  NIIBE Yutaka  <gniibe@fsij.org>
493
494         * src/configure (FLASH_PAGE_SIZE): Always set.
495
496 2010-12-13  NIIBE Yutaka  <gniibe@fsij.org>
497
498         * Version 0.5.
499
500         * src/usb_desc.c (gnukStringSerial): Updated.
501
502 2010-12-10  NIIBE Yutaka  <gniibe@fsij.org>
503
504         * src/usb-cdc-vport.c (Virtual_Com_Port_Data_Setup)
505         (Virtual_Com_Port_NoData_Setup): No check for class&interface
506         request.
507
508         * src/usb-icc.c (ATR): Fixed.
509
510         * src/usb_desc.c (/* ICC Descriptor*/): bcdCCID = 1.1.
511         dwDefaultClock = dwMaximumClock = 3571.
512         dwFeatures 0x00040842.
513
514         * src/usb_prop.c (gnuk_clock_frequencies, gnuk_data_rates): New.
515         (gnuk_nothing_todo): Removed.
516         (gnuk_setup_with_data, gnuk_setup_with_nodata): New.
517         (Device_Property): Changed to call gnuk_setup_with_data and
518         gnuk_setup_with_nodata.
519
520 2010-12-09  NIIBE Yutaka  <gniibe@fsij.org>
521
522         * src/usb-icc.c (icc_power_off): Set icc_data_size = 0 to specify
523         no command APDU.  Signal GPGThread.
524         (icc_handle_data, USBthread): Don't signal main thread any more.
525
526         * src/openpgp.c (GPGthread): Only process the command APDU, if any.
527
528         * src/openpgp-do.c (do_tag_to_nr): Don't call fatal.
529         * src/main.c (fatal_code): New.
530         (main): Implemented 1-bit LED status display.
531         (fatal): Added argument CODE.
532         * src/flash.c (flash_data_pool_allocate): Supply argument FATAL_FLASH.
533         * src/random.c (random_bytes_get): Supply argument FATAL_RANDOM.
534         * src/ac.c (auth_status): Added volatile, and remove static.
535
536 2010-12-08  NIIBE Yutaka  <gniibe@fsij.org>
537
538         * src/gnuk.h (AC_OTHER_AUTHORIZED): Renamed (was:
539         AC_PSO_OTHER_AUTHORIZED).
540         * src/ac.c (ac_reset_other): Renamed (was: ac_reset_pso_other).
541         (verify_other): Renamed (was: verify_pso_other).
542         (ac_reset_admin): New.
543         * src/openpgp.c (cmd_change_password): Call ac_reset_admin.
544
545         * src/main.c (main): Don't create GPGThread here.
546         * src/usb-icc.c (icc_power_on): But create here, when requested.
547         (icc_power_off): Terminate GPGThread.
548         * src/openpgp.c (gpg_init, gpg_fini): New.
549         (GPGthread): Check chThdShouldTerminate.  Call gpg_init and gpg_fini.
550
551 2010-12-07  NIIBE Yutaka  <gniibe@fsij.org>
552
553         USB CCID/ICC implementation changes.
554         * src/usb_desc.c (dwMaxCCIDMessageLength): Updated.
555         * src/usb-icc.c (EV_TX_FINISHED): New.
556         (icc_rcv_data, icc_tx_data): Removed.
557         (icc_buffer, icc_seq): New.
558         (icc_next_p, icc_chain_p): New.
559         (icc_tx_ready): Removed.
560         (EP1_IN_Callback): Handle multiple transactions.
561         (icc_prepare_receive): New.
562         (EP2_OUT_Callback): Handle multiple transactions.
563         (icc_error, icc_send_status): Handle the case of receive in chain.
564         (icc_power_on, icc_send_params): Specify it's a single transaction.
565         (icc_send_data_block_filling_header): New.
566         (icc_send_data_block): Simplify.
567         (icc_handle_data): Removed the case of ICC_STATE_SEND.
568         Handle buffer of multiple transactions.
569         (USBthread): Don't use sending in chain.
570         * src/gnuk.h (USB_LL_BUF_SIZE): New.
571         (USB_BUF_SIZE): Now, it's larger value.
572         * src/configure: Echo for --enable-debug.
573         * src/call-rsa.c (rsa_sign): Use temp[] buffer as rsa_pkcs1_sign
574         writes OUTPUT in early stage.
575
576 2010-12-04  NIIBE Yutaka  <gniibe@fsij.org>
577
578         * src/flash.c (flash_keystore_release): Reset keystore storage.
579
580 2010-12-03  NIIBE Yutaka  <gniibe@fsij.org>
581
582         Keystore management changes.
583         * src/flash.c (flash_key_alloc): Check FLASH_KEYSTORE_SIZE.
584         (flash_key_release): Removed.
585         (flash_keystore_release): New function.
586         * src/openpgp-do.c (gpg_do_write_prvkey): Make it static.
587         When there is a key already, return as error.
588         (proc_key_import): Call flash_keystore_release when all keys removed.
589         * src/gnuk.ld.in (_keystore_pool): Size of keystore is now 1.5KB.
590
591 2010-11-30  NIIBE Yutaka  <gniibe@fsij.org>
592
593         Flash ROM fixes for STM32F10X_HD.
594         * src/gnuk.ld.in (.gnuk_flash): Use FLASH_PAGE_SIZE.
595         * src/configure (FLASH_PAGE_SIZE): Defined for gnuk.ld.
596         * src/flash.c (FLASH_PAGE_SIZE): New define.
597         (FLASH_DATA_POOL_SIZE): Use FLASH_PAGE_SIZE.
598
599         Import changes of ChibiOS_2.0.8.
600         * ChibiOS_2.0.8/os/hal/include/pwm.h
601         * ChibiOS_2.0.8/os/hal/platforms/STM32/pwm_lld.c
602         * ChibiOS_2.0.8/os/hal/platforms/STM32/pwm_lld.h
603         * ChibiOS_2.0.8/os/hal/src/pwm.c
604         * ChibiOS_2.0.8/os/hal/templates/pwm_lld.c
605         * ChibiOS_2.0.8/os/hal/templates/pwm_lld.h
606         * ChibiOS_2.0.8/os/kernel/include/ch.h
607         * ChibiOS_2.0.8/os/kernel/src/chevents.c
608         * ChibiOS_2.0.8/os/kernel/src/chthreads.c
609         * ChibiOS_2.0.8/boards/OLIMEX_LPC_P2148/board.h
610         * ChibiOS_2.0.8/readme.txt
611         * ChibiOS_2.0.8/test/testdyn.c
612         * ChibiOS_2.0.8/docs/*/*: Updated.
613
614         New private key management.
615         * src/ac.c (ac_reset_pso_cds, ac_reset_pso_other): Call
616         gpg_do_clear_prvkey.
617         (verify_pso_other): load private keys here.
618         * src/openpgp-do.c (kd): Keydata for Signing, Decryption, and
619         Authentication.
620         (gpg_do_load_prvkey, gpg_do_write_prvkey): Use kd[].
621         (gpg_do_clear_prvkey): New function.
622         * src/openpgp.c (cmd_pso, cmd_internal_authenticate): Use new API
623         of rsa_sign and rsa_decrypt.
624         (cmd_pso): Fixed bug of checking return value of gpg_get_pw1_lifetime.
625         * src/call-rsa.c (rsa_sign): New argument KD.
626         (rsa_decrypt): Likewise.
627
628         Don't use malloc/free in C library.
629         * src/stdlib.h (malloc, free): Use chHeapAlloc and chHeapFree.
630
631 2010-11-26  NIIBE Yutaka  <gniibe@fsij.org>
632
633         * boards/STM8S_DISCOVERY/*: New.
634         * src/configure: STM8S_DISCOVERY only has 64KB flash memory.
635
636         * boards/STBEE_MINI/board.h (CPU_WITH_NO_GPIOE): New define.
637         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld.c: Use it.
638         * ChibiOS_2.0.6/os/hal/platforms/STM32/pal_lld.c: Likewise.
639         * ChibiOS_2.0.6/os/hal/platforms/STM32/pal_lld.h: Likewise.
640
641         * src/openpgp.c (cmd_pso): DigestInfo by SHA224/SHA384/SHA512 is
642         supported.
643
644 2010-11-22  NIIBE Yutaka  <gniibe@fsij.org>
645
646         Import changes of ChibiOS_2.0.6.
647         * ChibiOS_2.0.6/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h
648         * ChibiOS_2.0.6/os/hal/include/can.h
649         * ChibiOS_2.0.6/os/hal/platforms/AT91SAM7/hal_lld.c
650         * ChibiOS_2.0.6/os/hal/platforms/AT91SAM7/serial_lld.c
651         * ChibiOS_2.0.6/os/hal/platforms/LPC214x/serial_lld.c
652         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld_f103.h
653         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld_f105_f107.h
654         * ChibiOS_2.0.6/os/hal/platforms/STM32/pwm_lld.c
655         * ChibiOS_2.0.6/os/hal/platforms/STM32/serial_lld.h
656         * ChibiOS_2.0.6/os/hal/platforms/STM32/spi_lld.h
657         * ChibiOS_2.0.6/os/hal/src/adc.c
658         * ChibiOS_2.0.6/os/hal/src/spi.c
659         * ChibiOS_2.0.6/os/kernel/include/ch.h
660         * ChibiOS_2.0.6/os/kernel/include/chinline.h
661         * ChibiOS_2.0.6/os/kernel/include/chioch.h
662         * ChibiOS_2.0.6/os/kernel/include/chstreams.h
663         * ChibiOS_2.0.6/os/kernel/include/chthreads.h
664         * ChibiOS_2.0.6/os/kernel/src/chlists.c
665         * ChibiOS_2.0.6/os/kernel/src/chschd.c
666         * ChibiOS_2.0.6/os/kernel/src/chthreads.c
667         * ChibiOS_2.0.6/os/ports/GCC/ARM/rules.mk
668         * ChibiOS_2.0.6/os/ports/GCC/ARM7/chcore.h
669         * ChibiOS_2.0.6/os/ports/GCC/ARM7/port.dox
670         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v6m.c
671         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v6m.h
672         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v7m.c
673         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v7m.h
674         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/old/chcore_v7m.h
675         * ChibiOS_2.0.6/os/ports/GCC/AVR/chcore.h
676         * ChibiOS_2.0.6/os/ports/GCC/AVR/port.dox
677         * ChibiOS_2.0.6/os/ports/GCC/MSP430/chcore.c
678         * ChibiOS_2.0.6/os/ports/GCC/MSP430/chcore.h
679         * ChibiOS_2.0.6/os/ports/GCC/MSP430/port.dox
680         * ChibiOS_2.0.6/os/ports/GCC/PPC/chcore.h
681         * ChibiOS_2.0.6/os/ports/GCC/PPC/port.dox
682         * ChibiOS_2.0.6/os/ports/RC/STM8/port.dox
683         * ChibiOS_2.0.6/os/various/memstreams.h
684         * ChibiOS_2.0.6/readme.txt
685         * ChibiOS_2.0.6/docs/*/*: Updated
686
687 2010-11-14  NIIBE Yutaka  <gniibe@fsij.org>
688
689         * src/openpgp.c (cmd_pso): DigestInfo by SHA256 is supported.
690
691 2010-11-12  NIIBE Yutaka  <gniibe@fsij.org>
692
693         * src/usb_desc.c (gnukConfigDescriptor): Change dwFeatures.
694
695         * src/usb-icc.c (icc_send_params): Always return fixed result.
696         (icc_handle_data): Support ICC_GET_PARAMS.
697
698 2010-11-10  NIIBE Yutaka  <gniibe@fsij.org>
699
700         * src/usb_desc.c (gnukConfigDescriptor): Fix bmAttributes.
701
702 2010-11-09  NIIBE Yutaka  <gniibe@fsij.org>
703
704         * Version 0.4.
705
706         * src/usb_desc.c (gnukStringSerial): Updated.
707
708         * ChibiOS_2.0.2/os/hal/platforms/STM32/pal_lld.h (PALConfig):
709         STBee Mini uses STM32F103CBT6 which expose no GPIO E port.
710         * ChibiOS_2.0.2/os/hal/platforms/STM32/pal_lld.c (_pal_lld_init):
711         Likewise.
712
713 2010-11-08  NIIBE Yutaka  <gniibe@fsij.org>
714
715         * tool/dump_mem.py: New tool.
716
717         Implement GC for data pool in flash memory.
718         * src/openpgp-do.c (gpg_write_digital_signature_counter): New.
719         (gpg_increment_digital_signature_counter): Fix for GC.
720         (gpg_data_scan): Rename from gpg_do_table_init.
721         (gpg_data_copy): New function for copying GC.
722         * src/main.c (main): Call gpg_data_scan with the address which
723         flash_init returns.
724         * src/flash.c (flash_erase_page): New function.
725         (FLASH_DATA_POOL_SIZE): data_pool is 2KiB now.
726         (flash_data): Put a header (GC generation).
727         (flash_init): Implement choosing a data pool page.
728         (flash_data_pool): Removed.
729         (flash_copying_gc): New function.
730         (flash_data_pool_allocate): Call flash_copying_gc when full.
731         (flash_do_write_internal, flash_put_data_internal)
732         (flash_bool_write_internal, flash_cnt123_write_internal): New
733         * src/gnuk.ld.in (gnuk_flash): data_pool is 2KiB now.
734
735         Bug fixes.
736         * src/openpgp.c (cmd_change_password, cmd_reset_user_password):
737         Write to APDU correctly.
738         * src/flash.c (flash_warning): Make it public.
739         * src/openpgp-do.c (do_hist_bytes, do_fp_all, do_cafp_all)
740         (do_kgtime_all, do_ds_count): Fix return value.
741         (rw_pw_status): Correctly return value.
742         (proc_resetting_code): Change func proto. to return success/failure.
743         (proc_key_import): Ditto.
744         (gpg_do_put_data): Handle return values.
745         (gpg_do_write_simple): Don't write to APDU.
746
747 2010-11-05  NIIBE Yutaka  <gniibe@fsij.org>
748
749         Bug fixes.
750         * src/openpgp.c (gpg_change_keystring): Handle
751         GPG_KEY_FOR_AUTHENTICATION.
752         * src/openpgp-do.c (gpg_do_write_prvkey): Remove multiple call
753         of flash_do_release.
754
755         Bug fix.
756         * src/openpgp-do.c (gpg_do_write_prvkey): Don't hardcode 6, but
757         use strlen.
758
759         * src/flash.c, src/gnuk.ld.in: Rename "Flash DO Pool" to "Flash
760         Data Pool", because it's not only DO.
761         * src/gnuk.h, src/opengpg-do.c: Cleanup.
762
763         Digital Signature Counter implementation improvement.
764         * src/gnuk.h (NR_DO_DS_COUNT): Removed.
765         (NR_COUNTER_DS, NR_COUNTER_DS_LSB): New.
766         * src/openpgp-do.c (do_ds_count_initial_value): Removed.
767         (gpg_do_increment_digital_signature_counter): Removed.
768         (digital_signature_counter): New variable.
769         (do_ds_count, gpg_increment_digital_signature_counter): New functions.
770         (gpg_do_table): Change the entry for GPG_DO_DS_COUNT as DO_PROC_READ.
771         (gpg_do_table_init): Handle digital_signature_counter.
772         * src/flash.c (flash_data_pool_allocate, flash_put_data): New.
773
774         Password status implementation improvement.
775         * src/gnuk.h (PW_STATUS_PW1, PW_STATUS_RC, PW_STATUS_PW3): Removed.
776         (PW_ERR_PW1, PW_ERR_RC, PW_ERR_PW3): New define.
777         (NR_COUNTER_123, NR_BOOL_PW1_LIFETIME): New define.
778         (NR_NONE, NR_EMPTY): New define.
779         * src/flash.c (flash_bool_clear, flash_bool_write)
780         (flash_cnt123_get_value, flash_cnt123_increment)
781         (flash_cnt123_clear): New functions.
782         * src/openpgp-do.c (do_pw_status_bytes_template): Removed.
783         (PW_STATUS_BYTES_TEMPLATE, gpg_do_reset_pw_counter): Removed.
784         (PASSWORD_ERRORS_MAX, PW_LEN_MAX): New define.
785         (pw1_lifetime_p, pw_err_counter_p): New variables.
786         (gpg_get_pw1_lifetime): New function.
787         (gpg_get_pw_err_counter, gpg_passwd_locked, gpg_reset_pw_counter)
788         (gpg_increment_pw_counter): New functions.
789         (rw_pw_status): Use pw1_lifetime_p and pw_err_counter_p.
790         (gpg_do_table_init): Handle NR_COUNTER_123 and NR_BOOL_PW1_LIFETIME.
791         * src/ac.c (verify_pso_cds, verify_pso_other, verify_admin_0):
792         Follow the changes.
793         * src/openpgp.c (cmd_change_password, cmd_reset_user_password)
794         (cmd_pso, cmd_internal_authenticate): Likewise.
795
796 2010-11-04  NIIBE Yutaka  <gniibe@fsij.org>
797
798         * src/flash.c (flash_warning): New.
799         (flash_do_pool): Added header for DO pool.
800         (flash_do_release): Fill zero.
801         (flash_do_write): Change DO format in flash.
802         * src/openpgp-do.c (gpg_do_table_init, copy_do_1)
803         (gpg_do_read_simple): Follow the change of DO format in flash.
804
805         * src/openpgp-do.c (DO_CMP_READ): Renamed.
806         (cmp_ch_data, cmp_app_data, cmp_ss_temp): Likewise.
807         (with_tag): Removed static global variable.
808         (do_hist_bytes, do_fp_all, do_cafp_all, do_kgtime_all)
809         (rw_pw_status, copy_do_1, copy_do, gpg_do_get_data): Added
810         with_tag argument.
811         (gpg_do_put_data): length > 255 will be error.
812
813 2010-11-03  NIIBE Yutaka  <gniibe@fsij.org>
814
815         Bug fixes.
816         * src/ac.c (verify_admin_0): Initialize pwsb earlier.
817         * src/openpgp-do.c (copy_do_1): Access do_data[0] (was: do_data[1]).
818
819 2010-11-02  NIIBE Yutaka  <gniibe@fsij.org>
820
821         DfuSe support.
822         * tool/dfuse.py (DFU_STM32.download): Put '#' for each 4-KiB.
823         Added 0-length write to finish download.
824         Take intel_hex object as argument.
825         (DFU_STM32.ll_upload_block): New method.
826         (DFU_STM32.dfuse_read_memory): New method.
827         (DFU_STM32.verify): New method.
828         (get_device): Support DFU_STM32PROTOCOL_0 too (for CQ STARM).
829
830         * tool/dfuse.py: Renamed from dfu_stmicroelectronics_extention.py.
831
832 2010-11-01  NIIBE Yutaka  <gniibe@fsij.org>
833
834         * tool/intel_hex.py: New file.
835         * tool/dfu_stmicroelectronics_extention.py: New file.
836
837 2010-10-28  NIIBE Yutaka  <gniibe@fsij.org>
838
839         * src/gnuk.h (OPENPGP_CARD_INITIAL_PW3): New.
840         * src/ac.c (verify_admin_0): Use OPENPGP_CARD_INITIAL_PW3.
841
842 2010-10-23  NIIBE Yutaka  <gniibe@fsij.org>
843
844         * Version 0.3.
845
846         * src/usb_desc.c (gnukStringSerial): Updated.
847
848 2010-10-22  NIIBE Yutaka  <gniibe@fsij.org>
849
850         * src/gnuk.ld.in (.gnuk_random): Fix description so that
851         padding with 0xffffffff will be in gnuk.hex.
852
853         * src/openpgp.c (file_selection): Change type (was: int).
854         (FILE_NONE..FILE_EF_SERIAL): Change the values.
855
856         * src/configure: Added STBee Mini support.
857         * boards/STBEE_MINI/mcuconf.h: New.
858         * boards/STBEE_MINI/board.mk: New.
859         * boards/STBEE_MINI/board.h: New.
860         * boards/STBEE_MINI/board.c: New.
861
862         * ChibiOS_2.0.2/os/hal/platforms/STM32/hal_lld.c
863         (pal_default_config): STBee Mini uses STM32F103CBT6 which expose
864         no GPIO E port.
865
866 2010-10-21  NIIBE Yutaka  <gniibe@fsij.org>
867
868         * boards/common/hw_config.c (Get_SerialNum): Removed.
869         * src/usb_prop.c (gnuk_device_init): Remove calling Get_SerialNum.
870         * src/usb_desc.c (gnukStringSerial): Updated.
871         * boards/CQ_STARM/board.c (set_led): Fix polarity.
872
873 2010-10-20  NIIBE Yutaka  <gniibe@fsij.org>
874
875         * FSIJ_SERIAL_NUMBER: New.
876         * src/configure (with_fsij): Added FSIJ serial number support.
877         * src/config.h.in (@FSIJ_DEFINE@, @SERIAL_NUMBER_FOUR_BYTES@): New.
878
879         * src/configure: Added CQ STARM target.
880         * boards/CQ_STARM/mcuconf.h: New.
881         * boards/CQ_STARM/board.mk: New.
882         * boards/CQ_STARM/board.h: New.
883         * boards/CQ_STARM/board.c: New.
884
885 2010-10-19  NIIBE Yutaka  <gniibe@fsij.org>
886
887         * boards/STM32_PRIMER2/board.mk (BOARDSRC): Use common/hw_config.c.
888         * boards/OLIMEX_STM32_H103/board.mk (BOARDSRC): Likewise.
889
890         * boards/common/hw_config.c: Move board specific functions to ...
891         * boards/STM32_PRIMER2/board.c (USB_Cable_Config, set_led): ... here.
892         * boards/OLIMEX_STM32_H103/board.c (USB_Cable_Config, set_led): Ditto.
893
894         * boards/{OLIMEX_STM32_H103,STM32_PRIMER2}/hw_config.c: Removed.
895         * boards/common/hw_config.c: New file (was: boards/*/hw_config.c).
896
897         * .gitignore: New file.
898
899 2010-10-16  NIIBE Yutaka  <gniibe@fsij.org>
900
901         Implement "INTERNAL AUTHENTICATE" command.
902
903         * src/gnuk.h (BY_USER, BY_RESETCODE, BY_ADMIN): New defines.
904         (NUM_ALL_PRV_KEYS): Now it's 3 (was: 2).
905
906         * src/openpgp.c (INS_INTERNAL_AUTHENTICATE): New define.
907         (cmd_internal_authenticate): New function.
908         (cmds): Added INS_INTERNAL_AUTHENTICATE.
909         (cmd_change_password): Use BY_USER.
910         (cmd_reset_user_password): Use BY_USER, BY_RESETCODE, BY_ADMIN.
911         (cmd_pso): Load GPG_KEY_FOR_DECRYPTION here.
912         (cmd_pso): Removed adding status word into res_APDU...
913         * src/call-rsa.c (rsa_sign): and moved adding status word into
914         res_APDU here.
915
916         * src/ac.c (pw1_keystring): New variable.
917         (ac_reset_pso_other): Clear pw1_keystring.
918         (verify_pso_cds): Use BY_USER.
919         (verify_pso_other): Just check the length of password here, and
920         defer real check to cmd_pso or cmd_internal_authenticate.
921
922 2010-10-14  NIIBE Yutaka  <gniibe@fsij.org>
923
924         Adding 'configure' support.
925         * src/configure: New file.
926         * src/Makefile.in: Renamed from src/Makefile.
927         * src/config.h: Renamed from src/config.h.
928         * src/gnuk.ld: Renamed from src/gnuk.ld.
929
930         Adding DFU_SUPPORT.
931         * boards/common/hwinit0.c: New file adding DFU_SUPPORT.
932         * boards/common/hwinit1.c: New file.
933         * boards/OLIMEX_STM32_H103/board.c: Include config.h.
934         Use common/hwinit0.c and common/hwinit1.c.
935         * boards/STM32_PRIMER2/board.c: Likewise.
936
937 2010-09-16  NIIBE Yutaka  <gniibe@fsij.org>
938
939         * src/usb-icc.c (icc_error): New function.
940         (icc_handle_data): Call icc_error.
941         Don't go to STATE_START on errors.
942
943 2010-09-13  NIIBE Yutaka  <gniibe@fsij.org>
944
945         * Version 0.2.
946
947         * src/openpgp.c (cmd_select_file): Override data of number_of_bytes.
948
949         * src/openpgp-do.c (gpg_do_table_init): Calculate number of byte
950         which Data Objects consumes.
951
952 2010-09-12  Kaz Kojima <kkojima@rr.iij4u.or.jp>
953
954         * src/call-rsa.c (rsa_decrypt): Debug output only when DEBUG.
955
956         * boards/STM32_PRIMER2/hw_config.c (USB_Cable_Config): Fix GPIO.
957         (set_led): Ditto.
958
959         * boards/STM32_PRIMER2/board.c (hwinit1): Added LED initialization.
960
961 2010-09-11  NIIBE Yutaka  <gniibe@fsij.org>
962
963         * src/usb-icc.c (ATR): Fixed.
964         (icc_send_params): New function.
965         (icc_handle_data): Handle ICC_SET_PARAMS request.
966
967         * src/random.c (random_bytes_get, random_bytes_free, get_random):
968         Clear used random bytes.
969
970         * src/flash.c (flash_clear_halfword): New function.
971
972 2010-09-10  NIIBE Yutaka  <gniibe@fsij.org>
973
974         * Version 0.1.
975
976         * src/usb_desc.c (gnukStringSerial): Change the value so that
977         libccid doesn't get confused.
978
979         * src/openpgp.c (gpg_change_keystring): Support key for decryption
980         as well.
981         (cmd_read_binary): Use openpgpcard_aid.
982         (cmd_pso): call ac_reset_pso_other.
983
984         * src/openpgp-do.c (openpgpcard_aid): Renamed from aid, and exported.
985         (do_ds_count_initial_value): New const variable.
986         (num_prv_keys): New variable.
987         (gpg_do_write_prvkey): Remove contents of keystring only if
988         ++num_prv_keys == NUM_ALL_PRV_KEYS.
989         (gpg_do_chks_prvkey): Call flash_do_release.
990         (gpg_do_table_init): Initialize with do_ds_count_initial_value.
991         Initialize num_prv_keys.
992         (gpg_do_write_simple): Support removing DO.
993         (gpg_do_increment_digital_signature_counter): Call flash_do_release.
994
995         * src/gnuk.h (NUM_ALL_PRV_KEYS): New definition.
996         (OPENPGP_CARD_INITIAL_PW1): New definition.
997         (enum kind_of_key): Rename.
998
999         * src/ac.c (ac_reset_pso_cds): New function.
1000
1001 2010-09-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1002
1003         * boards/STM32_PRIMER2/{board.c,board.h,board.mk,hw_config.c,mcuconf.h}:
1004         New files.
1005
1006         * boards/OLIMEX_STM32_H103/{mcuconf.h,hw_config.c}: Moved from src.
1007
1008         * src/main.c (main): Use set_led instead of palClearPad directly.
1009
1010 2010-09-08  NIIBE Yutaka  <gniibe@fsij.org>
1011
1012         * src/ac.c (calc_md): Make SHA1 variable auto.
1013
1014         * src/debug.c (put_int): New.
1015
1016         * src/gnuk.ld (__process_stack_size__): Removed.
1017
1018         * src/main.c (STDOUTthread): Use Event.
1019         (main): Make LED ON during command execution, blink usually.
1020
1021         * src/openpgp-do.c (encrypt, decrypt): Make AES variables auto.
1022         (gpg_do_table): GPG_DO_ALG_AUT is NULL.
1023
1024         * src/openpgp.c (cmd_pso): Bug fix for extended Lc.
1025
1026         * src/usb-icc.c (icc_power_off): Make LED ON during command
1027         execution.
1028         (USB_ICC_TIMEOUT): Longer value (was: 1000).
1029
1030         * src/usb_desc.c (gnukConfigDescriptor): Fix bcdCCID value.
1031
1032         * src/vcomport.mk (VCOMSRC): Use our own usb_endp.c.
1033
1034         * src/usb_desc.c (gnukConfigDescriptor): ICC Descriptor is
1035         Revision 1.0.
1036
1037         * polarssl-0.14.0/include/polarssl/config.h: Commend out
1038         POLARSSL_SELF_TEST.
1039
1040         * polarssl-0.14.0/library/rsa.c (rsa_private): Don't check input,
1041         so that we don't access ctx->N.
1042         (rsa_pkcs1_decrypt): size of BUF is enough as 256.
1043
1044         * polarssl-0.14.0/library/sha1.c (sha1_file): #if-out to avoid
1045         stdio of libc.
1046
1047         * polarssl-0.14.0/library/bignum.c (mpi_write_hlp)
1048         (mpi_write_string, mpi_read_file, mpi_read_file): #if-out to avoid
1049         stdio of libc.
1050
1051 2010-09-07  NIIBE Yutaka  <gniibe@fsij.org>
1052
1053         * gnuk.svg: New file.
1054
1055 2010-09-06  NIIBE Yutaka  <gniibe@fsij.org>
1056
1057         * Initial version 0.0.