summaryrefslogtreecommitdiff
path: root/crypto/zstd.c
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@linux.ibm.com>2019-06-27 23:19:26 -0300
committerMimi Zohar <zohar@linux.ibm.com>2019-08-05 18:40:19 -0400
commit6603ccbb3d67e6b2340a7f6a75e7abad682b94a3 (patch)
treeb20bf8a5fe10c57dbe3787851e7250d4c6b7131b /crypto/zstd.c
parent0a4fa7ef65b9f8d2d8cd0db31769f3a0eb77e76f (diff)
downloadlinux-crypto-6603ccbb3d67e6b2340a7f6a75e7abad682b94a3.tar.gz
linux-crypto-6603ccbb3d67e6b2340a7f6a75e7abad682b94a3.zip
PKCS#7: Introduce pkcs7_get_digest()
IMA will need to access the digest of the PKCS7 message (as calculated by the kernel) before the signature is verified, so introduce pkcs7_get_digest() for that purpose. Also, modify pkcs7_digest() to detect when the digest was already calculated so that it doesn't have to do redundant work. Verifying that sinfo->sig->digest isn't NULL is sufficient because both places which allocate sinfo->sig (pkcs7_parse_message() and pkcs7_note_signed_info()) use kzalloc() so sig->digest is always initialized to zero. Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Cc: David Howells <dhowells@redhat.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'crypto/zstd.c')
0 files changed, 0 insertions, 0 deletions