def get_openssl_version():
    """
    :return: the openssl version, if it can be determined
    """
    command = ['openssl', 'version']
    p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    current_app.logger.debug(command)
    stdout, stderr = p.communicate()

    if p.returncode != 0:
        current_app.logger.debug(" ".join(command))
        current_app.logger.error(stderr)
        raise Exception(stderr)

    if stdout.startswith(b'OpenSSL'):
        return stdout.split()[1]

    :return: the openssl version, if it can be determined
    
lemur/plugins/lemur_openssl/plugin.py