Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smessage integration #293

Merged
merged 13 commits into from
Jan 25, 2018
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions tests/_integration/integration_checks.sh

This file was deleted.

32 changes: 32 additions & 0 deletions tests/_integration/integration_go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash -e

# import functions
. tests/_integration/utils.sh

echo ".. testing secure cell seal, go <--> go"
go run ./tests/_integration/scell_seal_string_echo.go "dec" "passg" `go run ./tests/_integration/scell_seal_string_echo.go "enc" "passg" "go seal test"`
check_result_zero
echo ".. testing secure cell seal context, go <--> go"
go run ./tests/_integration/scell_seal_string_echo.go "dec" "passg" `go run ./tests/_integration/scell_seal_string_echo.go "enc" "passg" "go seal with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell context imprint, go <--> go"
go run ./tests/_integration/scell_context_string_echo.go "dec" "passg" `go run ./tests/_integration/scell_context_string_echo.go "enc" "passg" "go context with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell token protect, go <--> go"
go run ./tests/_integration/scell_token_string_echo.go "dec" "passg" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passg" "go token test"`
check_result_zero
echo ".. testing secure cell token protect context, go <--> go"
go run ./tests/_integration/scell_token_string_echo.go "dec" "passg" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passg" "go token with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure message encryption, go <--> go"
go run ./tests/_integration/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tests/_integration/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go secure message"`
check_result_zero

echo ".. testing secure message signing, go <--> go"
go run ./tests/_integration/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tests/_integration/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go secure message"`
check_result_zero

exit ${status}
32 changes: 32 additions & 0 deletions tests/_integration/integration_js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash -e

# import functions
. tests/_integration/utils.sh

echo ".. testing secure cell seal, node <--> node"
node ./tests/_integration/scell_seal_string_echo.js "dec" "passr" `node ./tests/_integration/scell_seal_string_echo.js "enc" "passr" "node seal test"`
check_result_zero
echo ".. testing secure cell seal context, node <--> node"
node ./tests/_integration/scell_seal_string_echo.js "dec" "passr" `node ./tests/_integration/scell_seal_string_echo.js "enc" "passr" "node seal with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell context imprint, node <--> node"
node ./tests/_integration/scell_context_string_echo.js "dec" "passw2" `node ./tests/_integration/scell_context_string_echo.js "enc" "passw2" "node context with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell token protect, node <--> node"
node ./tests/_integration/scell_token_string_echo.js "dec" "passw1" `node ./tests/_integration/scell_token_string_echo.js "enc" "passw1" "node token test"`
check_result_zero
echo ".. testing secure cell token protect context, node <--> node"
node ./tests/_integration/scell_token_string_echo.js "dec" "passw2" `node ./tests/_integration/scell_token_string_echo.js "enc" "passw2" "node token with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure message encryption, node <--> node"
node ./tests/_integration/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tests/_integration/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node secure message"`
check_result_zero

echo ".. testing secure message signing, node <--> node"
node ./tests/_integration/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tests/_integration/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node secure message"`
check_result_zero

exit ${status}
60 changes: 24 additions & 36 deletions tests/_integration/integration_php.sh
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
#!/bin/bash -e

# import functions
. tests/_integration/utils.sh

# PHP <-> PHP
echo ".. testing secure cell, php <--> php"
php -f ./tests/_integration/scell_seal_string_echo.php "dec" "passwd" \
`php -f ./tests/_integration/scell_seal_string_echo.php "enc" "passwd" "php->php seal"`
# with context
echo ".. testing secure cell seal, php <--> php"
php -f ./tests/_integration/scell_seal_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_seal_string_echo.php "enc" "passwd" "php->php seal"`
check_result_zero
echo ".. testing secure cell seal context, php <--> php"
php -f ./tests/_integration/scell_seal_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_seal_string_echo.php "enc" "passwd" "php->php seal with context" "context"` "context"
# with required context
php -f ./tests/_integration/scell_context_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_context_string_echo.php "enc" "passwd" "php->php seal context message" "somecontext"` "somecontext"
# with token
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" \
`php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->php token"`
# with token+context
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->php token with context" "context"` "context"

# PHP <-> RUBY
echo ".. testing secure cell, php <--> ruby"
php -f ./tests/_integration/scell_seal_string_echo.php "dec" "passwd" `ruby ./tests/_integration/scell_seal_string_echo.rb "enc" "passwd" "ruby->php seal"`

ruby ./tests/_integration/scell_seal_string_echo.rb "dec" "passwd" `php -f ./tests/_integration/scell_seal_string_echo.php "enc" "passwd" "php->ruby seal"`
## with context
php -f ./tests/_integration/scell_seal_string_echo.php "dec" "passwd" `ruby ./tests/_integration/scell_seal_string_echo.rb "enc" "passwd" "ruby->php seal with context" "somecontext"` "somecontext"
check_result_zero

ruby ./tests/_integration/scell_seal_string_echo.rb "dec" "passwd" `php -f ./tests/_integration/scell_seal_string_echo.php "enc" "passwd" "php->ruby seal with context" "somecontext"` "somecontext"

echo ".. testing secure cell, context imprint mode, php <--> ruby"
ruby ./tests/_integration/scell_context_string_echo.rb "dec" "passwd" `php -f ./tests/_integration/scell_context_string_echo.php "enc" "passwd" "php->ruby with context" "somecontext"` "somecontext"
php -f ./tests/_integration/scell_context_string_echo.php "dec" "passwd" `ruby ./tests/_integration/scell_context_string_echo.rb "enc" "passwd" "ruby->php with context" "somecontext"` "somecontext"

echo ".. testing secure cell, token protect mode, php <--> ruby"
ruby ./tests/_integration/scell_token_string_echo.rb "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->ruby token test"`

ruby ./tests/_integration/scell_token_string_echo.rb "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->ruby token test with content" "somecontext"` "somecontext"
echo ".. testing secure cell context imprint, php <--> php"
php -f ./tests/_integration/scell_context_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_context_string_echo.php "enc" "passwd" "php->php seal context message" "somecontext"` "somecontext"
check_result_zero

php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `ruby ./tests/_integration/scell_token_string_echo.rb "enc" "passwd" "ruby->php with context" "somecontext"` "somecontext"
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `ruby ./tests/_integration/scell_token_string_echo.rb "enc" "passwd" "ruby->php with context" "somecontext"` "somecontext"
echo ".. testing secure cell token protect, php <--> php"
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->php token"`
check_result_zero
echo ".. testing secure cell token protect context, php <--> php"
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->php token with context" "context"` "context"
check_result_zero

echo ".. testing secure cell, token protect mode, php <--> go"
go run ./tests/_integration/scell_token_string_echo.go "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->go token"`
echo ".. testing secure message encryption, php <--> php"
php -f ./tests/_integration/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tests/_integration/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php secure message"`
check_result_zero

go run ./tests/_integration/scell_token_string_echo.go "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "php->go token with content" "somecontext"` "somecontext"
echo ".. testing secure message signing, php <--> php"
php -f ./tests/_integration/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tests/_integration/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php secure message"`
check_result_zero

php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passwd" "go->php token" "somecontext"` "somecontext"
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passwd" "go->php token with context" "somecontext"` "somecontext"
exit ${status}
56 changes: 20 additions & 36 deletions tests/_integration/integration_python.sh
Original file line number Diff line number Diff line change
@@ -1,48 +1,32 @@
#!/bin/bash -e

echo ".. testing secure cell, python <--> python"
# import functions
. tests/_integration/utils.sh

echo ".. testing secure cell seal, python <--> python"
python ./tests/_integration/scell_seal_string_echo.py "dec" "passr" `python ./tests/_integration/scell_seal_string_echo.py "enc" "passr" "python seal test"`
check_result_zero
echo ".. testing secure cell seal context, python <--> python"
python ./tests/_integration/scell_seal_string_echo.py "dec" "passr" `python ./tests/_integration/scell_seal_string_echo.py "enc" "passr" "python seal with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell context imprint, python <--> python"
python ./tests/_integration/scell_context_string_echo.py "dec" "passw2" `python ./tests/_integration/scell_context_string_echo.py "enc" "passw2" "python context with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure cell token protect, python <--> python"
python ./tests/_integration/scell_token_string_echo.py "dec" "passw1" `python ./tests/_integration/scell_token_string_echo.py "enc" "passw1" "python token test"`
check_result_zero
echo ".. testing secure cell token protect context, python <--> python"
python ./tests/_integration/scell_token_string_echo.py "dec" "passw2" `python ./tests/_integration/scell_token_string_echo.py "enc" "passw2" "python token with context" "somecontext"` "somecontext"
check_result_zero

echo ".. testing secure message encryption, python <--> python"
python ./tests/_integration/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tests/_integration/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python secure message"`
check_result_zero

# PYTHON <-> RUBY
echo ".. testing secure cell, seal mode, python <--> ruby"

python ./tests/_integration/scell_seal_string_echo.py "dec" "passwd" `ruby ./tests/_integration/scell_seal_string_echo.rb "enc" "passwd" "ruby->python seal"`
ruby ./tests/_integration/scell_seal_string_echo.rb "dec" "passwd" `python ./tests/_integration/scell_seal_string_echo.py "enc" "passwd" "python->ruby seal"`

## with context
python ./tests/_integration/scell_seal_string_echo.py "dec" "passwd" `ruby ./tests/_integration/scell_seal_string_echo.rb "enc" "passwd" "ruby->python seal with context" "somecontext"` "somecontext"
ruby ./tests/_integration/scell_seal_string_echo.rb "dec" "passwd" `python ./tests/_integration/scell_seal_string_echo.py "enc" "passwd" "python->ruby seal with context" "somecontext"` "somecontext"

echo ".. testing secure cell, context imprint mode, python <--> ruby"
ruby ./tests/_integration/scell_context_string_echo.rb "dec" "passwd" `python ./tests/_integration/scell_context_string_echo.py "enc" "passwd" "python->ruby with context" "somecontext"` "somecontext"
python ./tests/_integration/scell_context_string_echo.py "dec" "passwd" `ruby ./tests/_integration/scell_context_string_echo.rb "enc" "passwd" "ruby->python with context" "somecontext"` "somecontext"

echo ".. testing secure cell, token protect mode, python <--> ruby"
ruby ./tests/_integration/scell_token_string_echo.rb "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "python->ruby token test"`
ruby ./tests/_integration/scell_token_string_echo.rb "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "python->ruby token test with content" "somecontext"` "somecontext"

python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `ruby ./tests/_integration/scell_token_string_echo.rb "enc" "passwd" "ruby->python with context" "somecontext"` "somecontext"
python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `ruby ./tests/_integration/scell_token_string_echo.rb "enc" "passwd" "ruby->python with context" "somecontext"` "somecontext"

echo ".. testing secure cell, token protect mode, python <--> go"
go run ./tests/_integration/scell_token_string_echo.go "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "python->go token"`

go run ./tests/_integration/scell_token_string_echo.go "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "python->go token with content" "somecontext"` "somecontext"

python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passwd" "go->python token" "somecontext"` "somecontext"
python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `go run ./tests/_integration/scell_token_string_echo.go "enc" "passwd" "go->python token with context" "somecontext"` "somecontext"

echo ".. testing secure cell, token protect mode, python <--> php"
php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "php->python token"`

php -f ./tests/_integration/scell_token_string_echo.php "dec" "passwd" `python ./tests/_integration/scell_token_string_echo.py "enc" "passwd" "php->python token with content" "somecontext"` "somecontext"
echo ".. testing secure message signing, python <--> python"
python ./tests/_integration/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tests/_integration/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python secure message"`
check_result_zero

python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "python->php token" "somecontext"` "somecontext"
python ./tests/_integration/scell_token_string_echo.py "dec" "passwd" `php -f ./tests/_integration/scell_token_string_echo.php "enc" "passwd" "python->php token with context" "somecontext"` "somecontext"
exit ${status}
Loading