Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105708697
D12451.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12451.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D12451: crypto(9): Use a more specific error code when a capable driver is not found
Attached
Detach File
Event Timeline
Log In to Comment