OSDN Git Service

SUNRPC: Add RFC 8009 encryption KUnit tests
authorChuck Lever <chuck.lever@oracle.com>
Sun, 15 Jan 2023 17:24:31 +0000 (12:24 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 20 Feb 2023 14:20:51 +0000 (09:20 -0500)
commit4d2d15c0f1e05ef2478d4891b79570a87c5dd1a6
tree991e428091f33eded6248d9124f4702d46d63039
parent003caf4f8c6af53ac48759669f0bd0dd7f69e6f5
SUNRPC: Add RFC 8009 encryption KUnit tests

RFC 8009 provides sample encryption results. Add KUnit tests to
ensure our implementation derives the expected results for the
provided sample input.

I hate how large this test is, but using non-standard key usage
values means rfc8009_encrypt_case() can't simply reuse ->import_ctx
to allocate and key its ciphers; and the test provides its own
confounders, which means krb5_etm_encrypt() can't be used directly.

Tested-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/auth_gss/gss_krb5_crypto.c
net/sunrpc/auth_gss/gss_krb5_internal.h
net/sunrpc/auth_gss/gss_krb5_test.c