padlock.c (181478) | padlock.c (185026) |
---|---|
1/*- 2 * Copyright (c) 2005-2008 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005-2008 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/crypto/via/padlock.c 181478 2008-08-09 20:01:01Z pjd $"); | 28__FBSDID("$FreeBSD: head/sys/crypto/via/padlock.c 185026 2008-11-17 19:00:36Z philip $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/lock.h> 35#include <sys/rwlock.h> 36#include <sys/malloc.h> --- 255 unchanged lines hidden (view full) --- 292{ 293 struct padlock_softc *sc = device_get_softc(dev); 294 struct padlock_session *ses = NULL; 295 struct cryptodesc *crd, *enccrd, *maccrd; 296 int error = 0; 297 298 enccrd = maccrd = NULL; 299 | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/lock.h> 35#include <sys/rwlock.h> 36#include <sys/malloc.h> --- 255 unchanged lines hidden (view full) --- 292{ 293 struct padlock_softc *sc = device_get_softc(dev); 294 struct padlock_session *ses = NULL; 295 struct cryptodesc *crd, *enccrd, *maccrd; 296 int error = 0; 297 298 enccrd = maccrd = NULL; 299 |
300 if (crp == NULL || crp->crp_callback == NULL || crp->crp_desc == NULL) { | 300 /* Sanity check. */ 301 if (crp == NULL) 302 return (EINVAL); 303 304 if (crp->crp_callback == NULL || crp->crp_desc == NULL) { |
301 error = EINVAL; 302 goto out; 303 } 304 305 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { 306 switch (crd->crd_alg) { 307 case CRYPTO_NULL_HMAC: 308 case CRYPTO_MD5_HMAC: --- 98 unchanged lines hidden --- | 305 error = EINVAL; 306 goto out; 307 } 308 309 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { 310 switch (crd->crd_alg) { 311 case CRYPTO_NULL_HMAC: 312 case CRYPTO_MD5_HMAC: --- 98 unchanged lines hidden --- |