mneumann's projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da41e4e
)
cryptodev - Allow software crypto
author
Alex Hornung
<ahornung@gmail.com>
Sat, 21 Aug 2010 11:35:19 +0000
(12:35 +0100)
committer
Alex Hornung
<ahornung@gmail.com>
Sat, 21 Aug 2010 13:13:02 +0000
(14:13 +0100)
* Allow using software crypto via cryptodev if the sysctl
kern.cryptodevallowsoft is set to 1.
* This allows to run a bunch of crypto tests and verify test vectors
without having hardware acceleration.
sys/opencrypto/cryptodev.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/opencrypto/cryptodev.c
b/sys/opencrypto/cryptodev.c
index
beb9e99
..
e44658b
100644
(file)
--- a/
sys/opencrypto/cryptodev.c
+++ b/
sys/opencrypto/cryptodev.c
@@
-284,8
+284,11
@@
cryptof_ioctl(struct file *fp, u_long cmd, caddr_t data,
error = checkforsoftware(crid);
if (error)
goto bail;
- } else
+ } else
{
crid = CRYPTOCAP_F_HARDWARE;
+ if (crypto_devallowsoft)
+ crid |= CRYPTOCAP_F_SOFTWARE;
+ }
error = crypto_newsession(&sid, (txform ? &crie : &cria), crid);
if (error)
goto bail;