Beispiel #1
0
    BASE_NASSL_EXT_SETUP.update({
        'library_dirs': [str(PYTHON_LIBS_PATH)],
        'libraries': ['user32', 'kernel32', 'Gdi32', 'Advapi32', 'Ws2_32', 'crypt32',]
    })
else:
    BASE_NASSL_EXT_SETUP['extra_compile_args'].append('-Wall')

    if CURRENT_PLATFORM == SupportedPlatformEnum.LINUX_64:
        # Explicitly disable executable stack on Linux 64 to address issues with Ubuntu on Windows
        # https://github.com/nabla-c0d3/nassl/issues/28
        BASE_NASSL_EXT_SETUP['extra_link_args'].append('-Wl,-z,noexecstack')


legacy_openssl_config = LegacyOpenSslBuildConfig(CURRENT_PLATFORM)
modern_openssl_config = ModernOpenSslBuildConfig(CURRENT_PLATFORM)
zlib_config = ZlibBuildConfig(CURRENT_PLATFORM)

LEGACY_NASSL_EXT_SETUP = BASE_NASSL_EXT_SETUP.copy()
LEGACY_NASSL_EXT_SETUP['name'] = 'nassl._nassl_legacy'
LEGACY_NASSL_EXT_SETUP['define_macros'] = [('LEGACY_OPENSSL', '1')]
LEGACY_NASSL_EXT_SETUP.update({
    'include_dirs': [str(legacy_openssl_config.include_path)],
    'extra_objects': [
        # The order matters on some flavors of Linux
        str(legacy_openssl_config.libssl_path),
        str(legacy_openssl_config.libcrypto_path),
        str(zlib_config.libz_path),
    ],
})
Beispiel #2
0
 def get_openssl_path(cls):
     return ModernOpenSslBuildConfig(CURRENT_PLATFORM).exe_path