diff --git a/.travis/install.sh b/.travis/install.sh index 4767316da4c8fc80c233641a6d52ffb23b9f54f1..20bc9b411aa73dfc9c37547d336d8d5865c37edb 100644 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -9,25 +9,7 @@ then fi if python --version 2>&1 | grep -q PyPy; then - wget https://pypi.python.org/packages/82/f7/d6dfd7595910a20a563a83a762bf79a253c4df71759c3b228accb3d7e5e4/cryptography-1.7.1.tar.gz - tar zxf cryptography-1.7.1.tar.gz - cd cryptography-1.7.1 - patch << EOF ---- setup.py -+++ setup.py -@@ -47,7 +47,7 @@ if sys.version_info < (3, 4): - if sys.version_info < (3, 3): - requirements.append("ipaddress") - --if platform.python_implementation() == "PyPy": -+if False: - if sys.pypy_version_info < (2, 6): - raise RuntimeError( - "cryptography 1.0 is not compatible with PyPy < 2.6. Please " -EOF - $SCAPY_SUDO pip install $PIP_INSTALL_FLAGS . - cd ../ - rm -rf cryptography-* + # cryptography requires PyPy >= 2.6, Travis CI uses 2.5.0 $SCAPY_SUDO pip install $PIP_INSTALL_FLAGS ecdsa mock else $SCAPY_SUDO pip install $PIP_INSTALL_FLAGS cryptography ecdsa mock diff --git a/.travis/test.sh b/.travis/test.sh index 419310d269b7553aa4e54e7d823849ac6e63a423..f3a78a46ef9921fec62f6f81763e02c07002b326 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -26,8 +26,8 @@ fi if python --version 2>&1 | grep -q PyPy then - TRAVIS_PYPY="yes" - UT_FLAGS+=" -K wep " + # cryptography requires PyPy >= 2.6, Travis CI uses 2.5.0 + UT_FLAGS+=" -K crypto " fi # Set PATH @@ -75,11 +75,6 @@ do then continue fi - if [ "$f" = "cert.uts" -o "$f" = "ipsec.uts" ] && [ "$TRAVIS_PYPY" = "yes" ] - then - # currently disabled - continue - fi $SCAPY_SUDO ./run_tests -q -F -t $f $UT_FLAGS || exit $? done diff --git a/test/cert.uts b/test/cert.uts index 2b01c8b1ada29d91678c6e9b689096104b9ee962..876286d26b414b9c59bb317fb0c2ac67a3b6e21e 100644 --- a/test/cert.uts +++ b/test/cert.uts @@ -3,6 +3,7 @@ # Try me with: # bash test/run_tests -t test/cert.uts -F +~ crypto ########### PKCS helpers ############################################### diff --git a/test/ipsec.uts b/test/ipsec.uts index 4ec59d649b33b1442c2329f48e71edd6845809f9..7a49e2855b73b007cc65b668c673f830a18fa3bd 100644 --- a/test/ipsec.uts +++ b/test/ipsec.uts @@ -2,11 +2,14 @@ % IPSec layer regression tests ############################## +~ crypto + ############################################################################### + IPv4 / ESP - Transport - Encryption Algorithms ####################################### = IPv4 / ESP - Transport - NULL - NULL +~ -crypto import socket @@ -237,6 +240,7 @@ assert(d[TCP] == p[TCP]) ####################################### = IPv4 / ESP - Tunnel - NULL - NULL +~ -crypto p = IP(src='1.1.1.1', dst='2.2.2.2') p /= TCP(sport=45012, dport=80) @@ -2425,6 +2429,7 @@ except IPSecIntegrityError, err: ####################################### = IPv6 / ESP - Transport - NULL - NULL +~ -crypto p = IPv6(src='11::22', dst='22::11') p /= TCP(sport=45012, dport=80) @@ -2752,6 +2757,7 @@ except IPSecIntegrityError, err: ####################################### = IPv6 / ESP - Tunnel - NULL - NULL +~ -crypto p = IPv6(src='11::22', dst='22::11') p /= TCP(sport=45012, dport=80) diff --git a/test/regression.uts b/test/regression.uts index 27255a7409cc46bd215a964f7bc4ae72817e869a..41c640a052f88744958fa0db5aade328c5bf3700 100644 --- a/test/regression.uts +++ b/test/regression.uts @@ -580,7 +580,7 @@ assert(len(y[TFTP_Options].options) == 2 and y[TFTP_Option].oname == "blksize") = WEP tests -~ wifi wep Dot11 LLC SNAP IP TCP +~ wifi crypto Dot11 LLC SNAP IP TCP conf.wepkey = "Fobar" str(Dot11WEP()/LLC()/SNAP()/IP()/TCP(seq=12345678)) assert(_ == '\x00\x00\x00\x00\xe3OjYLw\xc3x_%\xd0\xcf\xdeu-\xc3pH#\x1eK\xae\xf5\xde\xe7\xb8\x1d,\xa1\xfe\xe83\xca\xe1\xfe\xbd\xfe\xec\x00)T`\xde.\x93Td\x95C\x0f\x07\xdd')