Other digestInfo support

This commit is contained in:
NIIBE Yutaka
2010-11-26 09:56:23 +09:00
parent 2c672210ff
commit 26ba4e2766
4 changed files with 11 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
2010-11-26 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (cmd_pso): DigestInfo by SHA224/SHA384/SHA512 is supported.
2010-11-22 NIIBE Yutaka <gniibe@fsij.org>
Import changes of ChibiOS_2.0.6.

2
README
View File

@@ -104,7 +104,7 @@ External source code
Gnuk is distributed with external source code.
* ChibiOS_2.0.2/ -- ChibiOS/RT 2.0.2
* ChibiOS_2.0.6/ -- ChibiOS/RT 2.0.6
Taken from http://chibios.sourceforge.net/
Note that CRLF is converted to LF in this repository.

View File

@@ -63,7 +63,7 @@ PROJECT = gnuk
LDSCRIPT= gnuk.ld
# Imported source files
CHIBIOS = ../ChibiOS_2.0.2
CHIBIOS = ../ChibiOS_2.0.6
include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F10x/port.mk

View File

@@ -560,9 +560,11 @@ cmd_pso (void)
return;
}
if ((cmd_APDU_size != 8 + 35 && cmd_APDU_size != 8 + 35 + 1) /* SHA1 */
/* or SHA256 */
&& (cmd_APDU_size != 8 + 51 && cmd_APDU_size != 8 + 51 + 1))
if ((cmd_APDU_size != 8 + 35 && cmd_APDU_size != 8 + 35 + 1) /* SHA1 / RIPEMD-160 */
&& (cmd_APDU_size != 8 + 47 && cmd_APDU_size != 8 + 47 + 1) /* SHA224 */
&& (cmd_APDU_size != 8 + 51 && cmd_APDU_size != 8 + 51 + 1) /* SHA256 */
&& (cmd_APDU_size != 8 + 67 && cmd_APDU_size != 8 + 67 + 1) /* SHA384 */
&& (cmd_APDU_size != 8 + 83 && cmd_APDU_size != 8 + 83 + 1) /* SHA512 */)
/* Extended Lc: 3-byte */
{
DEBUG_INFO (" wrong length: ");