diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/crypto/cryptodev.c | 10 | ||||
-rw-r--r-- | sys/crypto/cryptodev.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c index 8db25708c39..bd7a16bb185 100644 --- a/sys/crypto/cryptodev.c +++ b/sys/crypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.c,v 1.15 2001/06/23 18:30:36 deraadt Exp $ */ +/* $OpenBSD: cryptodev.c,v 1.16 2001/06/23 21:56:58 angelos Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -334,9 +334,8 @@ crypto_op(struct csession *cse, struct crypt_op *cop, struct proc *p) crde->crd_flags |= CRD_F_ENCRYPT; else crde->crd_flags &= ~CRD_F_ENCRYPT; - crde->crd_skip = 0; crde->crd_len = cop->len; - crde->crd_inject = 0; /* ??? */ + crde->crd_inject = 0; crde->crd_alg = cse->cipher; crde->crd_key = cse->key; @@ -358,7 +357,10 @@ crypto_op(struct csession *cse, struct crypt_op *cop, struct proc *p) if ((error = copyin(cop->iv, cse->tmp_iv, cse->txform->blocksize))) goto bail; bcopy(cse->tmp_iv, crde->crd_iv, cse->txform->blocksize); - crde->crd_flags |= CRD_F_IV_EXPLICIT; + crde->crd_flags |= CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT; + } else { + crde->crd_flags |= CRD_F_IV_PRESENT; + crde->crd_skip = cse->txform->blocksize; } if (cop->mac) { diff --git a/sys/crypto/cryptodev.h b/sys/crypto/cryptodev.h index 473637d5fa5..0edd1edea9c 100644 --- a/sys/crypto/cryptodev.h +++ b/sys/crypto/cryptodev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.h,v 1.5 2001/06/23 21:00:49 angelos Exp $ */ +/* $OpenBSD: cryptodev.h,v 1.6 2001/06/23 21:57:00 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -278,7 +278,6 @@ struct cryptop { int (*crp_callback)(struct cryptop *); /* Callback function */ struct cryptop *crp_next; - caddr_t crp_iv; caddr_t crp_mac; int crp_mac_trunc_len; }; |