]> git.karo-electronics.de Git - karo-tx-linux.git/commit
RSA: Fix signature verification for shorter signatures
authorDavid Howells <dhowells@redhat.com>
Fri, 21 Sep 2012 22:28:05 +0000 (23:28 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 28 Sep 2012 05:14:52 +0000 (14:44 +0930)
commita94275f24f30c4e9acabf853aa016232c507c75e
tree0ed232f3630e67b2ff84eee82eb30b862bccff88
parent66f3473d3ae425af85e1cdadfce4310b904d2da6
RSA: Fix signature verification for shorter signatures

gpg can produce a signature file where length of signature is less than the
modulus size because the amount of space an MPI takes up is kept as low as
possible by discarding leading zeros.  This regularly happens for several
modules during the build.

Fix it by relaxing check in RSA verification code.

Thanks to Tomas Mraz and Miloslav Trmac for help.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
crypto/asymmetric_keys/rsa.c