Page MenuHomeFreeBSD

D12451.diff
No OneTemporary

D12451.diff

Index: head/sys/opencrypto/crypto.c
===================================================================
--- head/sys/opencrypto/crypto.c
+++ head/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: head/tests/sys/opencrypto/cryptotest.py
===================================================================
--- head/tests/sys/opencrypto/cryptotest.py
+++ head/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
Fri, Dec 20, 12:43 PM (20 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15530331
Default Alt Text
D12451.diff (1 KB)

Event Timeline