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