Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/opencrypto/cryptotest.py
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
katdir = '/usr/local/share/nist-kat' | katdir = '/usr/local/share/nist-kat' | ||||
def katg(base, glob): | def katg(base, glob): | ||||
assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'" | assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'" | ||||
return iglob(os.path.join(katdir, base, glob)) | return iglob(os.path.join(katdir, base, glob)) | ||||
aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0' ] | aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0' ] | ||||
desmodules = [ 'cryptosoft0', ] | desmodules = [ 'cryptosoft0', ] | ||||
shamodules = [ 'cryptosoft0', 'ccr0' ] | shamodules = [ 'cryptosoft0', 'aesni0', 'ccr0' ] | ||||
def GenTestCase(cname): | def GenTestCase(cname): | ||||
try: | try: | ||||
crid = cryptodev.Crypto.findcrid(cname) | crid = cryptodev.Crypto.findcrid(cname) | ||||
except IOError: | except IOError: | ||||
return None | return None | ||||
class GendCryptoTestCase(unittest.TestCase): | class GendCryptoTestCase(unittest.TestCase): | ||||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |