Subject: CVS commit: src/sys/opencrypto
To: None <>
From: Jonathan Stone <>
List: source-changes
Date: 11/19/2003 03:18:33
Module Name:	src
Committed By:	jonathan
Date:		Wed Nov 19 03:18:33 UTC 2003

Modified Files:
	src/sys/opencrypto: crypto.c cryptodev.c

Log Message:
Clean up userlevel access to software kernel transforms, in preparation
for using /dev/crypto for OpenSSL:

1. Add comments explaining crypto_devallowsoft, explaining the
OpenBSD-style three-way logic actully implemented in crypto_newsession().

2. Pass crypto_devallowsoft as the final argument to crypto_newsession(),
instead of a constant 0 value.

3. Set the default value of crypto_devallowsoft to 1, to allow
/dev/crypto access only for hardware-supported transforms.

Items 1-3 may be revised to match the FreeBSD two-way logic, if the
consensus is that there's no point to forcing software transforms.
But as a first step, let the description match what the code actually does.

GC unused variables usercrypto, userasmcrypto, cryptodevallowsoft from
cryptodev.c, in favour of variables crypto_usercrypto, crypto_userasmcrypto,
crypto_devallowsoft, which are used as well as defined in crypto.c.

To generate a diff of this commit:
cvs rdiff -r1.5 -r1.6 src/sys/opencrypto/crypto.c
cvs rdiff -r1.8 -r1.9 src/sys/opencrypto/cryptodev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.