Skip to content

Commit 7f6fe25

Browse files
author
kevin.w.wall
committed
Bash script to execute JavaEncryptor to assist with setting of MasterKey and MasterSalt values.
1 parent 2b2dd31 commit 7f6fe25

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
findjar=$PWD/findjar.sh
4+
5+
cd ../../../
6+
esapi_props=
7+
8+
if [[ -f configuration/.esapi/ESAPI.properties ]]
9+
then esapi_props="configuration/.esapi/ESAPI.properties"
10+
else esapi_props="src/main/resources/.esapi/ESAPI.properties"
11+
fi
12+
if [[ ! -r $esapi_props ]]
13+
then echo "$0: ESAPI.properties file ($esapi_props) not readable." >&2
14+
exit 1
15+
fi
16+
17+
# This classpath is relative to ../../.. directory (from here). See above 'cd'
18+
classpath=".:target/ESAPI-2.0.jar:\
19+
$($findjar log4j-1.2.12.jar):\
20+
$($findjar commons-fileupload-1.2.jar):\
21+
$($findjar servlet-api-2.4.jar)"
22+
23+
set -x
24+
java -Dlog4j.configuration=src/test/resources/log4j.xml \
25+
-Dorg.owasp.esapi.resources=$esapi_props \
26+
-classpath $classpath \
27+
org.owasp.esapi.reference.crypto.JavaEncryptor "$@"

0 commit comments

Comments
 (0)