doc/share/security/patches/SA-05:19/ipsec.patch
Bjoern A. Zeeb 3571e53040 Import FreeBSD Security Advisories and Errata Notices, as well as their
patches for easier mirroring, to eliminate a special copy, to make
www.freebsd.org/security a full copy of security.freebsd.org and be
eventually be the same.

For now files are just sitting there.   The symlinks are missing.

Discussed on:	www (repository location)
Discussed with:	simon (so)
2012-08-15 06:19:40 +00:00

47 lines
1.7 KiB
Diff

Index: sys/netinet6/ah_aesxcbcmac.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/ah_aesxcbcmac.c,v
retrieving revision 1.2
diff -u -p -r1.2 ah_aesxcbcmac.c
--- sys/netinet6/ah_aesxcbcmac.c 7 Jan 2005 02:30:34 -0000 1.2
+++ sys/netinet6/ah_aesxcbcmac.c 26 Jul 2005 06:51:39 -0000
@@ -78,6 +78,7 @@ ah_aes_xcbc_mac_init(state, sav)
u_int8_t k3seed[AES_BLOCKSIZE] = { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 };
u_int32_t r_ks[(RIJNDAEL_MAXNR+1)*4];
aesxcbc_ctx *ctx;
+ u_int8_t k1[AES_BLOCKSIZE];
if (!state)
panic("ah_aes_xcbc_mac_init: what?");
@@ -93,14 +94,15 @@ ah_aes_xcbc_mac_init(state, sav)
if ((ctx->r_nr = rijndaelKeySetupEnc(r_ks,
(char *)_KEYBUF(sav->key_auth), AES_BLOCKSIZE * 8)) == 0)
return -1;
- if (rijndaelKeySetupEnc(ctx->r_k1s, k1seed, AES_BLOCKSIZE * 8) == 0)
+ rijndaelEncrypt(r_ks, ctx->r_nr, k1seed, k1);
+ rijndaelEncrypt(r_ks, ctx->r_nr, k2seed, ctx->k2);
+ rijndaelEncrypt(r_ks, ctx->r_nr, k3seed, ctx->k3);
+ if (rijndaelKeySetupEnc(ctx->r_k1s, k1, AES_BLOCKSIZE * 8) == 0)
return -1;
- if (rijndaelKeySetupEnc(ctx->r_k2s, k2seed, AES_BLOCKSIZE * 8) == 0)
+ if (rijndaelKeySetupEnc(ctx->r_k2s, ctx->k2, AES_BLOCKSIZE * 8) == 0)
return -1;
- if (rijndaelKeySetupEnc(ctx->r_k3s, k3seed, AES_BLOCKSIZE * 8) == 0)
+ if (rijndaelKeySetupEnc(ctx->r_k3s, ctx->k3, AES_BLOCKSIZE * 8) == 0)
return -1;
- rijndaelEncrypt(r_ks, ctx->r_nr, k2seed, ctx->k2);
- rijndaelEncrypt(r_ks, ctx->r_nr, k3seed, ctx->k3);
return 0;
}
@@ -151,8 +153,8 @@ ah_aes_xcbc_mac_loop(state, addr, len)
addr += AES_BLOCKSIZE;
}
if (addr < ep) {
- bcopy(addr, ctx->buf, ep - addr);
- ctx->buflen = ep - addr;
+ bcopy(addr, ctx->buf + ctx->buflen, ep - addr);
+ ctx->buflen += ep - addr;
}
}