Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164711609
D1503.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1503.diff
View Options
Index: head/sys/netipsec/key.c
===================================================================
--- head/sys/netipsec/key.c
+++ head/sys/netipsec/key.c
@@ -6706,7 +6706,7 @@
continue;
alg = (struct sadb_alg *)(mtod(n, caddr_t) + off);
alg->sadb_alg_id = i;
- alg->sadb_alg_ivlen = ealgo->blocksize;
+ alg->sadb_alg_ivlen = ealgo->ivsize;
alg->sadb_alg_minbits = _BITS(ealgo->minkey);
alg->sadb_alg_maxbits = _BITS(ealgo->maxkey);
off += PFKEY_ALIGN8(sizeof(struct sadb_alg));
Index: head/sys/netipsec/xform_esp.c
===================================================================
--- head/sys/netipsec/xform_esp.c
+++ head/sys/netipsec/xform_esp.c
@@ -200,16 +200,10 @@
return EINVAL;
}
- /*
- * NB: The null xform needs a non-zero blocksize to keep the
- * crypto code happy but if we use it to set ivlen then
- * the ESP header will be processed incorrectly. The
- * compromise is to force it to zero here.
- */
if (SAV_ISCTRORGCM(sav))
sav->ivlen = 8; /* RFC4106 3.1 and RFC3686 3.1 */
else
- sav->ivlen = (txform == &enc_xform_null ? 0 : txform->ivsize);
+ sav->ivlen = txform->ivsize;
/*
* Setup AH-related state.
Index: head/sys/opencrypto/xform.c
===================================================================
--- head/sys/opencrypto/xform.c
+++ head/sys/opencrypto/xform.c
@@ -154,7 +154,7 @@
struct enc_xform enc_xform_null = {
CRYPTO_NULL_CBC, "NULL",
/* NB: blocksize of 4 is to generate a properly aligned ESP header */
- NULL_BLOCK_LEN, NULL_BLOCK_LEN, NULL_MIN_KEY, NULL_MAX_KEY,
+ NULL_BLOCK_LEN, 0, NULL_MIN_KEY, NULL_MAX_KEY,
null_encrypt,
null_decrypt,
null_setkey,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 4, 7:32 AM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35950921
Default Alt Text
D1503.diff (1 KB)
Attached To
Mode
D1503: Use explicitly specified ivsize instead of blocksize, when we mean IV size.
Attached
Detach File
Event Timeline
Log In to Comment