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