summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/key_debug.c
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-09-16 09:41:34 -0500
committerLuiz Otavio O Souza <luiz@netgate.com>2015-10-20 12:11:21 -0500
commit13010d6b0da4d97e56243edbea0a585b8285cd3e (patch)
treed577e52e76619f6acffa999bf965c7cac3a0f944 /sys/netipsec/key_debug.c
parent3e6aa0c60411689ffb4afccff67f29617006401f (diff)
downloadFreeBSD-src-13010d6b0da4d97e56243edbea0a585b8285cd3e.zip
FreeBSD-src-13010d6b0da4d97e56243edbea0a585b8285cd3e.tar.gz
MFC r286292:
Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec defines the keys differently than NIST does, so we have to muck with key lengths and nonce/IVs to be standard compliant... Remove the iv from secasvar as it was unused... Add a counter protected by a mutex to ensure that the counter for GCM and ICM will never be repeated.. This is a requirement for security.. I would use atomics, but we don't have a 64bit one on all platforms.. Fix a bug where IPsec was depending upon the OCF to ensure that the blocksize was always at least 4 bytes to maintain alignment... Move this logic into IPsec so changes to OCF won't break IPsec... In one place, espx was always non-NULL, so don't test that it's non-NULL before doing work.. minor style cleanups... drop setting key and klen as they were not used... Enforce that OCF won't pass invalid key lengths to AES that would panic the machine... This was has been tested by others too... I tested this against NetBSD 6.1.5 using mini-test suite in https://github.com/jmgurney/ipseccfgs and the only things that don't pass are keyed md5 and sha1, and 3des-deriv (setkey syntax error), all other modes listed in setkey's man page... The nice thing is that NetBSD uses setkey, so same config files were used on both... Reviewed by: gnn TAG: IPSEC-HEAD Issue: #4841
Diffstat (limited to 'sys/netipsec/key_debug.c')
-rw-r--r--sys/netipsec/key_debug.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/netipsec/key_debug.c b/sys/netipsec/key_debug.c
index ecbef7d..c9365e2 100644
--- a/sys/netipsec/key_debug.c
+++ b/sys/netipsec/key_debug.c
@@ -577,11 +577,6 @@ kdebug_secasv(struct secasvar *sav)
kdebug_sadb_key((struct sadb_ext *)sav->key_auth);
if (sav->key_enc != NULL)
kdebug_sadb_key((struct sadb_ext *)sav->key_enc);
- if (sav->iv != NULL) {
- printf(" iv=");
- ipsec_hexdump(sav->iv, sav->ivlen ? sav->ivlen : 8);
- printf("\n");
- }
if (sav->replay != NULL)
kdebug_secreplay(sav->replay);
OpenPOWER on IntegriCloud