Allow building without NTLMSSP support
[mod_auth_gssapi.git] / src / mod_auth_gssapi.h
index 00765c4..d73036b 100644 (file)
@@ -3,10 +3,6 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <time.h>
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_ext.h>
-#include <gssapi/gssapi_krb5.h>
-#include <gssapi/gssapi_ntlmssp.h>
 
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 #undef PACKAGE_VERSION
 #include "config.h"
 
+#include <gssapi/gssapi.h>
+#include <gssapi/gssapi_ext.h>
+#include <gssapi/gssapi_krb5.h>
+#ifdef HAVE_GSSAPI_GSSAPI_NTLMSSP_H
+#  include <gssapi/gssapi_ntlmssp.h>
+#endif
+
 #include "crypto.h"
 #include "sessions.h"
 
@@ -55,12 +58,30 @@ struct mag_config {
     gss_key_value_set_desc *cred_store;
 #endif
     struct seal_key *mag_skey;
+
     bool use_basic_auth;
     gss_OID_set_desc *allowed_mechs;
+    gss_OID_set_desc *basic_mechs;
+};
+
+struct mag_server_config {
+    gss_OID_set default_mechs;
+    struct seal_key *mag_skey;
+};
+
+struct mag_req_cfg {
+    request_rec *req;
+    struct mag_config *cfg;
+    gss_OID_set desired_mechs;
+    bool use_sessions;
+    bool send_persist;
+    const char *req_proto;
+    const char *rep_proto;
+    struct seal_key *mag_skey;
 };
 
 struct mag_conn {
-    apr_pool_t *parent;
+    apr_pool_t *pool;
     gss_ctx_id_t ctx;
     bool established;
     const char *user_name;
@@ -72,3 +93,5 @@ struct mag_conn {
 };
 
 #define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
+
+struct mag_conn *mag_new_conn_ctx(apr_pool_t *pool);