From e94f16ce810d5e40ce3e1eae7ce2435199b36e95 Mon Sep 17 00:00:00 2001 From: Christopher Bradfield <11827031+cjbradfield@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:11:49 -0700 Subject: [PATCH 1/2] Add an option to support QUIC protocol to wolfssl --- recipes/wolfssl/all/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 7233278df2e56..5385e31ef4ff6 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -39,6 +39,7 @@ class WolfSSLConan(ConanFile): "sessioncerts": [True, False], "sni": [True, False], "testcert": [True, False], + "quic": [True, False], } default_options = { "shared": False, @@ -55,6 +56,7 @@ class WolfSSLConan(ConanFile): "sessioncerts": False, "sni": False, "testcert": False, + "quic": False, } @property @@ -66,6 +68,8 @@ def config_options(self): del self.options.fPIC def configure(self): + if self.options.quic: + self.options.tls13 = True if self.options.shared: self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") @@ -75,6 +79,8 @@ def layout(self): basic_layout(self, src_folder="src") def validate(self): + if self.options.quic and Version(self.version) < "5.5.0": + raise ConanInvalidConfiguration("The option 'quic' requires version > 5.5.0") if self.options.opensslall and not self.options.opensslextra: raise ConanInvalidConfiguration("The option 'opensslall' requires 'opensslextra=True'") @@ -113,6 +119,7 @@ def generate(self): "--enable-testcert={}".format(yes_no(self.options.testcert)), "--enable-shared={}".format(yes_no(self.options.shared)), "--enable-static={}".format(yes_no(not self.options.shared)), + "--enable-quic={}".format(yes_no(self.options.quic)), ]) if is_msvc(self): tc.extra_ldflags.append("-ladvapi32") From df863e4113a9319dab69d05cd34182dbd6777fff Mon Sep 17 00:00:00 2001 From: PerseoGI Date: Thu, 13 Jun 2024 17:47:52 +0200 Subject: [PATCH 2/2] Fix self.options override and error message --- recipes/wolfssl/all/conanfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 5385e31ef4ff6..484bda7bf76a8 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -68,8 +68,6 @@ def config_options(self): del self.options.fPIC def configure(self): - if self.options.quic: - self.options.tls13 = True if self.options.shared: self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") @@ -80,7 +78,7 @@ def layout(self): def validate(self): if self.options.quic and Version(self.version) < "5.5.0": - raise ConanInvalidConfiguration("The option 'quic' requires version > 5.5.0") + raise ConanInvalidConfiguration("The option 'quic' requires version >= 5.5.0") if self.options.opensslall and not self.options.opensslextra: raise ConanInvalidConfiguration("The option 'opensslall' requires 'opensslextra=True'") @@ -110,7 +108,7 @@ def generate(self): "--enable-sslv3={}".format(yes_no(self.options.sslv3)), "--enable-alpn={}".format(yes_no(self.options.alpn)), "--enable-des3={}".format(yes_no(self.options.des3)), - "--enable-tls13={}".format(yes_no(self.options.tls13)), + "--enable-tls13={}".format(yes_no(self.options.tls13 or self.options.quic)), "--enable-certgen={}".format(yes_no(self.options.certgen)), "--enable-dsa={}".format(yes_no(self.options.dsa)), "--enable-ripemd={}".format(yes_no(self.options.ripemd)),