]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - crypto/asymmetric_keys/pkcs7_verify.c
Merge tag 'rtc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[karo-tx-linux.git] / crypto / asymmetric_keys / pkcs7_verify.c
index 325575caf6b452ba89ef84985c13d504e956f86e..50be2a15e5318432e2366cb96d92be7356a02197 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/err.h>
 #include <linux/asn1.h>
 #include <crypto/hash.h>
-#include "public_key.h"
+#include <crypto/public_key.h>
 #include "pkcs7_parser.h"
 
 /*
@@ -31,17 +31,15 @@ static int pkcs7_digest(struct pkcs7_message *pkcs7,
        void *digest;
        int ret;
 
-       kenter(",%u,%u", sinfo->index, sinfo->sig.pkey_hash_algo);
+       kenter(",%u,%s", sinfo->index, sinfo->sig.hash_algo);
 
-       if (sinfo->sig.pkey_hash_algo >= PKEY_HASH__LAST ||
-           !hash_algo_name[sinfo->sig.pkey_hash_algo])
+       if (!sinfo->sig.hash_algo)
                return -ENOPKG;
 
        /* Allocate the hashing algorithm we're going to need and find out how
         * big the hash operational data will be.
         */
-       tfm = crypto_alloc_shash(hash_algo_name[sinfo->sig.pkey_hash_algo],
-                                0, 0);
+       tfm = crypto_alloc_shash(sinfo->sig.hash_algo, 0, 0);
        if (IS_ERR(tfm))
                return (PTR_ERR(tfm) == -ENOENT) ? -ENOPKG : PTR_ERR(tfm);