->
>Every function in ssl_engine_config.c has a hook in mod_ssl.c!
>What you need is something like this:
>
>AP_SRV_CMD(Ldap, RAW_ARGS, ....)
>
>Then you get the "server=..." string as one large thing.  You can also try
>ITERATE instead of RAW_ARGS, then you get a key=value pair per function
call.

Thanks Ralph, I succesfully added the new directives, like that:
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);
    else if (strcEQn(arg, "basedn:", 7))
        sc->ldapBaseDn = ap_pstrdup(cmd->pool, arg+7);
    else if (strcEQn(arg, "user:", 5))
        sc->ldapUser = ap_pstrdup(cmd->pool, arg+5);
    else if (strcEQn(arg, "pwd:", 4))
        sc->ldapPwd = ap_pstrdup(cmd->pool, arg+4);
    return NULL;

AP_SRV_CMD(Ldap, ITERATE,
               "Parameters for client certificate status check with LDAP
directory"
               "servers=LdapHost, basedn=LdapBaseDn, user=LdapUser
pwd=LdapPwd")
    AP_SRV_CMD(LdapVerifyClient, TAKE1,
               "Enable or disable client certificate status check with
LDAP directory"
               "(`Enable', `Disable'")

But the last problem is that I can't read the value from that I put in
server config during the directive parsing, from sc inside the routine
ssl_callback_verify:

sc = myServerConfig(s);
sc->ldapServers
sc->ldapBaseDn
...

Any suggestion ?
Thanks

>
I recommend you to look at existing configuration functions or read the
>excellent book from L.Stein and D.MacEachern "Writing Apache Modules in
Perl
>and C". There all those gory details are explained very well.
>
Unfortunately the book isn't still isuued in Italy !

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to