If kern.cryptodevallowsoft is TRUE allow also for symmetric software crypto

in kernel. Useful for testing.

Reviewed by:	sam
This commit is contained in:
Pawel Jakub Dawidek 2006-05-17 18:01:51 +00:00
parent b5161eb7b5
commit 613894d047

View File

@ -265,8 +265,14 @@ cryptof_ioctl(
}
error = crypto_newsession(&sid, (txform ? &crie : &cria), 1);
if (error)
goto bail;
if (error) {
if (crypto_devallowsoft) {
error = crypto_newsession(&sid,
(txform ? &crie : &cria), 0);
}
if (error)
goto bail;
}
cse = csecreate(fcr, sid, crie.cri_key, crie.cri_klen,
cria.cri_key, cria.cri_klen, sop->cipher, sop->mac, txform,