summaryrefslogtreecommitdiff
path: root/net/sunrpc/auth_gss/gss_krb5_internal.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-01-15 20:23:34 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-02-20 17:20:46 +0300
commiteebd8c2d1978f5cb6e76e4e3045220b67548cb79 (patch)
treefc9e282885de3c30d9517ce0e0ccb1d855f5d7b4 /net/sunrpc/auth_gss/gss_krb5_internal.h
parent6e460c230d2dfb0e5a02b6e0995546bb4b9d208e (diff)
downloadlinux-eebd8c2d1978f5cb6e76e4e3045220b67548cb79.tar.xz
SUNRPC: Add KUnit tests for rpcsec_krb5.ko
The Kerberos RFCs provide test vectors to verify the operation of an implementation. Introduce a KUnit test framework to exercise the Linux kernel's implementation of Kerberos. Start with test cases for the RFC 3961-defined n-fold function. The sample vectors for that are found in RFC 3961 Section 10. Run the GSS Kerberos 5 mechanism's unit tests with this command: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig ./net/sunrpc/.kunitconfig Tested-by: Scott Mayhew <smayhew@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_internal.h')
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_internal.h b/net/sunrpc/auth_gss/gss_krb5_internal.h
index 850748f6733a..9aba1647c205 100644
--- a/net/sunrpc/auth_gss/gss_krb5_internal.h
+++ b/net/sunrpc/auth_gss/gss_krb5_internal.h
@@ -214,4 +214,8 @@ u32 krb5_etm_encrypt(struct krb5_ctx *kctx, u32 offset, struct xdr_buf *buf,
u32 krb5_etm_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len,
struct xdr_buf *buf, u32 *headskip, u32 *tailskip);
+#if IS_ENABLED(CONFIG_KUNIT)
+void krb5_nfold(u32 inbits, const u8 *in, u32 outbits, u8 *out);
+#endif
+
#endif /* _NET_SUNRPC_AUTH_GSS_KRB5_INTERNAL_H */