--- ../../../../mod_ssl-2.2.8-1.3.6/pkg.sslmod/ssl_engine_config.c	Sat Apr 10 18:29:45 1999
+++ ./ssl_engine_config.c	Mon Jun 14 13:09:49 1999
@@ -201,6 +201,14 @@
     sc->px509Certificate       = NULL;
     sc->prsaKey                = NULL;
     sc->pSSLCtx                = NULL;
+    /*
+     * Giacob: initialize ldap context
+     */
+    sc->ldapServers            = NULL;
+    sc->ldapBaseDn             = NULL;
+    sc->ldapUser               = NULL;
+    sc->ldapPwd                = NULL;
+    sc->nLdapVerifyClient      = LDAP_CHECK_DISABLED;
 
 #ifdef SSL_VENDOR
     sc->ctx = ap_ctx_new(p);
@@ -239,6 +247,14 @@
     cfgMerge(px509Certificate, NULL);
     cfgMerge(prsaKey, NULL);
     cfgMerge(pSSLCtx, NULL);
+    /*
+     * Giacob: merging ldap context
+     */
+    cfgMergeString(ldapServers);
+    cfgMergeString(ldapBaseDn);
+    cfgMergeString(ldapUser);
+    cfgMergeString(ldapPwd);
+    cfgMerge(nLdapVerifyClient, LDAP_CHECK_DISABLED);
 
 #ifdef SSL_VENDOR
     cfgMergeCtx(ctx);
@@ -266,6 +282,15 @@
     dc->szCipherSuite          = NULL;
     dc->nVerifyClient          = SSL_CVERIFY_UNSET;
     dc->nVerifyDepth           = UNSET;
+    /*
+     * Giacob: initialize ldap context
+     */
+    dc->ldapServers            = NULL;
+    dc->ldapBaseDn             = NULL;
+    dc->ldapUser               = NULL;
+    dc->ldapPwd                = NULL;
+    dc->nLdapVerifyClient      = LDAP_CHECK_DISABLED;
+
 #ifdef SSL_EXPERIMENTAL
     dc->szCACertificatePath    = NULL;
     dc->szCACertificateFile    = NULL;
@@ -308,6 +333,15 @@
     cfgMergeString(szCipherSuite);
     cfgMerge(nVerifyClient, SSL_CVERIFY_UNSET);
     cfgMergeInt(nVerifyDepth);
+    /*
+     * Giacob: merging ldap context
+     */
+    cfgMergeString(ldapServers);
+    cfgMergeString(ldapBaseDn);
+    cfgMergeString(ldapUser);
+    cfgMergeString(ldapPwd);
+    cfgMerge(nLdapVerifyClient, LDAP_CHECK_DISABLED);
+
 #ifdef SSL_EXPERIMENTAL
     cfgMergeString(szCACertificatePath);
     cfgMergeString(szCACertificateFile);
@@ -537,6 +571,54 @@
 #endif
     return NULL;
 }
+
+/*
+ * Giacob: new directives fro ldap cert status check
+ */
+
+const char *ssl_cmd_SSLLdapVerifyClient(
+    cmd_parms *cmd, SSLDirConfigRec *dc, char *level)
+{
+    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+    int id;
+
+    if (strEQ(level, "0") || strcEQ(level, "Disable"))
+        id = 0; /* Ldap cert status check enabled */
+    else if (strEQ(level, "1") || strcEQ(level, "Enable"))
+        id = 1; /* Ldap cert status check disabled */ 
+    else
+        return "SSLVerifyClient: Invalid argument";
+    if (cmd->path == NULL || dc == NULL)
+        sc->nLdapVerifyClient = id;
+    else
+        dc->nLdapVerifyClient = id;
+    return NULL;
+}
+
+const char *ssl_cmd_SSLLdap(
+    cmd_parms *cmd, SSLDirConfigRec *dc, char *arg)
+{
+    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+
+    if (strcEQn(arg, "servers:", 8)) {
+        sc->ldapServers = ap_pstrdup(cmd->pool, arg+8);
+        if (dc != NULL) dc->ldapServers = ap_pstrdup(cmd->pool, arg+8);
+    }
+    else if (strcEQn(arg, "basedn:", 7)) {                      
+        sc->ldapBaseDn = ap_pstrdup(cmd->pool, arg+7);
+        if (dc != NULL) dc->ldapBaseDn = ap_pstrdup(cmd->pool, arg+7);
+    } 
+    else if (strcEQn(arg, "user:", 5)) { 
+        sc->ldapUser = ap_pstrdup(cmd->pool, arg+5);
+        if (dc != NULL) dc->ldapUser = ap_pstrdup(cmd->pool, arg+5);
+    }                                         
+    else if (strcEQn(arg, "pwd:", 4)) { 
+        sc->ldapPwd = ap_pstrdup(cmd->pool, arg+4);
+        if (dc != NULL) dc->ldapPwd = ap_pstrdup(cmd->pool, arg+4);
+    }                                        
+    return NULL;
+}
+
 
 const char *ssl_cmd_SSLVerifyClient(
     cmd_parms *cmd, SSLDirConfigRec *dc, char *level)
