74d40086743c92bf6c57a3e5c1ce4ae241da29c1
[gnuk/gnuk.git] / ChangeLog
1 2010-12-08  NIIBE Yutaka  <gniibe@fsij.org>
2
3         * src/gnuk.h (AC_OTHER_AUTHORIZED): Renamed (was:
4         AC_PSO_OTHER_AUTHORIZED).
5         * src/ac.c (ac_reset_other): Renamed (was: ac_reset_pso_other).
6         (verify_other): Renamed (was: verify_pso_other).
7         (ac_reset_admin): New.
8         * src/openpgp.c (cmd_change_password): Call ac_reset_admin.
9
10         * src/main.c (main): Don't create GPGThread here.
11         * src/usb-icc.c (icc_power_on): But create here, when requested.
12         (icc_power_off): Terminate GPGThread.
13         * src/openpgp.c (gpg_init, gpg_fini): New.
14         (GPGthread): Check chThdShouldTerminate.  Call gpg_init and gpg_fini.
15
16 2010-12-07  NIIBE Yutaka  <gniibe@fsij.org>
17
18         USB CCID/ICC implementation changes.
19         * src/usb_desc.c (dwMaxCCIDMessageLength): Updated.
20         * src/usb-icc.c (EV_TX_FINISHED): New.
21         (icc_rcv_data, icc_tx_data): Removed.
22         (icc_buffer, icc_seq): New.
23         (icc_next_p, icc_chain_p): New.
24         (icc_tx_ready): Removed.
25         (EP1_IN_Callback): Handle multiple transactions.
26         (icc_prepare_receive): New.
27         (EP2_OUT_Callback): Handle multiple transactions.
28         (icc_error, icc_send_status): Handle the case of receive in chain.
29         (icc_power_on, icc_send_params): Specify it's a single transaction.
30         (icc_send_data_block_filling_header): New.
31         (icc_send_data_block): Simplify.
32         (icc_handle_data): Removed the case of ICC_STATE_SEND.
33         Handle buffer of multiple transactions.
34         (USBthread): Don't use sending in chain.
35         * src/gnuk.h (USB_LL_BUF_SIZE): New.
36         (USB_BUF_SIZE): Now, it's larger value.
37         * src/configure: Echo for --enable-debug.
38         * src/call-rsa.c (rsa_sign): Use temp[] buffer as rsa_pkcs1_sign
39         writes OUTPUT in early stage.
40
41 2010-12-04  NIIBE Yutaka  <gniibe@fsij.org>
42
43         * src/flash.c (flash_keystore_release): Reset keystore storage.
44
45 2010-12-03  NIIBE Yutaka  <gniibe@fsij.org>
46
47         Keystore management changes.
48         * src/flash.c (flash_key_alloc): Check FLASH_KEYSTORE_SIZE.
49         (flash_key_release): Removed.
50         (flash_keystore_release): New function.
51         * src/openpgp-do.c (gpg_do_write_prvkey): Make it static.
52         When there is a key already, return as error.
53         (proc_key_import): Call flash_keystore_release when all keys removed.
54         * src/gnuk.ld.in (_keystore_pool): Size of keystore is now 1.5KB.
55
56 2010-11-30  NIIBE Yutaka  <gniibe@fsij.org>
57
58         Flash ROM fixes for STM32F10X_HD.
59         * src/gnuk.ld.in (.gnuk_flash): Use FLASH_PAGE_SIZE.
60         * src/configure (FLASH_PAGE_SIZE): Defined for gnuk.ld.
61         * src/flash.c (FLASH_PAGE_SIZE): New define.
62         (FLASH_DATA_POOL_SIZE): Use FLASH_PAGE_SIZE.
63
64         Import changes of ChibiOS_2.0.8.
65         * ChibiOS_2.0.8/os/hal/include/pwm.h
66         * ChibiOS_2.0.8/os/hal/platforms/STM32/pwm_lld.c
67         * ChibiOS_2.0.8/os/hal/platforms/STM32/pwm_lld.h
68         * ChibiOS_2.0.8/os/hal/src/pwm.c
69         * ChibiOS_2.0.8/os/hal/templates/pwm_lld.c
70         * ChibiOS_2.0.8/os/hal/templates/pwm_lld.h
71         * ChibiOS_2.0.8/os/kernel/include/ch.h
72         * ChibiOS_2.0.8/os/kernel/src/chevents.c
73         * ChibiOS_2.0.8/os/kernel/src/chthreads.c
74         * ChibiOS_2.0.8/boards/OLIMEX_LPC_P2148/board.h
75         * ChibiOS_2.0.8/readme.txt
76         * ChibiOS_2.0.8/test/testdyn.c
77         * ChibiOS_2.0.8/docs/*/*: Updated.
78
79         New private key management.
80         * src/ac.c (ac_reset_pso_cds, ac_reset_pso_other): Call
81         gpg_do_clear_prvkey.
82         (verify_pso_other): load private keys here.
83         * src/openpgp-do.c (kd): Keydata for Signing, Decryption, and
84         Authentication.
85         (gpg_do_load_prvkey, gpg_do_write_prvkey): Use kd[].
86         (gpg_do_clear_prvkey): New function.
87         * src/openpgp.c (cmd_pso, cmd_internal_authenticate): Use new API
88         of rsa_sign and rsa_decrypt.
89         (cmd_pso): Fixed bug of checking return value of gpg_get_pw1_lifetime.
90         * src/call-rsa.c (rsa_sign): New argument KD.
91         (rsa_decrypt): Likewise.
92
93         Don't use malloc/free in C library.
94         * src/stdlib.h (malloc, free): Use chHeapAlloc and chHeapFree.
95
96 2010-11-26  NIIBE Yutaka  <gniibe@fsij.org>
97
98         * boards/STM8S_DISCOVERY/*: New.
99         * src/configure: STM8S_DISCOVERY only has 64KB flash memory.
100
101         * boards/STBEE_MINI/board.h (CPU_WITH_NO_GPIOE): New define.
102         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld.c: Use it.
103         * ChibiOS_2.0.6/os/hal/platforms/STM32/pal_lld.c: Likewise.
104         * ChibiOS_2.0.6/os/hal/platforms/STM32/pal_lld.h: Likewise.
105
106         * src/openpgp.c (cmd_pso): DigestInfo by SHA224/SHA384/SHA512 is
107         supported.
108
109 2010-11-22  NIIBE Yutaka  <gniibe@fsij.org>
110
111         Import changes of ChibiOS_2.0.6.
112         * ChibiOS_2.0.6/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h
113         * ChibiOS_2.0.6/os/hal/include/can.h
114         * ChibiOS_2.0.6/os/hal/platforms/AT91SAM7/hal_lld.c
115         * ChibiOS_2.0.6/os/hal/platforms/AT91SAM7/serial_lld.c
116         * ChibiOS_2.0.6/os/hal/platforms/LPC214x/serial_lld.c
117         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld_f103.h
118         * ChibiOS_2.0.6/os/hal/platforms/STM32/hal_lld_f105_f107.h
119         * ChibiOS_2.0.6/os/hal/platforms/STM32/pwm_lld.c
120         * ChibiOS_2.0.6/os/hal/platforms/STM32/serial_lld.h
121         * ChibiOS_2.0.6/os/hal/platforms/STM32/spi_lld.h
122         * ChibiOS_2.0.6/os/hal/src/adc.c
123         * ChibiOS_2.0.6/os/hal/src/spi.c
124         * ChibiOS_2.0.6/os/kernel/include/ch.h
125         * ChibiOS_2.0.6/os/kernel/include/chinline.h
126         * ChibiOS_2.0.6/os/kernel/include/chioch.h
127         * ChibiOS_2.0.6/os/kernel/include/chstreams.h
128         * ChibiOS_2.0.6/os/kernel/include/chthreads.h
129         * ChibiOS_2.0.6/os/kernel/src/chlists.c
130         * ChibiOS_2.0.6/os/kernel/src/chschd.c
131         * ChibiOS_2.0.6/os/kernel/src/chthreads.c
132         * ChibiOS_2.0.6/os/ports/GCC/ARM/rules.mk
133         * ChibiOS_2.0.6/os/ports/GCC/ARM7/chcore.h
134         * ChibiOS_2.0.6/os/ports/GCC/ARM7/port.dox
135         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v6m.c
136         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v6m.h
137         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v7m.c
138         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/chcore_v7m.h
139         * ChibiOS_2.0.6/os/ports/GCC/ARMCMx/old/chcore_v7m.h
140         * ChibiOS_2.0.6/os/ports/GCC/AVR/chcore.h
141         * ChibiOS_2.0.6/os/ports/GCC/AVR/port.dox
142         * ChibiOS_2.0.6/os/ports/GCC/MSP430/chcore.c
143         * ChibiOS_2.0.6/os/ports/GCC/MSP430/chcore.h
144         * ChibiOS_2.0.6/os/ports/GCC/MSP430/port.dox
145         * ChibiOS_2.0.6/os/ports/GCC/PPC/chcore.h
146         * ChibiOS_2.0.6/os/ports/GCC/PPC/port.dox
147         * ChibiOS_2.0.6/os/ports/RC/STM8/port.dox
148         * ChibiOS_2.0.6/os/various/memstreams.h
149         * ChibiOS_2.0.6/readme.txt
150         * ChibiOS_2.0.6/docs/*/*: Updated
151
152 2010-11-14  NIIBE Yutaka  <gniibe@fsij.org>
153
154         * src/openpgp.c (cmd_pso): DigestInfo by SHA256 is supported.
155
156 2010-11-12  NIIBE Yutaka  <gniibe@fsij.org>
157
158         * src/usb_desc.c (gnukConfigDescriptor): Change dwFeatures.
159
160         * src/usb-icc.c (icc_send_params): Always return fixed result.
161         (icc_handle_data): Support ICC_GET_PARAMS.
162
163 2010-11-10  NIIBE Yutaka  <gniibe@fsij.org>
164
165         * src/usb_desc.c (gnukConfigDescriptor): Fix bmAttributes.
166
167 2010-11-09  NIIBE Yutaka  <gniibe@fsij.org>
168
169         * Version 0.4.
170
171         * src/usb_desc.c (gnukStringSerial): Updated.
172
173         * ChibiOS_2.0.2/os/hal/platforms/STM32/pal_lld.h (PALConfig):
174         STBee Mini uses STM32F103CBT6 which expose no GPIO E port.
175         * ChibiOS_2.0.2/os/hal/platforms/STM32/pal_lld.c (_pal_lld_init):
176         Likewise.
177
178 2010-11-08  NIIBE Yutaka  <gniibe@fsij.org>
179
180         * tool/dump_mem.py: New tool.
181
182         Implement GC for data pool in flash memory.
183         * src/openpgp-do.c (gpg_write_digital_signature_counter): New.
184         (gpg_increment_digital_signature_counter): Fix for GC.
185         (gpg_data_scan): Rename from gpg_do_table_init.
186         (gpg_data_copy): New function for copying GC.
187         * src/main.c (main): Call gpg_data_scan with the address which
188         flash_init returns.
189         * src/flash.c (flash_erase_page): New function.
190         (FLASH_DATA_POOL_SIZE): data_pool is 2KiB now.
191         (flash_data): Put a header (GC generation).
192         (flash_init): Implement choosing a data pool page.
193         (flash_data_pool): Removed.
194         (flash_copying_gc): New function.
195         (flash_data_pool_allocate): Call flash_copying_gc when full.
196         (flash_do_write_internal, flash_put_data_internal)
197         (flash_bool_write_internal, flash_cnt123_write_internal): New
198         * src/gnuk.ld.in (gnuk_flash): data_pool is 2KiB now.
199
200         Bug fixes.
201         * src/openpgp.c (cmd_change_password, cmd_reset_user_password):
202         Write to APDU correctly.
203         * src/flash.c (flash_warning): Make it public.
204         * src/openpgp-do.c (do_hist_bytes, do_fp_all, do_cafp_all)
205         (do_kgtime_all, do_ds_count): Fix return value.
206         (rw_pw_status): Correctly return value.
207         (proc_resetting_code): Change func proto. to return success/failure.
208         (proc_key_import): Ditto.
209         (gpg_do_put_data): Handle return values.
210         (gpg_do_write_simple): Don't write to APDU.
211
212 2010-11-05  NIIBE Yutaka  <gniibe@fsij.org>
213
214         Bug fixes.
215         * src/openpgp.c (gpg_change_keystring): Handle
216         GPG_KEY_FOR_AUTHENTICATION.
217         * src/openpgp-do.c (gpg_do_write_prvkey): Remove multiple call
218         of flash_do_release.
219
220         Bug fix.
221         * src/openpgp-do.c (gpg_do_write_prvkey): Don't hardcode 6, but
222         use strlen.
223
224         * src/flash.c, src/gnuk.ld.in: Rename "Flash DO Pool" to "Flash
225         Data Pool", because it's not only DO.
226         * src/gnuk.h, src/opengpg-do.c: Cleanup.
227
228         Digital Signature Counter implementation improvement.
229         * src/gnuk.h (NR_DO_DS_COUNT): Removed.
230         (NR_COUNTER_DS, NR_COUNTER_DS_LSB): New.
231         * src/openpgp-do.c (do_ds_count_initial_value): Removed.
232         (gpg_do_increment_digital_signature_counter): Removed.
233         (digital_signature_counter): New variable.
234         (do_ds_count, gpg_increment_digital_signature_counter): New functions.
235         (gpg_do_table): Change the entry for GPG_DO_DS_COUNT as DO_PROC_READ.
236         (gpg_do_table_init): Handle digital_signature_counter.
237         * src/flash.c (flash_data_pool_allocate, flash_put_data): New.
238
239         Password status implementation improvement.
240         * src/gnuk.h (PW_STATUS_PW1, PW_STATUS_RC, PW_STATUS_PW3): Removed.
241         (PW_ERR_PW1, PW_ERR_RC, PW_ERR_PW3): New define.
242         (NR_COUNTER_123, NR_BOOL_PW1_LIFETIME): New define.
243         (NR_NONE, NR_EMPTY): New define.
244         * src/flash.c (flash_bool_clear, flash_bool_write)
245         (flash_cnt123_get_value, flash_cnt123_increment)
246         (flash_cnt123_clear): New functions.
247         * src/openpgp-do.c (do_pw_status_bytes_template): Removed.
248         (PW_STATUS_BYTES_TEMPLATE, gpg_do_reset_pw_counter): Removed.
249         (PASSWORD_ERRORS_MAX, PW_LEN_MAX): New define.
250         (pw1_lifetime_p, pw_err_counter_p): New variables.
251         (gpg_get_pw1_lifetime): New function.
252         (gpg_get_pw_err_counter, gpg_passwd_locked, gpg_reset_pw_counter)
253         (gpg_increment_pw_counter): New functions.
254         (rw_pw_status): Use pw1_lifetime_p and pw_err_counter_p.
255         (gpg_do_table_init): Handle NR_COUNTER_123 and NR_BOOL_PW1_LIFETIME.
256         * src/ac.c (verify_pso_cds, verify_pso_other, verify_admin_0):
257         Follow the changes.
258         * src/openpgp.c (cmd_change_password, cmd_reset_user_password)
259         (cmd_pso, cmd_internal_authenticate): Likewise.
260
261 2010-11-04  NIIBE Yutaka  <gniibe@fsij.org>
262
263         * src/flash.c (flash_warning): New.
264         (flash_do_pool): Added header for DO pool.
265         (flash_do_release): Fill zero.
266         (flash_do_write): Change DO format in flash.
267         * src/openpgp-do.c (gpg_do_table_init, copy_do_1)
268         (gpg_do_read_simple): Follow the change of DO format in flash.
269
270         * src/openpgp-do.c (DO_CMP_READ): Renamed.
271         (cmp_ch_data, cmp_app_data, cmp_ss_temp): Likewise.
272         (with_tag): Removed static global variable.
273         (do_hist_bytes, do_fp_all, do_cafp_all, do_kgtime_all)
274         (rw_pw_status, copy_do_1, copy_do, gpg_do_get_data): Added
275         with_tag argument.
276         (gpg_do_put_data): length > 255 will be error.
277
278 2010-11-03  NIIBE Yutaka  <gniibe@fsij.org>
279
280         Bug fixes.
281         * src/ac.c (verify_admin_0): Initialize pwsb earlier.
282         * src/openpgp-do.c (copy_do_1): Access do_data[0] (was: do_data[1]).
283
284 2010-11-02  NIIBE Yutaka  <gniibe@fsij.org>
285
286         DfuSe support.
287         * tool/dfuse.py (DFU_STM32.download): Put '#' for each 4-KiB.
288         Added 0-length write to finish download.
289         Take intel_hex object as argument.
290         (DFU_STM32.ll_upload_block): New method.
291         (DFU_STM32.dfuse_read_memory): New method.
292         (DFU_STM32.verify): New method.
293         (get_device): Support DFU_STM32PROTOCOL_0 too (for CQ STARM).
294
295         * tool/dfuse.py: Renamed from dfu_stmicroelectronics_extention.py.
296
297 2010-11-01  NIIBE Yutaka  <gniibe@fsij.org>
298
299         * tool/intel_hex.py: New file.
300         * tool/dfu_stmicroelectronics_extention.py: New file.
301
302 2010-10-28  NIIBE Yutaka  <gniibe@fsij.org>
303
304         * src/gnuk.h (OPENPGP_CARD_INITIAL_PW3): New.
305         * src/ac.c (verify_admin_0): Use OPENPGP_CARD_INITIAL_PW3.
306
307 2010-10-23  NIIBE Yutaka  <gniibe@fsij.org>
308
309         * Version 0.3.
310
311         * src/usb_desc.c (gnukStringSerial): Updated.
312
313 2010-10-22  NIIBE Yutaka  <gniibe@fsij.org>
314
315         * src/gnuk.ld.in (.gnuk_random): Fix description so that
316         padding with 0xffffffff will be in gnuk.hex.
317
318         * src/openpgp.c (file_selection): Change type (was: int).
319         (FILE_NONE..FILE_EF_SERIAL): Change the values.
320
321         * src/configure: Added STBee Mini support.
322         * boards/STBEE_MINI/mcuconf.h: New.
323         * boards/STBEE_MINI/board.mk: New.
324         * boards/STBEE_MINI/board.h: New.
325         * boards/STBEE_MINI/board.c: New.
326
327         * ChibiOS_2.0.2/os/hal/platforms/STM32/hal_lld.c
328         (pal_default_config): STBee Mini uses STM32F103CBT6 which expose
329         no GPIO E port.
330
331 2010-10-21  NIIBE Yutaka  <gniibe@fsij.org>
332
333         * boards/common/hw_config.c (Get_SerialNum): Removed.
334         * src/usb_prop.c (gnuk_device_init): Remove calling Get_SerialNum.
335         * src/usb_desc.c (gnukStringSerial): Updated.
336         * boards/CQ_STARM/board.c (set_led): Fix polarity.
337
338 2010-10-20  NIIBE Yutaka  <gniibe@fsij.org>
339
340         * FSIJ_SERIAL_NUMBER: New.
341         * src/configure (with_fsij): Added FSIJ serial number support.
342         * src/config.h.in (@FSIJ_DEFINE@, @SERIAL_NUMBER_FOUR_BYTES@): New.
343
344         * src/configure: Added CQ STARM target.
345         * boards/CQ_STARM/mcuconf.h: New.
346         * boards/CQ_STARM/board.mk: New.
347         * boards/CQ_STARM/board.h: New.
348         * boards/CQ_STARM/board.c: New.
349
350 2010-10-19  NIIBE Yutaka  <gniibe@fsij.org>
351
352         * boards/STM32_PRIMER2/board.mk (BOARDSRC): Use common/hw_config.c.
353         * boards/OLIMEX_STM32_H103/board.mk (BOARDSRC): Likewise.
354
355         * boards/common/hw_config.c: Move board specific functions to ...
356         * boards/STM32_PRIMER2/board.c (USB_Cable_Config, set_led): ... here.
357         * boards/OLIMEX_STM32_H103/board.c (USB_Cable_Config, set_led): Ditto.
358
359         * boards/{OLIMEX_STM32_H103,STM32_PRIMER2}/hw_config.c: Removed.
360         * boards/common/hw_config.c: New file (was: boards/*/hw_config.c).
361
362         * .gitignore: New file.
363
364 2010-10-16  NIIBE Yutaka  <gniibe@fsij.org>
365
366         Implement "INTERNAL AUTHENTICATE" command.
367
368         * src/gnuk.h (BY_USER, BY_RESETCODE, BY_ADMIN): New defines.
369         (NUM_ALL_PRV_KEYS): Now it's 3 (was: 2).
370
371         * src/openpgp.c (INS_INTERNAL_AUTHENTICATE): New define.
372         (cmd_internal_authenticate): New function.
373         (cmds): Added INS_INTERNAL_AUTHENTICATE.
374         (cmd_change_password): Use BY_USER.
375         (cmd_reset_user_password): Use BY_USER, BY_RESETCODE, BY_ADMIN.
376         (cmd_pso): Load GPG_KEY_FOR_DECRYPTION here.
377         (cmd_pso): Removed adding status word into res_APDU...
378         * src/call-rsa.c (rsa_sign): and moved adding status word into
379         res_APDU here.
380
381         * src/ac.c (pw1_keystring): New variable.
382         (ac_reset_pso_other): Clear pw1_keystring.
383         (verify_pso_cds): Use BY_USER.
384         (verify_pso_other): Just check the length of password here, and
385         defer real check to cmd_pso or cmd_internal_authenticate.
386
387 2010-10-14  NIIBE Yutaka  <gniibe@fsij.org>
388
389         Adding 'configure' support.
390         * src/configure: New file.
391         * src/Makefile.in: Renamed from src/Makefile.
392         * src/config.h: Renamed from src/config.h.
393         * src/gnuk.ld: Renamed from src/gnuk.ld.
394
395         Adding DFU_SUPPORT.
396         * boards/common/hwinit0.c: New file adding DFU_SUPPORT.
397         * boards/common/hwinit1.c: New file.
398         * boards/OLIMEX_STM32_H103/board.c: Include config.h.
399         Use common/hwinit0.c and common/hwinit1.c.
400         * boards/STM32_PRIMER2/board.c: Likewise.
401
402 2010-09-16  NIIBE Yutaka  <gniibe@fsij.org>
403
404         * src/usb-icc.c (icc_error): New function.
405         (icc_handle_data): Call icc_error.
406         Don't go to STATE_START on errors.
407
408 2010-09-13  NIIBE Yutaka  <gniibe@fsij.org>
409
410         * Version 0.2.
411
412         * src/openpgp.c (cmd_select_file): Override data of number_of_bytes.
413
414         * src/openpgp-do.c (gpg_do_table_init): Calculate number of byte
415         which Data Objects consumes.
416
417 2010-09-12  Kaz Kojima <kkojima@rr.iij4u.or.jp>
418
419         * src/call-rsa.c (rsa_decrypt): Debug output only when DEBUG.
420
421         * boards/STM32_PRIMER2/hw_config.c (USB_Cable_Config): Fix GPIO.
422         (set_led): Ditto.
423
424         * boards/STM32_PRIMER2/board.c (hwinit1): Added LED initialization.
425
426 2010-09-11  NIIBE Yutaka  <gniibe@fsij.org>
427
428         * src/usb-icc.c (ATR): Fixed.
429         (icc_send_params): New function.
430         (icc_handle_data): Handle ICC_SET_PARAMS request.
431
432         * src/random.c (random_bytes_get, random_bytes_free, get_random):
433         Clear used random bytes.
434
435         * src/flash.c (flash_clear_halfword): New function.
436
437 2010-09-10  NIIBE Yutaka  <gniibe@fsij.org>
438
439         * Version 0.1.
440
441         * src/usb_desc.c (gnukStringSerial): Change the value so that
442         libccid doesn't get confused.
443
444         * src/openpgp.c (gpg_change_keystring): Support key for decryption
445         as well.
446         (cmd_read_binary): Use openpgpcard_aid.
447         (cmd_pso): call ac_reset_pso_other.
448
449         * src/openpgp-do.c (openpgpcard_aid): Renamed from aid, and exported.
450         (do_ds_count_initial_value): New const variable.
451         (num_prv_keys): New variable.
452         (gpg_do_write_prvkey): Remove contents of keystring only if
453         ++num_prv_keys == NUM_ALL_PRV_KEYS.
454         (gpg_do_chks_prvkey): Call flash_do_release.
455         (gpg_do_table_init): Initialize with do_ds_count_initial_value.
456         Initialize num_prv_keys.
457         (gpg_do_write_simple): Support removing DO.
458         (gpg_do_increment_digital_signature_counter): Call flash_do_release.
459
460         * src/gnuk.h (NUM_ALL_PRV_KEYS): New definition.
461         (OPENPGP_CARD_INITIAL_PW1): New definition.
462         (enum kind_of_key): Rename.
463
464         * src/ac.c (ac_reset_pso_cds): New function.
465
466 2010-09-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
467
468         * boards/STM32_PRIMER2/{board.c,board.h,board.mk,hw_config.c,mcuconf.h}:
469         New files.
470
471         * boards/OLIMEX_STM32_H103/{mcuconf.h,hw_config.c}: Moved from src.
472
473         * src/main.c (main): Use set_led instead of palClearPad directly.
474
475 2010-09-08  NIIBE Yutaka  <gniibe@fsij.org>
476
477         * src/ac.c (calc_md): Make SHA1 variable auto.
478
479         * src/debug.c (put_int): New.
480
481         * src/gnuk.ld (__process_stack_size__): Removed.
482
483         * src/main.c (STDOUTthread): Use Event.
484         (main): Make LED ON during command execution, blink usually.
485
486         * src/openpgp-do.c (encrypt, decrypt): Make AES variables auto.
487         (gpg_do_table): GPG_DO_ALG_AUT is NULL.
488
489         * src/openpgp.c (cmd_pso): Bug fix for extended Lc.
490
491         * src/usb-icc.c (icc_power_off): Make LED ON during command
492         execution.
493         (USB_ICC_TIMEOUT): Longer value (was: 1000).
494
495         * src/usb_desc.c (gnukConfigDescriptor): Fix bcdCCID value.
496
497         * src/vcomport.mk (VCOMSRC): Use our own usb_endp.c.
498
499         * src/usb_desc.c (gnukConfigDescriptor): ICC Descriptor is
500         Revision 1.0.
501
502         * polarssl-0.14.0/include/polarssl/config.h: Commend out
503         POLARSSL_SELF_TEST.
504
505         * polarssl-0.14.0/library/rsa.c (rsa_private): Don't check input,
506         so that we don't access ctx->N.
507         (rsa_pkcs1_decrypt): size of BUF is enough as 256.
508
509         * polarssl-0.14.0/library/sha1.c (sha1_file): #if-out to avoid
510         stdio of libc.
511
512         * polarssl-0.14.0/library/bignum.c (mpi_write_hlp)
513         (mpi_write_string, mpi_read_file, mpi_read_file): #if-out to avoid
514         stdio of libc.
515
516 2010-09-07  NIIBE Yutaka  <gniibe@fsij.org>
517
518         * gnuk.svg: New file.
519
520 2010-09-06  NIIBE Yutaka  <gniibe@fsij.org>
521
522         * Initial version 0.0.