Add support for new V2 call gss_wrap_size_limit()
authorTheodore Tso <tytso@mit.edu>
Sun, 25 Feb 1996 00:27:20 +0000 (00:27 +0000)
committerTheodore Tso <tytso@mit.edu>
Sun, 25 Feb 1996 00:27:20 +0000 (00:27 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7532 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/mechglue/ChangeLog
src/lib/gssapi/mechglue/g_seal.c
src/lib/gssapi/mechglue/mglueP.h

index c2a45cd0ad14ecfbbc552edfb2b9c80d4184c5ae..1a9afca67fa74a5b78b0a657f707f4d66f3e6fa7 100644 (file)
@@ -1,5 +1,8 @@
 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.
index 7512cecc4ae21d7cdcbb37a049e0dc4b69e10f8d..99805a422caecaf845df5a9d2b9c676399ed6dab 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "mglueP.h"
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_seal (minor_status,
           context_handle,
           conf_req_flag,
@@ -83,7 +83,7 @@ gss_buffer_t          output_message_buffer;
     return(GSS_S_NO_CONTEXT);
 }
 
-OM_uint32
+OM_uint32 INTERFACE
 gss_wrap (minor_status,
           context_handle,
           conf_req_flag,
@@ -105,3 +105,45 @@ gss_buffer_t               output_message_buffer;
                        (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);
+}
index 553064419ff8d01d99541064fe84f9026bc1184e..0abc81cf2773a5bdcfcb5dfb7b6395e16556cb79 100644 (file)
@@ -316,6 +316,16 @@ typedef struct gss_config {
                    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 */