When I want to verify if a given file has been signed by the public keys private counterpart, I would use openssl like this:
openssl dgst -verify public.pem -signature file.sha1 file.data
How can I accomplish this inside a Linux 3 kernel module?