summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-09-15 10:44:55 +0000
committerpjd <pjd@FreeBSD.org>2006-09-15 10:44:55 +0000
commit8277c8e2a459205c3784ee76694a5dc7d45c99c6 (patch)
tree62ed704dbe2aef47fd39ef33ebce01a627c5640a /sys
parentaeb9aeaa73fe735ddc4a606776072563dd9b6b43 (diff)
downloadFreeBSD-src-8277c8e2a459205c3784ee76694a5dc7d45c99c6.zip
FreeBSD-src-8277c8e2a459205c3784ee76694a5dc7d45c99c6.tar.gz
Less magic.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/crypto/via/padlock_cipher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/crypto/via/padlock_cipher.c b/sys/crypto/via/padlock_cipher.c
index 698eb8b..8195584 100644
--- a/sys/crypto/via/padlock_cipher.c
+++ b/sys/crypto/via/padlock_cipher.c
@@ -225,7 +225,7 @@ padlock_cipher_process(struct padlock_session *ses, struct cryptodesc *enccrd,
cw->cw_direction = PADLOCK_DIRECTION_ENCRYPT;
key = ses->ses_ekey;
if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0)
- bcopy(enccrd->crd_iv, ses->ses_iv, 16);
+ bcopy(enccrd->crd_iv, ses->ses_iv, AES_BLOCK_LEN);
if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) {
crypto_copyback(crp->crp_flags, crp->crp_buf,
@@ -247,7 +247,8 @@ padlock_cipher_process(struct padlock_session *ses, struct cryptodesc *enccrd,
enccrd->crd_len, abuf);
}
- padlock_cbc(abuf, abuf, enccrd->crd_len / 16, key, cw, ses->ses_iv);
+ padlock_cbc(abuf, abuf, enccrd->crd_len / AES_BLOCK_LEN, key, cw,
+ ses->ses_iv);
if (allocated) {
crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip,
OpenPOWER on IntegriCloud