xref: /unit/test/unit/check/tls.py (revision 1621:275b26bbd3ae)
1*1621Szelenkov@nginx.comimport re
2*1621Szelenkov@nginx.comimport subprocess
3*1621Szelenkov@nginx.com
4*1621Szelenkov@nginx.com
5*1621Szelenkov@nginx.comdef check_openssl(unitd):
6*1621Szelenkov@nginx.com    subprocess.check_output(['which', 'openssl'])
7*1621Szelenkov@nginx.com
8*1621Szelenkov@nginx.com    output = subprocess.check_output(
9*1621Szelenkov@nginx.com        [unitd, '--version'], stderr=subprocess.STDOUT
10*1621Szelenkov@nginx.com    )
11*1621Szelenkov@nginx.com
12*1621Szelenkov@nginx.com    if re.search('--openssl', output.decode()):
13*1621Szelenkov@nginx.com        return True
14