xref: /third_party/node/tools/getsharedopensslhasquic.py
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/tools/
11cb0ef41Sopenharmony_cifrom __future__ import print_function
21cb0ef41Sopenharmony_ciimport os
31cb0ef41Sopenharmony_ciimport re
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_cidef get_has_quic(include_path):
61cb0ef41Sopenharmony_ci  if include_path:
71cb0ef41Sopenharmony_ci    openssl_quic_h = os.path.join(
81cb0ef41Sopenharmony_ci        include_path,
91cb0ef41Sopenharmony_ci        'openssl',
101cb0ef41Sopenharmony_ci        'quic.h')
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ci    try:
131cb0ef41Sopenharmony_ci      f = open(openssl_quic_h)
141cb0ef41Sopenharmony_ci    except OSError:
151cb0ef41Sopenharmony_ci      return False
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_ci    regex = r'^#\s*define OPENSSL_INFO_QUIC'
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_ci    for line in f:
201cb0ef41Sopenharmony_ci      if (re.match(regex, line)):
211cb0ef41Sopenharmony_ci        return True
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_ci  return False
24

Indexes created Thu Nov 07 10:32:03 CST 2024