Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to support QUIC protocol to wolfssl #19490

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions recipes/wolfssl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class WolfSSLConan(ConanFile):
"sessioncerts": [True, False],
"sni": [True, False],
"testcert": [True, False],
"quic": [True, False],
}
default_options = {
"shared": False,
Expand All @@ -55,6 +56,7 @@ class WolfSSLConan(ConanFile):
"sessioncerts": False,
"sni": False,
"testcert": False,
"quic": False,
}

@property
Expand All @@ -66,6 +68,8 @@ def config_options(self):
del self.options.fPIC

def configure(self):
if self.options.quic:
self.options.tls13 = True
perseoGI marked this conversation as resolved.
Show resolved Hide resolved
if self.options.shared:
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.cppstd")
Expand All @@ -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'")

Expand Down Expand Up @@ -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")
Expand Down