#include "gss_internal.h"
#include "gss_api.h"
-static LIST_HEAD(registered_mechs);
+static CFS_LIST_HEAD(registered_mechs);
static spinlock_t registered_mechs_lock = SPIN_LOCK_UNLOCKED;
int lgss_mech_register(struct gss_api_mech *gm)
mic_token);
}
-#if 0
-__u32 lgss_wrap(struct gss_ctx *context_handle,
- __u32 qop,
- rawobj_buf_t *inbuf,
- rawobj_t *outbuf)
-{
- LASSERT(context_handle);
- LASSERT(context_handle->mech_type);
- LASSERT(context_handle->mech_type->gm_ops);
- LASSERT(context_handle->mech_type->gm_ops->gss_wrap);
-
- return context_handle->mech_type->gm_ops
- ->gss_wrap(context_handle, qop, inbuf, outbuf);
-}
-#endif
-
__u32 lgss_wrap(struct gss_ctx *context_handle,
+ rawobj_t *gsshdr,
rawobj_t *msg,
int msg_buflen,
rawobj_t *out_token)
LASSERT(context_handle->mech_type->gm_ops->gss_wrap);
return context_handle->mech_type->gm_ops
- ->gss_wrap(context_handle, msg, msg_buflen, out_token);
+ ->gss_wrap(context_handle, gsshdr, msg, msg_buflen, out_token);
}
__u32 lgss_unwrap(struct gss_ctx *context_handle,
+ rawobj_t *gsshdr,
rawobj_t *token,
rawobj_t *out_msg)
{
LASSERT(context_handle->mech_type->gm_ops->gss_unwrap);
return context_handle->mech_type->gm_ops
- ->gss_unwrap(context_handle, token, out_msg);
+ ->gss_unwrap(context_handle, gsshdr, token, out_msg);
}
__u32 lgss_plain_encrypt(struct gss_ctx *ctx,
+ int decrypt,
int length,
void *in_buf,
void *out_buf)
LASSERT(ctx->mech_type->gm_ops->gss_plain_encrypt);
return ctx->mech_type->gm_ops
- ->gss_plain_encrypt(ctx, length, in_buf, out_buf);
+ ->gss_plain_encrypt(ctx, decrypt, length, in_buf, out_buf);
}
/* gss_delete_sec_context: free all resources associated with context_handle.