curl / Mailing Lists / curl-library / Single Mail


Re: Need help in setting SSLKEYLOGFILE env variable

From: Peter Wu via curl-library <>
Date: Tue, 16 Oct 2018 01:21:43 +0200

Hi Shoba,

On Wed, Oct 03, 2018 at 04:47:02PM +0530, Shoba Venkat via curl-library wrote:
> I am writing an application with libcurl ( curl - 7.57.0 ) in c++/linux.
> I enabled SSLKEYLOGFILE option and built the curl sources by using the
> below steps.
> Included this "#define ENABLE_SSLKEYLOGFILE" in lib/vtls/openssl.c

If you use libcurl 7.58 or newer, key log support is enabled by default
without requiring additional changes.

> ./configure --enable-ares=/usr/local --with-ssl=/usr/local/ssl Shared=yes
> --with-nghttp2=/usr/local -disable-ldap --disable-ldaps
> make;make install
> When using curl client (curl.exe), I am able to get the SSLKEYLOGFILE. When
> I use from my application, I am not getting this file. I
> did "export SSLKEYLOGFILE=<path_of_file>" and also calling setenv inside my
> app.The reason is getenv( "SSLKEYLOGFILE" ) in openssl.c is returning
> empty. But i am able to get this value by calling getenv inside my
> application prior to calling curl library. Kindly help me in resolving this
> issue.
> Note : The openssl that I am using is 1.0.2k

Can you double-check that the that was loaded into your
application is the right version? Does your application happen to be a
setuid binary?

If you specified a relative path in SSLKEYLOGFILE, it may be written
into a different location if your application changes the working

Kind regards,
Peter Wu
Received on 2018-10-16