Less magic.
MFC after: 3 days
This commit is contained in:
parent
cc4c1b6971
commit
ef7c47775f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162316
@ -225,7 +225,7 @@ padlock_cipher_process(struct padlock_session *ses, struct cryptodesc *enccrd,
|
|||||||
cw->cw_direction = PADLOCK_DIRECTION_ENCRYPT;
|
cw->cw_direction = PADLOCK_DIRECTION_ENCRYPT;
|
||||||
key = ses->ses_ekey;
|
key = ses->ses_ekey;
|
||||||
if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0)
|
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) {
|
if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) {
|
||||||
crypto_copyback(crp->crp_flags, crp->crp_buf,
|
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);
|
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) {
|
if (allocated) {
|
||||||
crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip,
|
crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip,
|
||||||
|
Loading…
Reference in New Issue
Block a user