diff options
author | olegts <olegts@yandex-team.ru> | 2022-02-10 16:48:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:23 +0300 |
commit | 5eefa17021221fd267f1dd5f9d63d2493d131a8a (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /contrib/python/cryptography/_cffi_src/build_openssl.py | |
parent | 30983fb2586f6904aaf6a5d6ef2b445cbaec1f44 (diff) | |
download | ydb-5eefa17021221fd267f1dd5f9d63d2493d131a8a.tar.gz |
Restoring authorship annotation for <olegts@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/cryptography/_cffi_src/build_openssl.py')
-rw-r--r-- | contrib/python/cryptography/_cffi_src/build_openssl.py | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/contrib/python/cryptography/_cffi_src/build_openssl.py b/contrib/python/cryptography/_cffi_src/build_openssl.py index fab9119077..4380c33969 100644 --- a/contrib/python/cryptography/_cffi_src/build_openssl.py +++ b/contrib/python/cryptography/_cffi_src/build_openssl.py @@ -1,26 +1,26 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import absolute_import, division, print_function - -import os -import sys +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import absolute_import, division, print_function + +import os +import sys from distutils import dist from distutils.ccompiler import get_default_compiler from distutils.command.config import config - -from _cffi_src.utils import ( + +from _cffi_src.utils import ( build_ffi_for_binding, compiler_type, extra_link_args, -) - - -def _get_openssl_libraries(platform): +) + + +def _get_openssl_libraries(platform): if os.environ.get("CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS", None): return [] - # OpenSSL goes by a different library name on different operating systems. + # OpenSSL goes by a different library name on different operating systems. if platform == "win32" and compiler_type() == "msvc": return [ "libssl", @@ -31,11 +31,11 @@ def _get_openssl_libraries(platform): "user32", "ws2_32", ] - else: + else: # darwin, linux, mingw all use this path - # In some circumstances, the order in which these libs are - # specified on the linker command-line is significant; - # libssl must come before libcrypto + # In some circumstances, the order in which these libs are + # specified on the linker command-line is significant; + # libssl must come before libcrypto # (https://marc.info/?l=openssl-users&m=135361825921871) # -lpthread required due to usage of pthread an potential # existance of a static part containing e.g. pthread_atfork @@ -44,8 +44,8 @@ def _get_openssl_libraries(platform): return ["ssl", "crypto"] else: return ["ssl", "crypto", "pthread"] - - + + def _extra_compile_args(platform): """ We set -Wconversion args here so that we only do Wconversion checks on the @@ -71,51 +71,51 @@ def _extra_compile_args(platform): ): return ["-Wconversion", "-Wno-error=sign-conversion"] else: - return [] - - -ffi = build_ffi_for_binding( - module_name="_openssl", - module_prefix="_cffi_src.openssl.", - modules=[ - # This goes first so we can define some cryptography-wide symbols. - "cryptography", - "aes", - "asn1", - "bignum", - "bio", - "cmac", - "conf", - "crypto", + return [] + + +ffi = build_ffi_for_binding( + module_name="_openssl", + module_prefix="_cffi_src.openssl.", + modules=[ + # This goes first so we can define some cryptography-wide symbols. + "cryptography", + "aes", + "asn1", + "bignum", + "bio", + "cmac", + "conf", + "crypto", "ct", - "dh", - "dsa", - "ec", - "ecdh", - "ecdsa", - "engine", - "err", - "evp", + "dh", + "dsa", + "ec", + "ecdh", + "ecdsa", + "engine", + "err", + "evp", "fips", - "hmac", - "nid", - "objects", - "ocsp", - "opensslv", + "hmac", + "nid", + "objects", + "ocsp", + "opensslv", "osrandom_engine", - "pem", - "pkcs12", - "rand", - "rsa", - "ssl", - "x509", - "x509name", - "x509v3", - "x509_vfy", - "pkcs7", - "callbacks", - ], - libraries=_get_openssl_libraries(sys.platform), + "pem", + "pkcs12", + "rand", + "rsa", + "ssl", + "x509", + "x509name", + "x509v3", + "x509_vfy", + "pkcs7", + "callbacks", + ], + libraries=_get_openssl_libraries(sys.platform), extra_compile_args=_extra_compile_args(sys.platform), - extra_link_args=extra_link_args(compiler_type()), -) + extra_link_args=extra_link_args(compiler_type()), +) |