-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: partially detect quic support in shared_openssl
If the shared openssl does not have the `OPENSSL_INFO_QUIC` define, then it definitely does not have the QUIC apis. This is only a partially accurate check because it does not detect if the shared openssl was actually *built* without the OPENSSL_NO_QUIC define set. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37682 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import print_function | ||
import os | ||
import re | ||
|
||
def get_has_quic(include_path): | ||
openssl_crypto_h = os.path.join( | ||
include_path, | ||
'openssl', | ||
'crypto.h') | ||
|
||
f = open(openssl_crypto_h) | ||
|
||
regex = '^#\s*define OPENSSL_INFO_QUIC' | ||
|
||
for line in f: | ||
if (re.match(regex, line)): | ||
return True | ||
|
||
return False |