# Path: petlib/_compat.py
# def get_openssl_version(lib=None, warn=False):
#     """Returns the OpenSSL version that is used for bindings."""
# 
#     if lib is None:
#         lib = get_abi_lib()
# 
#     try:
#         full_version = lib.OpenSSL_version_num()
#     except AttributeError:
#         full_version = lib.SSLeay()
# 
#     version = full_version >> 20
#     if version == 0x101:
#         return OpenSSLVersion.V1_1
#     elif version == 0x100:
#         if warn:
#             warnings.warn(
#                 "Support for the system OpenSSL version (0x%x) is pending deprecation. "
#                 "Please upgrade to OpenSSL v1.1" % version)
#         return OpenSSLVersion.V1_0
#     else:
#         # If the version is not 1.0 or 1.1, assume its a later one, and optimistically
#         # assume it doesn't horribly break the interface this time.
#         if warn:
#             warnings.warn(
#                 "System OpenSSL version is not supported: %d. "
#                 "Attempting to use in OpenSSL v1.1 mode." % version)
#         return OpenSSLVersion.V1_1
# 
# class OpenSSLVersion:
#     V1_0 = "1_0"
#     V1_1 = "1_1"


import os
import platform
import cffi
import sys
    import threading
    from ._petlib import ffi, lib
from ._compat import get_openssl_version, OpenSSLVersion  # pylint: disable=unused-import
    from .ec import EcPt, EcGroup
#!/usr/bin/env python


try:
    _FFI = ffi
    _C = lib
except BaseException:
    print("Support not loading the library to build docs without compiling.")
    _C = None
    _FFI = None


try:
    _OPENSSL_VERSION = get_openssl_version(_C)
except:

# Path: petlib/_compat.py
# def get_openssl_version(lib=None, warn=False):
#     """Returns the OpenSSL version that is used for bindings."""
# 
#     if lib is None:
#         lib = get_abi_lib()
# 
#     try:
#         full_version = lib.OpenSSL_version_num()
#     except AttributeError:
#         full_version = lib.SSLeay()
# 
#     version = full_version >> 20
#     if version == 0x101:
#         return OpenSSLVersion.V1_1
#     elif version == 0x100:
#         if warn:
#             warnings.warn(
#                 "Support for the system OpenSSL version (0x%x) is pending deprecation. "
#                 "Please upgrade to OpenSSL v1.1" % version)
#         return OpenSSLVersion.V1_0
#     else:
#         # If the version is not 1.0 or 1.1, assume its a later one, and optimistically
#         # assume it doesn't horribly break the interface this time.
#         if warn:
#             warnings.warn(
#                 "System OpenSSL version is not supported: %d. "
#                 "Attempting to use in OpenSSL v1.1 mode." % version)
#         return OpenSSLVersion.V1_1
# 
# class OpenSSLVersion:
#     V1_0 = "1_0"
#     V1_1 = "1_1"


# Path: petlib/bindings.py
import os
import platform
import cffi
import sys
    import threading
    from ._petlib import ffi, lib
from ._compat import get_openssl_version, OpenSSLVersion  # pylint: disable=unused-import
    from .ec import EcPt, EcGroup

#!/usr/bin/env python


try:
    _FFI = ffi
    _C = lib
except BaseException:
    print("Support not loading the library to build docs without compiling.")
    _C = None
    _FFI = None


try:
    _OPENSSL_VERSION = get_openssl_version(_C)
except:

    _OPENSSL_VERSION = OpenSSLVersion.V1_1