Skip to content

Commit

Permalink
add libsodium tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Dec 10, 2014
1 parent 84dcff8 commit 9d33a59
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ before_install:
- sudo apt-get install -qq build-essential libssl-dev swig python-m2crypto python-numpy dnsutils
- pip install m2crypto salsa20 pep8 pyflakes nose
- sudo tests/socksify/install.sh
- sudo tests/libsodium/install.sh
script:
- pep8 .
- pyflakes .
Expand All @@ -24,6 +25,8 @@ script:
- python tests/test.py -c tests/aes-cfb8.json
- python tests/test.py -c tests/rc4-md5.json
- python tests/test.py -c tests/salsa20.json
- python tests/test.py -c tests/chacha20.json
- python tests/test.py -c tests/salsa20-ctr.json
- python tests/test.py -c tests/table.json
- python tests/test.py -c tests/server-multi-ports.json
- python tests/test.py -s tests/server-multi-passwd.json -c tests/server-multi-passwd-client-side.json
Expand Down
10 changes: 10 additions & 0 deletions tests/chacha20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"server":"127.0.0.1",
"server_port":8388,
"local_port":1081,
"password":"salsa20_password",
"timeout":60,
"method":"chacha20",
"local_address":"127.0.0.1",
"fast_open":false
}
9 changes: 9 additions & 0 deletions tests/libsodium/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [ ! -d libsodium-1.0.1 ]; then
wget https://github.com/jedisct1/libsodium/releases/download/1.0.1/libsodium-1.0.1.tar.gz || exit 1
tar xf libsodium-1.0.1.tar.gz || exit 1
fi
pushd libsodium-1.0.1
./configure && make && make install || exit 1
popd
10 changes: 10 additions & 0 deletions tests/salsa20-ctr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"server":"127.0.0.1",
"server_port":8388,
"local_port":1081,
"password":"salsa20_password",
"timeout":60,
"method":"salsa20-ctr",
"local_address":"127.0.0.1",
"fast_open":false
}
2 changes: 1 addition & 1 deletion tests/salsa20.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"local_port":1081,
"password":"salsa20_password",
"timeout":60,
"method":"salsa20-ctr",
"method":"salsa20",
"local_address":"127.0.0.1",
"fast_open":false
}

0 comments on commit 9d33a59

Please sign in to comment.