diff options
author | Sven Gothel <[email protected]> | 2022-07-29 13:53:40 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-07-29 13:53:40 +0200 |
commit | 220d79afbb676611b5fc8844abf30b0d763a3772 (patch) | |
tree | 302b7eec2d15121b3edc87dd278abbbade38c727 /scripts | |
parent | 5f814fe0923bdc92a60da58f6b2fb5a037b19361 (diff) |
manual test scripting w/ private data
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build.sh | 1 | ||||
-rwxr-xr-x | scripts/test_cipherpack_cmdline.sh | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 63f609c..71e51a3 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -40,6 +40,7 @@ buildit() { cd $build_dir # CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++" + # cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DUSE_LIBUNWIND=ON .. # cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON .. cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DUSE_LIBCURL=ON .. # cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DUSE_LIBCURL=ON -DDEBUG=ON .. diff --git a/scripts/test_cipherpack_cmdline.sh b/scripts/test_cipherpack_cmdline.sh index ea8f21c..8751297 100755 --- a/scripts/test_cipherpack_cmdline.sh +++ b/scripts/test_cipherpack_cmdline.sh @@ -2,6 +2,9 @@ data_dir_in=../cipherpack_test_data_local +infile=${data_dir_in}/deploy.sqfs +#infile=${data_dir_in}/data-382MB.bin + sdir=`dirname $(readlink -f $0)` rootdir=`dirname $sdir` bname=`basename $0 .sh` @@ -41,11 +44,11 @@ run_test_file01() { #scripts/cipherpack hash -out ${data_dir_out}/test_data_local.phash ${data_dir_in} #if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi - scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t1.orig.phash -out ${data_dir_out}/t1.enc ${data_dir_in}/data-10kiB.bin + scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t1.orig.phash -out ${data_dir_out}/t1.enc ${infile} if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi scripts/cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 -hashout ${data_dir_out}/t1.dec.phash -out ${data_dir_out}/t1.dec ${data_dir_out}/t1.enc if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi - cmp ${data_dir_out}/t1.dec ${data_dir_in}/data-10kiB.bin + cmp ${data_dir_out}/t1.dec ${infile} if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi cmp_hash_value ${data_dir_out}/t1.orig.phash ${data_dir_out}/t1.dec.phash if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi @@ -57,11 +60,11 @@ run_test_file01() { } run_test_pipe01() { - cat ${data_dir_in}/data-10kiB.bin | scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t2.orig.phash > ${data_dir_out}/t2.enc + cat ${infile} | scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t2.orig.phash > ${data_dir_out}/t2.enc if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi cat ${data_dir_out}/t2.enc | scripts/cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 -hashout ${data_dir_out}/t2.dec.phash > ${data_dir_out}/t2.dec if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi - cmp ${data_dir_out}/t2.dec ${data_dir_in}/data-10kiB.bin + cmp ${data_dir_out}/t2.dec ${infile} if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi cmp_hash_value ${data_dir_out}/t2.orig.phash ${data_dir_out}/t2.dec.phash if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi @@ -72,9 +75,9 @@ run_test_pipe01() { } run_test_pipe02() { - cat ${data_dir_in}/data-10kiB.bin | scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t3.orig.phash | scripts/cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 -hashout ${data_dir_out}/t3.dec.phash > ${data_dir_out}/t3.dec + cat ${infile} | scripts/cipherpack pack -epk test_keys/terminal_rsa1.pub.pem -ssk test_keys/host_rsa1 -hashout ${data_dir_out}/t3.orig.phash | scripts/cipherpack unpack -spk test_keys/host_rsa1.pub.pem -dsk test_keys/terminal_rsa1 -hashout ${data_dir_out}/t3.dec.phash > ${data_dir_out}/t3.dec if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi - cmp ${data_dir_out}/t3.dec ${data_dir_in}/data-10kiB.bin + cmp ${data_dir_out}/t3.dec ${infile} if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi cmp_hash_value ${data_dir_out}/t3.orig.phash ${data_dir_out}/t3.dec.phash if [ $? -ne 0 ] ; then echo "ERROR test $LINENO"; return 1; fi |