Page MenuHomeFreeBSD

D12451.id33408.diff
No OneTemporary

D12451.id33408.diff

Index: sys/opencrypto/crypto.c
===================================================================
--- sys/opencrypto/crypto.c
+++ sys/opencrypto/crypto.c
@@ -460,7 +460,7 @@
CRYPTDEB("dev newsession failed");
} else {
CRYPTDEB("no driver");
- err = EINVAL;
+ err = EOPNOTSUPP;
}
CRYPTO_DRIVER_UNLOCK();
return err;
Index: tests/sys/opencrypto/cryptotest.py
===================================================================
--- tests/sys/opencrypto/cryptotest.py
+++ tests/sys/opencrypto/cryptotest.py
@@ -30,6 +30,7 @@
#
from __future__ import print_function
+import errno
import cryptodev
import itertools
import os
@@ -284,8 +285,14 @@
if len(key) > blocksize:
continue
- c = Crypto(mac=alg, mackey=key,
- crid=crid)
+ try:
+ c = Crypto(mac=alg, mackey=key,
+ crid=crid)
+ except EnvironmentError, e:
+ # Can't test hashes the driver does not support.
+ if e.errno != errno.EOPNOTSUPP:
+ raise
+ continue
_, r = c.encrypt(msg, iv="")

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 8, 10:23 PM (9 h, 51 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28504756
Default Alt Text
D12451.id33408.diff (1 KB)

Event Timeline