From 6cdba64e13f9599db49e507418ab5571a2f42d4f Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Tue, 5 Sep 2017 15:27:22 -0400 Subject: openssl: Integrate Peter Wu's SSLKEYLOGFILE implementation This is an adaptation of 2 of Peter Wu's SSLKEYLOGFILE implementations. The first one, written for old OpenSSL versions: https://git.lekensteyn.nl/peter/wireshark-notes/tree/src/sslkeylog.c The second one, written for BoringSSL and new OpenSSL versions: https://github.com/curl/curl/pull/1346 Note the first one is GPL licensed but the author gave permission to waive that license for libcurl. As of right now this feature is disabled by default, and does not have a configure option to enable it. To enable this feature define ENABLE_SSLKEYLOGFILE when building libcurl and set environment variable SSLKEYLOGFILE to a pathname that will receive the keys. And in Wireshark change your preferences to point to that key file: Edit > Preferences > Protocols > SSL > Master-Secret Co-authored-by: Peter Wu Ref: https://github.com/curl/curl/pull/1030 Ref: https://github.com/curl/curl/pull/1346 Closes https://github.com/curl/curl/pull/1866 --- lib/curl_setup.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/curl_setup.h') diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 36d1e42bc..402ebc03d 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -717,6 +717,7 @@ Therefore we specify it explicitly. https://github.com/curl/curl/pull/258 #if defined(WIN32) || defined(MSDOS) #define FOPEN_READTEXT "rt" #define FOPEN_WRITETEXT "wt" +#define FOPEN_APPENDTEXT "at" #elif defined(__CYGWIN__) /* Cygwin has specific behavior we need to address when WIN32 is not defined. https://cygwin.com/cygwin-ug-net/using-textbinary.html @@ -726,9 +727,11 @@ endings either CRLF or LF so 't' is appropriate. */ #define FOPEN_READTEXT "rt" #define FOPEN_WRITETEXT "w" +#define FOPEN_APPENDTEXT "a" #else #define FOPEN_READTEXT "r" #define FOPEN_WRITETEXT "w" +#define FOPEN_APPENDTEXT "a" #endif /* WinSock destroys recv() buffer when send() failed. -- cgit v1.2.3