This patch adds a full implementation of the IPSec layer in
scapy/layers/ipsec.py. See the module's doc string for instructions.
In order to support encryption/decryption and authentication, the
pycrypto library is required. If not found, only the NULL/NULL
algorithms will be available.
(almost) complete test suite can be found in test/ipsec.uts and can
be launched with:
./bin/UTscapy -m scapy/layers/ipsec.py -t test/ipsec.uts -f text -F
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
--HG--
branch : ipsec
Packet.build() is called only on the first layer. It will call
Packet.do_build() which will recurse through all layers. For each layer,
it will call Packet.self_build() which will do the job for each layer.
Packet.do_build() will call Packet.post_build() and transform on them,
and concatenate them. Then Packet.build() will call Packet.build_padding()
and Packet.build_done().
Note that this undetermined case will have a different behavior:
Raw("ABC")/Padding("abc")/Raw("DEF")/Padding("def")
It was "ABCabcDEFdef"
Now it is "ABCDEFabcdef"