Ejemplo n.º 1
0
from asn1crypto import pem, algos
from oscrypto import asymmetric, errors, backend

from ._unittest_compat import patch

patch()

if sys.version_info < (3, ):
    byte_cls = str
    int_types = (int, long)  # noqa
else:
    byte_cls = bytes
    int_types = (int, )

_backend = backend()

if _backend == 'openssl':
    from oscrypto._openssl._libcrypto import libcrypto_version_info
    openssl_098 = libcrypto_version_info < (1, 0, 0)
else:
    openssl_098 = False

tests_root = os.path.dirname(__file__)
fixtures_dir = os.path.join(tests_root, 'fixtures')


def _win_version_pair():
    ver_info = sys.getwindowsversion()
    return (ver_info[0], ver_info[1])
Ejemplo n.º 2
0
from asn1crypto import pem, algos
from oscrypto import asymmetric, errors, backend

from ._unittest_compat import patch

patch()

if sys.version_info < (3,):
    byte_cls = str
    int_types = (int, long)  # noqa
else:
    byte_cls = bytes
    int_types = (int,)


_backend = backend()


if _backend == 'openssl':
    from oscrypto._openssl._libcrypto import libcrypto_version_info
    openssl_098 = libcrypto_version_info < (1, 0, 0)
else:
    openssl_098 = False


tests_root = os.path.dirname(__file__)
fixtures_dir = os.path.join(tests_root, 'fixtures')


def _win_version_pair():
    ver_info = sys.getwindowsversion()