#include <linux/types.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/oid_registry.h>
#include <linux/sunrpc/msg_prot.h>
#include <linux/sunrpc/gss_asn1.h>
#include <linux/sunrpc/auth_gss.h>
#include <linux/sunrpc/svcauth_gss.h>
#include <linux/sunrpc/gss_err.h>
#include <linux/sunrpc/sched.h>
#include <linux/sunrpc/gss_api.h>
#include <linux/sunrpc/clnt.h>
#include <trace/events/rpcgss.h>
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
#define RPCDBG_FACILITY …
#endif
static LIST_HEAD(registered_mechs);
static DEFINE_SPINLOCK(registered_mechs_lock);
static void
gss_mech_free(struct gss_api_mech *gm)
{ … }
static inline char *
make_auth_domain_name(char *name)
{ … }
static int
gss_mech_svc_setup(struct gss_api_mech *gm)
{ … }
int gss_mech_register(struct gss_api_mech *gm)
{ … }
EXPORT_SYMBOL_GPL(…);
void gss_mech_unregister(struct gss_api_mech *gm)
{ … }
EXPORT_SYMBOL_GPL(…);
struct gss_api_mech *gss_mech_get(struct gss_api_mech *gm)
{ … }
EXPORT_SYMBOL(…);
static struct gss_api_mech *
_gss_mech_get_by_name(const char *name)
{ … }
struct gss_api_mech * gss_mech_get_by_name(const char *name)
{ … }
struct gss_api_mech *gss_mech_get_by_OID(struct rpcsec_gss_oid *obj)
{ … }
static inline int
mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
{ … }
static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
{ … }
struct gss_api_mech *
gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
{ … }
rpc_authflavor_t gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 qop,
u32 service)
{ … }
rpc_authflavor_t gss_mech_info2flavor(struct rpcsec_gss_info *info)
{ … }
int gss_mech_flavor2info(rpc_authflavor_t pseudoflavor,
struct rpcsec_gss_info *info)
{ … }
u32
gss_pseudoflavor_to_service(struct gss_api_mech *gm, u32 pseudoflavor)
{ … }
EXPORT_SYMBOL(…);
bool
gss_pseudoflavor_to_datatouch(struct gss_api_mech *gm, u32 pseudoflavor)
{ … }
char *
gss_service_to_auth_domain_name(struct gss_api_mech *gm, u32 service)
{ … }
void
gss_mech_put(struct gss_api_mech * gm)
{ … }
EXPORT_SYMBOL(…);
int
gss_import_sec_context(const void *input_token, size_t bufsize,
struct gss_api_mech *mech,
struct gss_ctx **ctx_id,
time64_t *endtime,
gfp_t gfp_mask)
{ … }
u32
gss_get_mic(struct gss_ctx *context_handle,
struct xdr_buf *message,
struct xdr_netobj *mic_token)
{ … }
u32
gss_verify_mic(struct gss_ctx *context_handle,
struct xdr_buf *message,
struct xdr_netobj *mic_token)
{ … }
u32
gss_wrap(struct gss_ctx *ctx_id,
int offset,
struct xdr_buf *buf,
struct page **inpages)
{ … }
u32
gss_unwrap(struct gss_ctx *ctx_id,
int offset,
int len,
struct xdr_buf *buf)
{ … }
u32
gss_delete_sec_context(struct gss_ctx **context_handle)
{ … }