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