Example #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
Example #2
0
def get_tests(config={}):
    from Crypro.SelfTest.st_common import list_test_cases
    return list_test_cases(FortunaAccumulatorTests)
Example #3
0
def get_tests(config={}):
    from Crypro.SelfTest.st_common import list_test_cases
    return list_test_cases(MiscTests)
Example #4
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PBKDF1_Tests)
    tests += list_test_cases(PBKDF2_Tests)
    return tests
Example #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
Example #6
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(PKCS1_15_Tests)
    return tests
Example #7
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(ElGamalTest)
    return tests