PKCS#7: fix missing break on OID_sha224 case

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: 07f081fb50 ("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>
This commit is contained in:
Colin Ian King 2016-03-18 15:51:31 +00:00 committed by Herbert Xu
parent 150f6d457c
commit 06af9b0f49

View File

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