Author Michael.Felt
Recipients Michael.Felt, christian.heimes
Date 2018-08-04.14:37:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533393423.72.0.56676864532.issue34194@psf.upfronthosting.co.za>
In-reply-to
Content
I "guess" it is somewhere in this code. But I am getting lost in all the macros that call other macros.

Some help would really be appreciated!

Currently looking in _ssl.c at:

/*[clinic input]
_ssl.get_default_verify_paths

Return search paths and environment vars that are used by SSLContext's set_default_verify_paths() to load defa
ult CAs.

The values are 'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'.
[clinic start generated code]*/

static PyObject *
_ssl_get_default_verify_paths_impl(PyObject *module)
/*[clinic end generated code: output=e5b62a466271928b input=5210c953d98c3eb5]*/
{
    PyObject *ofile_env = NULL;
    PyObject *ofile = NULL;
    PyObject *odir_env = NULL;
    PyObject *odir = NULL;

#define CONVERT(info, target) { \
        const char *tmp = (info); \
        target = NULL; \
        if (!tmp) { Py_INCREF(Py_None); target = Py_None; } \
        else if ((target = PyUnicode_DecodeFSDefault(tmp)) == NULL) { \
            target = PyBytes_FromString(tmp); } \
        if (!target) goto error; \
    }

    CONVERT(X509_get_default_cert_file_env(), ofile_env);
    CONVERT(X509_get_default_cert_file(), ofile);
    CONVERT(X509_get_default_cert_dir_env(), odir_env);
    CONVERT(X509_get_default_cert_dir(), odir);
#undef CONVERT

    return Py_BuildValue("NNNN", ofile_env, ofile, odir_env, odir);

  error:
    Py_XDECREF(ofile_env);
    Py_XDECREF(ofile);
    Py_XDECREF(odir_env);
    Py_XDECREF(odir);
    return NULL;
}

What I would like to know is what environment variable is being used. Not clear to me from the code here.

Thx.
History
Date User Action Args
2018-08-04 14:37:03Michael.Feltsetrecipients: + Michael.Felt, christian.heimes
2018-08-04 14:37:03Michael.Feltsetmessageid: <1533393423.72.0.56676864532.issue34194@psf.upfronthosting.co.za>
2018-08-04 14:37:03Michael.Feltlinkissue34194 messages
2018-08-04 14:37:03Michael.Feltcreate