summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Pujol <alexandre@pujol.io>2017-01-31 16:01:42 (GMT)
committer Alexandre Pujol <alexandre@pujol.io>2017-02-03 23:57:52 (GMT)
commite2fe8e508e49b270131ebfe1077bb6862203b3b2 (patch)
treee2592902f3b857ce78bca9a9d1d47a22e5a4ce98
parentd1b016b3c1b31811c3254fa4def3193cc21b8811 (diff)
Add unit tests for steganography feature using GPG key
-rwxr-xr-xextras/test/runtests30
1 files changed, 29 insertions, 1 deletions
diff --git a/extras/test/runtests b/extras/test/runtests
index 9269d67..cdf9e18 100755
--- a/extras/test/runtests
+++ b/extras/test/runtests
@@ -60,7 +60,8 @@ tests=(dig forge lock badpass open close passwd chksum bind setkey
recip-dig recip-forge recip-lock recip-open recip-close)
{ test $RESIZER = 1 } && { tests+=(resize) }
{ test $KDF = 1 } && { tests+=(kdforge kdfpass kdflock kdfopen) }
-{ test $STEGHIDE = 1 } && { tests+=(stgin stgout stgopen stgpipe stgimpl) }
+{ test $STEGHIDE = 1 } && { tests+=(stgin stgout stgopen stgpipe stgimpl
+recip-stgin recip-stgout recip-stgopen recip-stgimpl) }
{ test $QRENCODE = 1 } && { tests+=(qrenc) }
# GnuPG Conf.
@@ -135,6 +136,33 @@ test-tomb-recip() {
tt close recip
{ test $? = 0 } && { results+=(recip-close SUCCESS) }
+ { test $STEGHIDE = 1 } && {
+ notice "Testing tomb with recipient steganographic hiding of keys"
+
+ cp -f arditi.jpg /tmp/recip.jpg
+ sudo rm -f /tmp/recip.steg.key
+
+ # The implementation does not support "--unsafe --tomb-pwd ${dummypass}" yet
+ tt bury -k /tmp/recip.tomb.key \
+ /tmp/recip.jpg -r "$gpgid_1"
+ { test $? = 0 } && { results+=(recip-stgin SUCCESS) }
+
+ tt exhume -k /tmp/recip.steg.key \
+ /tmp/recip.jpg
+ { test $? = 0 } && { results+=(recip-stgout SUCCESS) }
+
+ tt open -k /tmp/recip.steg.key \
+ /tmp/recip.tomb -r "$gpgid_1"
+ { test $? = 0 } && { results+=(recip-stgopen SUCCESS) }
+ ${T} close recip
+
+ notice "test using open -k image.jpeg"
+ tt open -k /tmp/recip.jpg \
+ /tmp/recip.tomb -r "$gpgid_1"
+ { test $? = 0 } && { results+=(recip-stgimpl SUCCESS) }
+ tt close recip
+ }
+
}
test-bind-hooks() {