On Fri, Jun 11, 1999, Andrea e Luca Giacobazzi wrote:

> 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
> ...

That's correct. As you can see in my code, I access the variables the same
way. When it doesn't work for you, you've messed up something. The usage is
correct. OTOH, why are you thinking you cannot access the variables this way?
Are the variables empty? Then make sure the functions at the top of
ssl_engine_config.c which do the config _merging_ also contain references to
your vars.

> 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 !

Err... www.amazon.com has the book and delivers world-wide, of course.

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

Reply via email to