Skip to content

Commit

Permalink
(conan-io#6314) [poco] re-enabling support for NetSSL with OpenSSL on…
Browse files Browse the repository at this point in the history
… Windows

* [poco] support NetSSL with OpenSSL on Windows conan-io#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.

* [poco] removed unnecessary default option

* [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
  • Loading branch information
jngrb authored and AndreyMlashkin committed Jul 19, 2021
1 parent b44b25b commit 2c90877
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions recipes/poco/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -100,7 +100,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
Expand Down Expand Up @@ -141,6 +140,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")
Expand All @@ -154,7 +155,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")
Expand Down

0 comments on commit 2c90877

Please sign in to comment.