Page MenuHomeFreeBSD

D33528.diff
No OneTemporary

D33528.diff

diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c
+++ b/sys/opencrypto/cryptosoft.c
@@ -894,10 +894,11 @@
else
crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length,
exf->update, ctx);
- if (crp->crp_aad_length % 16 != 0) {
+ if (crp->crp_aad_length % POLY1305_BLOCK_LEN != 0) {
/* padding1 */
- memset(blk, 0, 16);
- exf->update(ctx, blk, 16 - crp->crp_aad_length % 16);
+ memset(blk, 0, POLY1305_BLOCK_LEN);
+ exf->update(ctx, blk, POLY1305_BLOCK_LEN -
+ crp->crp_aad_length % POLY1305_BLOCK_LEN);
}
/* Do encryption with MAC */
@@ -936,10 +937,11 @@
crypto_cursor_copyback(&cc_out, resid, blk);
}
exf->update(ctx, blk, resid);
- if (resid % 16 != 0) {
+ if (resid % POLY1305_BLOCK_LEN != 0) {
/* padding2 */
- memset(blk, 0, 16);
- exf->update(ctx, blk, 16 - resid % 16);
+ memset(blk, 0, POLY1305_BLOCK_LEN);
+ exf->update(ctx, blk, POLY1305_BLOCK_LEN -
+ resid % POLY1305_BLOCK_LEN);
}
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 10:17 AM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14695920
Default Alt Text
D33528.diff (1020 B)

Event Timeline