aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2019-04-24 04:50:03 +0000
committerEnji Cooper <ngie@FreeBSD.org>2019-04-24 04:50:03 +0000
commitb106e0fccc13639e28755b4acc1393c58312e2de (patch)
treed4ccff965c6eb81d2918d12ff06a9706b511751b /tests
parentac65c827613dbf207bce208a6dfc6bbd8d0153a1 (diff)
Notes
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/opencrypto/cryptotest.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/sys/opencrypto/cryptotest.py b/tests/sys/opencrypto/cryptotest.py
index ebd5bca24e5e..e223b5b08115 100644
--- a/tests/sys/opencrypto/cryptotest.py
+++ b/tests/sys/opencrypto/cryptotest.py
@@ -124,7 +124,7 @@ def GenTestCase(cname):
mac=self._gmacsizes[len(cipherkey)],
mackey=cipherkey, crid=crid,
maclen=16)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test algorithms the driver does not support.
if e.errno != errno.EOPNOTSUPP:
raise
@@ -133,7 +133,7 @@ def GenTestCase(cname):
if mode == 'ENCRYPT':
try:
rct, rtag = c.encrypt(pt, iv, aad)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test inputs the driver does not support.
if e.errno != errno.EINVAL:
raise
@@ -153,7 +153,7 @@ def GenTestCase(cname):
else:
try:
rpt, rtag = c.decrypt(*args)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test inputs the driver does not support.
if e.errno != errno.EINVAL:
raise
@@ -221,7 +221,7 @@ def GenTestCase(cname):
try:
c = Crypto(meth, cipherkey, crid=crid)
r = curfun(c, pt, iv)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test hashes the driver does not support.
if e.errno != errno.EOPNOTSUPP:
raise
@@ -252,7 +252,7 @@ def GenTestCase(cname):
mackey=key, maclen=16)
r, tag = Crypto.encrypt(c, payload,
nonce, aad)
- except EnvironmentError, e:
+ except EnvironmentError as e:
if e.errno != errno.EOPNOTSUPP:
raise
continue
@@ -294,7 +294,7 @@ def GenTestCase(cname):
key=key,
mac=cryptodev.CRYPTO_AES_CCM_CBC_MAC,
mackey=key, maclen=16)
- except EnvironmentError, e:
+ except EnvironmentError as e:
if e.errno != errno.EOPNOTSUPP:
raise
continue
@@ -388,13 +388,13 @@ def GenTestCase(cname):
for data in lines:
msg = data['Msg'].decode('hex')
- msg = msg[:int(data['Len'])]
+ msg = msg[:int(data['Len'])]
md = data['MD'].decode('hex')
try:
c = Crypto(mac=alg, crid=crid,
maclen=hashlen)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test hashes the driver does not support.
if e.errno != errno.EOPNOTSUPP:
raise
@@ -451,7 +451,7 @@ def GenTestCase(cname):
try:
c = Crypto(mac=alg, mackey=key,
crid=crid, maclen=hashlen)
- except EnvironmentError, e:
+ except EnvironmentError as e:
# Can't test hashes the driver does not support.
if e.errno != errno.EOPNOTSUPP:
raise