support digestinfo by MD5

This commit is contained in:
NIIBE Yutaka 2011-01-25 10:48:33 +09:00
parent 87a495885b
commit 674ec283ea
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-01-25 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (cmd_pso): Support DigestInfo by MD5 (for opensc).
2011-01-22 NIIBE Yutaka <gniibe@fsij.org> 2011-01-22 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (cmd_pgp_gakp): Handle case of non-extended Lc. * src/openpgp.c (cmd_pgp_gakp): Handle case of non-extended Lc.

View File

@ -685,8 +685,9 @@ cmd_pso (void)
return; return;
} }
if (cmd_APDU_size != 7 + 35 + 2 /* SHA1 / RIPEMD-160 */ if (cmd_APDU_size != 7 + 34 + 2 /* MD5 */
/* Header (with Extended Lc)=7, size of digestInfo, and Le=2-byte */ /* Header (with Extended Lc)=7, size of digestInfo, and Le=2-byte */
&& cmd_APDU_size != 7 + 35 + 2 /* SHA1 / RIPEMD-160 */
&& cmd_APDU_size != 7 + 47 + 2 /* SHA224 */ && cmd_APDU_size != 7 + 47 + 2 /* SHA224 */
&& cmd_APDU_size != 7 + 51 + 2 /* SHA256 */ && cmd_APDU_size != 7 + 51 + 2 /* SHA256 */
&& cmd_APDU_size != 7 + 67 + 2 /* SHA384 */ && cmd_APDU_size != 7 + 67 + 2 /* SHA384 */