[Privoxy-commits] [privoxy] branch master updated: windows: Enable building Privoxy with OpenSSL

User Git git at git.privoxy.org
Wed Aug 9 09:50:36 CEST 2023


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

The following commit(s) were added to refs/heads/master by this push:
     new 96a448cd windows: Enable building Privoxy with OpenSSL
96a448cd is described below

commit 96a448cdd70b7369131a3093a9711532ec4f5840
Author: Lee <ler762 at users.sourceforge.net>
AuthorDate: Wed Aug 9 03:47:37 2023 -0400

    windows: Enable building Privoxy with OpenSSL
    
    - openssl.c
    
    I got random crashes when using openssl on windows; fixed with
      #include <openssl/applink.c>
    I don't understand
      https://www.openssl.org/docs/faq.html
    it seems to be applicable only to calling DLLs but even with
    no DLLs involved that include also fixes the crashes that happen
    when statically linking openssl
    
    - project.h
    
    pull in the required gunk for windows
---
 openssl.c | 7 +++++++
 project.h | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/openssl.c b/openssl.c
index 2841c125..4b1fceb5 100644
--- a/openssl.c
+++ b/openssl.c
@@ -38,6 +38,13 @@
 #include <openssl/pem.h>
 #include <openssl/md5.h>
 #include <openssl/x509v3.h>
+#ifdef _WIN32
+/* https://www.openssl.org/docs/faq.html
+   I’ve compiled a program under Windows and it crashes: Why?
+   tl,dr: because it needs this include:
+*/
+#include <openssl/applink.c>
+#endif /* _WIN32 */
 
 #include "config.h"
 #include "project.h"
diff --git a/project.h b/project.h
index b203ad33..04fbe8e0 100644
--- a/project.h
+++ b/project.h
@@ -65,6 +65,10 @@
 
 #ifdef FEATURE_HTTPS_INSPECTION_OPENSSL
 #ifdef _WIN32
+#include <windef.h>
+#include <minwindef.h>
+#include <basetsd.h>
+#include <minwinbase.h>
 #include <wincrypt.h>
 #undef X509_NAME
 #undef X509_EXTENSIONS

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list