Hello list,

I did some searching online and didn't find any mention of this, so if
it's somewhere archived, please point me there.

I'm trying to fix a bug in the PHP --with-openssl flag, where the module
is searching for the openssl.cnf file.  For more information see PHP Bug
#18295 (http://bugs.php.net/bug.php?id=18295).

Is there an appropriate way/method, via C code, to identify where the
openssl.cnf is if no env var is set?  Apparently the e_os.h #define, but
we have been informed that this isn't really a good way to do things.

The code snippit in question looks like this:
    /* Determine default SSL configuration file */
    config_filename = getenv("OPENSSL_CONF");
    if (config_filename == NULL)
        config_filename = getenv("SSLEAY_CONF");

    /* default to 'openssl.cnf' if no environment variable is set */
    if (config_filename == NULL) {
        snprintf(default_ssl_conf_filename,
sizeof(default_ssl_conf_filename), "%s/%s",
                X509_get_default_cert_area(),
                "openssl.cnf");
    }
    else
        strncpy(default_ssl_conf_filename, config_filename,
sizeof(default_ssl_conf_filename));

Any suggestions or pointers are welcome.

>---------------------------------------------------------------<
Dan Kalowsky                    "A little less conversation,
http://www.deadmime.org/~dank    a little more action."
[EMAIL PROTECTED]        - "A Little Less Conversation",
[EMAIL PROTECTED]                        Elvis Presley


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to