From 5b909a178326b6d92e64b513c77c73454d25915d Mon Sep 17 00:00:00 2001 From: Jan Grieb Date: Tue, 13 Jul 2021 16:59:37 +0200 Subject: [PATCH 1/3] [poco] support NetSSL with OpenSSL on Windows #6311 Changed Poco recipe (any version) to support the NetSSL component with OpenSSL on Windows again. Consumers should be able to either use NetSSL or NetSSL_win components with OpenSSL- or Windows TLS-enabled SSL support - or none - but not both. No changes for any non-Windows OS. --- recipes/poco/all/conanfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index b25eab1a9d0e0..325567e8b6ab3 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -27,6 +27,7 @@ class PocoConan(ConanFile): "shared": False, "fPIC": True, "enable_fork": True, + "force_openssl": False, } _PocoComponent = namedtuple("_PocoComponent", ("option", "default_option", "dependencies", "is_lib")) @@ -100,7 +101,6 @@ def source(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - del self.options.enable_netssl del self.options.enable_fork else: del self.options.enable_netssl_win @@ -141,6 +141,8 @@ def validate(self): if self.options.enable_data_sqlite: if self.options["sqlite3"].threadsafe == 0: raise ConanInvalidConfiguration("sqlite3 must be built with threadsafe enabled") + if self.options.enable_netssl and self.options.get_safe("enable_netssl_win", False): + raise ConanInvalidConfiguration("Conflicting enable_netssl[_win] settings") def requirements(self): self.requires("pcre/8.44") @@ -154,7 +156,7 @@ def requirements(self): self.requires("apr-util/1.6.1") # FIXME: missing apache2 recipe raise ConanInvalidConfiguration("apache2 is not (yet) available on CCI") - if self.options.get_safe("enable_netssl", False) or \ + if self.options.enable_netssl or \ self.options.enable_crypto or \ self.options.get_safe("enable_jwt", False): self.requires("openssl/1.1.1k") From 61fc0594c98583cc1278c56ce576532d7bedf17d Mon Sep 17 00:00:00 2001 From: Jan Grieb Date: Tue, 13 Jul 2021 17:20:33 +0200 Subject: [PATCH 2/3] [poco] removed unnecessary default option --- recipes/poco/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index 325567e8b6ab3..e18c2e9e557a7 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -27,7 +27,6 @@ class PocoConan(ConanFile): "shared": False, "fPIC": True, "enable_fork": True, - "force_openssl": False, } _PocoComponent = namedtuple("_PocoComponent", ("option", "default_option", "dependencies", "is_lib")) From 1ba9584da61a7119ac3f26d91ec0a6e7a9380dba Mon Sep 17 00:00:00 2001 From: Jan Grieb Date: Fri, 16 Jul 2021 14:12:33 +0200 Subject: [PATCH 3/3] [poco] default of enable_netSSL_win set to false * the default for the Windows-only option enable_netssl_win is set to false * as the enable_netssl option's default is true (for any Platform), any consumer not specifying options will get the OpenSSL-supported NetSSL component * for explicitly use the WinTLS-supported NetSSL_win, the options have to be switched by the consumer * note that the Conan-Center-Index CI/CD will build and test the OpenSSL version on Windows --- recipes/poco/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index e18c2e9e557a7..08dfbfa908cad 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -48,7 +48,7 @@ class PocoConan(ConanFile): "PocoMongoDB": _PocoComponent("enable_mongodb", True, ("PocoNet", ), True), "PocoNet": _PocoComponent("enable_net", True, ("PocoFoundation", ), True), "PocoNetSSL": _PocoComponent("enable_netssl", True, ("PocoCrypto", "PocoUtil", "PocoNet", ), True), # also external openssl - "PocoNetSSLWin": _PocoComponent("enable_netssl_win", True, ("PocoNet", "PocoUtil", ), True), + "PocoNetSSLWin": _PocoComponent("enable_netssl_win", False, ("PocoNet", "PocoUtil", ), True), "PocoPDF": _PocoComponent("enable_pdf", False, ("PocoXML", "PocoUtil", ), True), "PocoPageCompiler": _PocoComponent("enable_pagecompiler", False, ("PocoNet", "PocoUtil", ), False), "PocoFile2Page": _PocoComponent("enable_pagecompiler_file2page", False, ("PocoNet", "PocoUtil", "PocoXML", "PocoJSON", ), False),