]> git.baikalelectronics.ru Git - kernel.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>
Mon, 8 Oct 2012 03:20:17 +0000 (13:50 +1030)
commit1d165d835ca4566ee43ba962895b225844ef9b5c
tree2e2eab236c2fa23d568e0ee7179fbfdc5cf2b3ba
parent33340723146b438386accf8393141b5f29142bf4
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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
crypto/asymmetric_keys/rsa.c