]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: testmgr - fix wrong key length for pkcs1pad
authorLei He <helei.sig11@bytedance.com>
Fri, 22 Oct 2021 12:44:43 +0000 (20:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:47:25 +0000 (12:47 +0100)
[ Upstream commit 39ef08517082a424b5b65c3dbaa6c0fa9d3303b9 ]

Fix wrong test data at testmgr.h, it seems to be caused
by ignoring the last '\0' when calling sizeof.

Signed-off-by: Lei He <helei.sig11@bytedance.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/testmgr.h

index 8c83811c0e351f035d6a17f6860eb0d009d8b0d7..b04e9943c8c7fe1060b8bcaea433d771978a0342 100644 (file)
@@ -777,7 +777,7 @@ static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = {
        "\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d\x46"
        "\xb8\x35\xdf\x41\x02\x01\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00"
        "\x02\x01\x00",
-       .key_len = 804,
+       .key_len = 803,
        /*
         * m is SHA256 hash of following message:
         * "\x49\x41\xbe\x0a\x0c\xc9\xf6\x35\x51\xe4\x27\x56\x13\x71\x4b\xd0"