Revision: | 1.1 |
Committed: | Wed Feb 7 11:46:11 2007 UTC (18 years, 2 months ago) by dfeichti |
Content type: | application/x-sh |
Branch: | MAIN |
CVS Tags: | V01-03-47, V01-03-46, V01-03-45, V01-03-44, V01-03-43, V01-03-42, V01-03-41, V01-03-40, V01-03-39, V01-03-38, V01-03-37, V01-03-36, DBS_3_S2_0_pre2, V01-03-35, V01-03-34, V01-03-33, V01-03-32, V01-03-31, V01-03-30, V01-03-29, V01-03-28, V01-03-27, V01-03-26, V01-03-25, V01_03_25, V01-03-24, V01-03-23, V01-03-22, V01-03-21, V01-03-20, V01-03-19, V01-03-18, V01-03-17, V01-03-16, V01-03-15, V01-03-14, V01-03-13, V01-03-12, V01-03-11, V01-03-10, SiteDB_100708_1, V01-03-09, SiteDB_030608_1, V01-03-08, SiteDB_280508_1, V01-03-07, SiteDB_160408, V01-03-06, SiteDB_080408, V01-03-05, SiteDB_170308, SiteDB_160308, SiteDB_140308, SiteDB_120308, V01-03-04, V01-03-03, V01-03-02, SiteDB_080227, V01-03-01, V01-03-00, SiteDB_SM_Nightly_150208, SiteDB_SM_Nightly_070108, V01-02-04, V01-02-03, V01-02-02, V01-02-01, V01-02-00, V01-00-12, PHEDEX-WebSite-2_5_3_1, PHEDEX_WebSite_2_5_3, forPhedex_test, V01-00-11, V01-00-10, V01-00-09, V01-00-08, V01-00-07, V01-00-06, V01-00-05, V01-00-04, V01-00-03, V01-00-02, V01-00-01, WEBTOOLS_1_0_0_pre1, V1_00_00, V00-09-08, V00-09-07, V00-09-06, V00-09-05, V00-09-04, V00-09-03, V00-09-02, V00-09-01, V00-09-00, HEAD |
Log Message: | - first version of the web security module |
# | Content |
---|---|
1 | #!/bin/bash |
2 | |
3 | plain=$1 |
4 | |
5 | if test z"$plain" = z; then |
6 | plain="Some test string for encryption" |
7 | fi |
8 | |
9 | # For this test we specify a fixed init vector |
10 | iv="abcdefgh" |
11 | |
12 | encrperl=`./crypttest.pl -e -i $iv "$plain"|sed -e 's/^>\(.*\)<$/\1/'` |
13 | echo " Perl encrypt: >$encrperl<" |
14 | decrpython=`./crypttest.py -d "$encrperl"|sed -e 's/^>\(.*\)<$/\1/'` |
15 | echo "Python decrypt: >$decrpython<" |
16 | |
17 | encrpython=`./crypttest.py -e -i $iv "$plain"|sed -e 's/^>\(.*\)<$/\1/'` |
18 | echo "Python encrypt: >$encrpython<" |
19 | decrperl=`./crypttest.pl -d "$encrpython"|sed -e 's/^>\(.*\)<$/\1/'` |
20 | echo " Perl decrypt: >$decrperl<" |
21 | |
22 | if test "$encrperl" != "$encrpython"; then |
23 | echo "ERROR: Encrypted strings do not match" |
24 | exit 1 |
25 | fi |
26 | if test "$decrperl" != "$decrpython"; then |
27 | echo "ERROR: Decrypted strings do not match" |
28 | echo " Perl : $decrperl"|cat -v |
29 | echo " Python: $decrpython"|cat -v |
30 | exit 1 |
31 | fi |
32 | |
33 | echo;echo "OK" |
34 |