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