s4:auth/gensec_gssapi: handle GENSEC_FEATURE_SIGN_PKT_HEADER in have_feature()
authorStefan Metzmacher <metze@samba.org>
Tue, 31 Dec 2013 08:54:54 +0000 (09:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 6 Jan 2014 23:27:11 +0000 (00:27 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/auth/gensec/gensec_gssapi.c

index c384914f922ae3ddbccff0f8b05eb1234ad35550..3f61cb584dacfae7b6407605e5af8075dfd4b987 100644 (file)
@@ -1276,6 +1276,18 @@ static bool gensec_gssapi_have_feature(struct gensec_security *gensec_security,
        if (feature & GENSEC_FEATURE_ASYNC_REPLIES) {
                return true;
        }
+       if (feature & GENSEC_FEATURE_SIGN_PKT_HEADER) {
+               if (gensec_security->want_features & GENSEC_FEATURE_SEAL) {
+                       /* TODO: implement this using gss_wrap_iov() */
+                       return false;
+               }
+
+               if (gensec_security->want_features & GENSEC_FEATURE_SIGN) {
+                       return true;
+               }
+
+               return false;
+       }
        return false;
 }