Sat Feb 24 16:19:30 1996 Theodore Y. Ts'o <tytso@dcl>
+ * mglueP.h:
+ * g_seal.c: Add support for new V2 call gss_wrap_size_limit()
+
* g_mechname.c (gss_add_mech_name_type): Only mark a name-type as
being non-mechanism-specific if the mechanism doesn't
match the type currently associated with the name-type.
#include "mglueP.h"
-OM_uint32
+OM_uint32 INTERFACE
gss_seal (minor_status,
context_handle,
conf_req_flag,
return(GSS_S_NO_CONTEXT);
}
-OM_uint32
+OM_uint32 INTERFACE
gss_wrap (minor_status,
context_handle,
conf_req_flag,
(int) qop_req, input_message_buffer, conf_state,
output_message_buffer);
}
+
+/*
+ * New for V2
+ */
+OM_uint32 INTERFACE
+gss_wrap_size_limit(minor_status, context_handle, conf_req_flag,
+ qop_req, req_output_size, max_input_size)
+ OM_uint32 *minor_status;
+ gss_ctx_id_t context_handle;
+ int conf_req_flag;
+ gss_qop_t qop_req;
+ OM_uint32 req_output_size;
+ OM_uint32 *max_input_size;
+{
+ OM_uint32 status;
+ gss_union_ctx_id_t ctx;
+ gss_mechanism mech;
+
+ gss_initialize();
+
+ if (context_handle == GSS_C_NO_CONTEXT)
+ return GSS_S_NO_CONTEXT;
+
+ /*
+ * select the approprate underlying mechanism routine and
+ * call it.
+ */
+
+ ctx = (gss_union_ctx_id_t) context_handle;
+ mech = __gss_get_mechanism (ctx->mech_type);
+
+ if (!mech)
+ return (GSS_S_NO_CONTEXT);
+
+ if (!mech->gss_wrap_size_limit)
+ return (GSS_S_BAD_BINDINGS);
+
+ status = mech->gss_wrap_size_limit(mech->context, minor_status,
+ context_handle, conf_req_flag, qop_req,
+ req_output_size, max_input_size);
+ return(status);
+}
OM_uint32 *, /* minor_status */
gss_OID * /* OID */
));
+ OM_uint32 (*gss_wrap_size_limit)
+ NPROTOTYPE((
+ void *, /* context */
+ OM_uint32 *, /* minor_status */
+ gss_ctx_id_t, /* context_handle */
+ int, /* conf_req_flag */
+ gss_qop_t, /* qop_req */
+ OM_uint32, /* req_output_size */
+ OM_uint32 * /* max_input_size */
+ ));
int (*pname_to_uid)
NPROTOTYPE((
void *, /* context */