Ejemplo n.º 1
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(RSATest)
    try:
        from Crypro.PublicKey import _fastmath
        tests += list_test_cases(RSAFastMathTest)
    except ImportError:
        from distutils.sysconfig import get_config_var
        import inspect
        _fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
            inspect.getfile(inspect.currentframe())))
            +"/../../PublicKey/_fastmath"+get_config_var("SO"))
        if os.path.exists(_fm_path):
            raise ImportError("While the _fastmath module exists, importing "+
                "it failed. This may point to the gmp or mpir shared library "+
                "not being in the path. _fastmath was found at "+_fm_path)
    if config.get('slow_tests',1):
        tests += list_test_cases(RSASlowMathTest)
    return tests
Ejemplo n.º 2
0
def get_tests(config={}):
    from Crypro.SelfTest.st_common import list_test_cases
    return list_test_cases(FortunaAccumulatorTests)
Ejemplo n.º 3
0
def get_tests(config={}):
    from Crypro.SelfTest.st_common import list_test_cases
    return list_test_cases(MiscTests)
Ejemplo n.º 4
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PBKDF1_Tests)
    tests += list_test_cases(PBKDF2_Tests)
    return tests
Ejemplo n.º 5
0
def get_tests(config={}):
    from Crypro.SelfTest.st_common import list_test_cases
    listTests = []
    listTests += list_test_cases(DerObjectTests)
    listTests += list_test_cases(DerSequenceTests)
    return listTests
Ejemplo n.º 6
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PKCS1_15_Tests)
    return tests
Ejemplo n.º 7
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(ElGamalTest)
    return tests