2021-03-09 21:29:20 +00:00
|
|
|
from __future__ import print_function
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
|
|
|
|
def get_has_quic(include_path):
|
2021-03-09 21:50:08 +00:00
|
|
|
if include_path:
|
2021-04-14 09:19:54 +00:00
|
|
|
openssl_quic_h = os.path.join(
|
2021-03-09 21:50:08 +00:00
|
|
|
include_path,
|
|
|
|
'openssl',
|
2021-04-14 09:19:54 +00:00
|
|
|
'quic.h')
|
2021-03-09 21:29:20 +00:00
|
|
|
|
2021-04-14 09:19:54 +00:00
|
|
|
try:
|
|
|
|
f = open(openssl_quic_h)
|
|
|
|
except OSError:
|
|
|
|
return False
|
2021-03-09 21:29:20 +00:00
|
|
|
|
2023-02-09 10:49:31 +00:00
|
|
|
regex = r'^#\s*define OPENSSL_INFO_QUIC'
|
2021-03-09 21:29:20 +00:00
|
|
|
|
2021-03-09 21:50:08 +00:00
|
|
|
for line in f:
|
|
|
|
if (re.match(regex, line)):
|
|
|
|
return True
|
2021-03-09 21:29:20 +00:00
|
|
|
|
|
|
|
return False
|