DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31766>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31766

Error getting client certificate under iPlanet 6.1/Tomact 5.0.28





------- Additional Comments From [EMAIL PROTECTED]  2004-10-22 05:23 -------
Ok, I have done as suggested, but I am no C programmer, so I would appreciate 
it if someone would check this code over, and possibly insert it into the JK 
connectors build.  Particularly, I am concerned about possible memory leaks 
that I may not understand C or NSAPI well enough to spot.

The code should be inserted in jk_nsapi_plugin.c at line 426 (after the if(s-
>ssl_cert) statement).

    /* Create a new string for the data to be held in */
    char* certData = malloc(strlen(s->ssl_cert) + 80);
    certData[0] = 0;

    //jk_log(logger, JK_LOG_INFO, "Got client cert %s\n", s->ssl_cert);

    /* Build the new string for passing to Tomcat */
    strcat(certData, "-----BEGIN CERTIFICATE-----\r\n");
    strcat(certData, s->ssl_cert);
    strcat(certData, "\r\n-----END CERTIFICATE-----\r\n");

    /* Remove the certificate entry from the NSAPI pblock */
    //pb_param* pp = pblock_remove("auth-cert", private_data->rq->vars); 
    //param_free( pp ); 
    param_free( pblock_remove("auth-cert", private_data->rq->vars) ); 

    /* Insert the new value for the pblock */
    pblock_nvinsert("auth-cert", certData, private_data->rq->vars); 

    /* Reference the new value in the JK module */
    s->ssl_cert = certData;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to