diff options
author | Theodore Tso <tytso@mit.edu> | 1995-11-18 03:11:26 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-11-18 03:11:26 +0000 |
commit | b0ee9d6d0167c55479bdb55bfbe1c22ab9355d6c (patch) | |
tree | f5a14061a1beb5cbf43dc1e1c6a996b8e3344922 /src/lib/gssapi/mechglue/g_seal.c | |
parent | 1124954ffcd3e1e500f372f55bda6cadad4ff4ad (diff) | |
download | krb5-b0ee9d6d0167c55479bdb55bfbe1c22ab9355d6c.tar.gz krb5-b0ee9d6d0167c55479bdb55bfbe1c22ab9355d6c.tar.xz krb5-b0ee9d6d0167c55479bdb55bfbe1c22ab9355d6c.zip |
Renamed filenames so they would be unique in an 8.3 filesystem. Added
GSSAPI V2 functions to mechglueP.h (now mglueP.h)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7114 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi/mechglue/g_seal.c')
-rw-r--r-- | src/lib/gssapi/mechglue/g_seal.c | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/lib/gssapi/mechglue/g_seal.c b/src/lib/gssapi/mechglue/g_seal.c new file mode 100644 index 0000000000..0981b73edb --- /dev/null +++ b/src/lib/gssapi/mechglue/g_seal.c @@ -0,0 +1,87 @@ +#ident "@(#)gss_seal.c 1.10 95/08/07 SMI" +/* + * glue routine for gss_seal + * + * Copyright (c) 1995, by Sun Microsystems, Inc. + * All rights reserved. + */ + +#include "mglueP.h" + +OM_uint32 +gss_seal (minor_status, + context_handle, + conf_req_flag, + qop_req, + input_message_buffer, + conf_state, + output_message_buffer) + +OM_uint32 * minor_status; +gss_ctx_id_t context_handle; +int conf_req_flag; +int qop_req; +gss_buffer_t input_message_buffer; +int * conf_state; +gss_buffer_t output_message_buffer; + +{ + 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 = get_mechanism (ctx->mech_type); + + if (mech) { + if (mech->gss_seal) + status = mech->gss_seal( + mech->context, + minor_status, + ctx->internal_ctx_id, + conf_req_flag, + qop_req, + input_message_buffer, + conf_state, + output_message_buffer); + else + status = GSS_S_BAD_BINDINGS; + + return(status); + } + + return(GSS_S_NO_CONTEXT); +} + +OM_uint32 +gss_wrap (minor_status, + context_handle, + conf_req_flag, + qop_req, + input_message_buffer, + conf_state, + output_message_buffer) + +OM_uint32 * minor_status; +gss_ctx_id_t context_handle; +int conf_req_flag; +gss_qop_t qop_req; +gss_buffer_t input_message_buffer; +int * conf_state; +gss_buffer_t output_message_buffer; + +{ + return gss_seal(minor_status, context_handle, conf_req_flag, + (int) qop_req, input_message_buffer, conf_state, + output_message_buffer); +} |