SUNRPC: Add support for privacy to generic gss-api code.
authorJ. Bruce Fields <bfields@fieldses.org>
Thu, 13 Oct 2005 20:54:37 +0000 (16:54 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Oct 2005 06:19:42 +0000 (23:19 -0700)
 Add support for privacy to generic gss-api code.  This is dead code until we
 have both a mechanism that supports privacy and code in the client or server
 that uses it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/gss_api.h
net/sunrpc/auth_gss/gss_mech_switch.c

index 689262f6305987183568e3f919121eea01bf7208..e896752ffbf9ec629d301538438e71a964f8b2c3 100644 (file)
@@ -48,6 +48,17 @@ u32 gss_verify_mic(
                struct xdr_buf          *message,
                struct xdr_netobj       *mic_token,
                u32                     *qstate);
+u32 gss_wrap(
+               struct gss_ctx          *ctx_id,
+               u32                     qop,
+               int                     offset,
+               struct xdr_buf          *outbuf,
+               struct page             **inpages);
+u32 gss_unwrap(
+               struct gss_ctx          *ctx_id,
+               u32                     *qop,
+               int                     offset,
+               struct xdr_buf          *inbuf);
 u32 gss_delete_sec_context(
                struct gss_ctx          **ctx_id);
 
@@ -93,6 +104,17 @@ struct gss_api_ops {
                        struct xdr_buf          *message,
                        struct xdr_netobj       *mic_token,
                        u32                     *qstate);
+       u32 (*gss_wrap)(
+                       struct gss_ctx          *ctx_id,
+                       u32                     qop,
+                       int                     offset,
+                       struct xdr_buf          *outbuf,
+                       struct page             **inpages);
+       u32 (*gss_unwrap)(
+                       struct gss_ctx          *ctx_id,
+                       u32                     *qop,
+                       int                     offset,
+                       struct xdr_buf          *buf);
        void (*gss_delete_sec_context)(
                        void                    *internal_ctx_id);
 };
index 58aeaddd8c794bb2b7a59b24e330780185046ab4..06d97cb3481a3ecf02b82a92d466453c65303a14 100644 (file)
@@ -276,6 +276,28 @@ gss_verify_mic(struct gss_ctx              *context_handle,
                                 qstate);
 }
 
+u32
+gss_wrap(struct gss_ctx        *ctx_id,
+        u32            qop,
+        int            offset,
+        struct xdr_buf *buf,
+        struct page    **inpages)
+{
+       return ctx_id->mech_type->gm_ops
+               ->gss_wrap(ctx_id, qop, offset, buf, inpages);
+}
+
+u32
+gss_unwrap(struct gss_ctx      *ctx_id,
+          u32                  *qop,
+          int                  offset,
+          struct xdr_buf       *buf)
+{
+       return ctx_id->mech_type->gm_ops
+               ->gss_unwrap(ctx_id, qop, offset, buf);
+}
+
+
 /* gss_delete_sec_context: free all resources associated with context_handle.
  * Note this differs from the RFC 2744-specified prototype in that we don't
  * bother returning an output token, since it would never be used anyway. */