#include <kunit/test.h>
#include <kunit/visibility.h>
#include <linux/kernel.h>
#include <crypto/hash.h>
#include <linux/sunrpc/xdr.h>
#include <linux/sunrpc/gss_krb5.h>
#include "gss_krb5_internal.h"
MODULE_IMPORT_NS(…);
struct gss_krb5_test_param { … };
static inline void gss_krb5_get_desc(const struct gss_krb5_test_param *param,
char *desc)
{ … }
static void kdf_case(struct kunit *test)
{ … }
static void checksum_case(struct kunit *test)
{ … }
#define DEFINE_HEX_XDR_NETOBJ(name, hex_array...) …
#define DEFINE_STR_XDR_NETOBJ(name, string) …
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc3961_nfold_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc3961_nfold, rfc3961_nfold_test_params, gss_krb5_get_desc);
static void rfc3961_nfold_case(struct kunit *test)
{ … }
static struct kunit_case rfc3961_test_cases[] = …;
static struct kunit_suite rfc3961_suite = …;
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc3962_encrypt_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc3962_encrypt, rfc3962_encrypt_test_params,
gss_krb5_get_desc);
static void rfc3962_encrypt_case(struct kunit *test)
{ … }
static struct kunit_case rfc3962_test_cases[] = …;
static struct kunit_suite rfc3962_suite = …;
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc6803_kdf_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc6803_kdf, rfc6803_kdf_test_params, gss_krb5_get_desc);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc6803_checksum_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc6803_checksum, rfc6803_checksum_test_params,
gss_krb5_get_desc);
static const struct xdr_netobj rfc6803_enc_empty_plaintext = …;
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_STR_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc6803_encrypt_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc6803_encrypt, rfc6803_encrypt_test_params,
gss_krb5_get_desc);
static void rfc6803_encrypt_case(struct kunit *test)
{ … }
static struct kunit_case rfc6803_test_cases[] = …;
static struct kunit_suite rfc6803_suite = …;
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc8009_kdf_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc8009_kdf, rfc8009_kdf_test_params, gss_krb5_get_desc);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc8009_checksum_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc8009_checksum, rfc8009_checksum_test_params,
gss_krb5_get_desc);
static const struct xdr_netobj rfc8009_enc_empty_plaintext = …;
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
DEFINE_HEX_XDR_NETOBJ(…);
static const struct gss_krb5_test_param rfc8009_encrypt_test_params[] = …;
KUNIT_ARRAY_PARAM(rfc8009_encrypt, rfc8009_encrypt_test_params,
gss_krb5_get_desc);
static void rfc8009_encrypt_case(struct kunit *test)
{ … }
static struct kunit_case rfc8009_test_cases[] = …;
static struct kunit_suite rfc8009_suite = …;
DEFINE_STR_XDR_NETOBJ(…);
static const struct gss_krb5_test_param encrypt_selftest_params[] = …;
KUNIT_ARRAY_PARAM(encrypt_selftest, encrypt_selftest_params,
gss_krb5_get_desc);
static void encrypt_selftest_case(struct kunit *test)
{ … }
static struct kunit_case encryption_test_cases[] = …;
static struct kunit_suite encryption_test_suite = …;
kunit_test_suites(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;