PKCS#7: fix missing break on OID_sha224 case
authorColin Ian King <colin.king@canonical.com>
Fri, 18 Mar 2016 15:51:31 +0000 (15:51 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Apr 2016 12:35:44 +0000 (20:35 +0800)
The OID_sha224 case is missing a break and it falls through
to the -ENOPKG error default.  Since HASH_ALGO_SHA224 seems
to be supported, this looks like an unintentional missing break.

Fixes: 07f081fb5057 ("PKCS#7: Add OIDs for sha224, sha284 and sha512 hash algos and use them")
Cc: <stable@vger.kernel.org> # 4.2+
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/asymmetric_keys/pkcs7_parser.c

index 40de03f49ff8d612df32e57a07987d65210eccdf..bdd0d753ce5d15e3946ffc852b3e42aaea7b6f68 100644 (file)
@@ -237,6 +237,7 @@ int pkcs7_sig_note_digest_algo(void *context, size_t hdrlen,
                break;
        case OID_sha224:
                ctx->sinfo->sig.hash_algo = "sha224";
+               break;
        default:
                printk("Unsupported digest algo: %u\n", ctx->last_oid);
                return -ENOPKG;