mirror of
https://github.com/brmlab/timingattack.git
synced 2025-06-08 17:14:10 +02:00
Fix the key generator script.
This commit is contained in:
parent
28b33f5946
commit
2959d2e719
1 changed files with 18 additions and 8 deletions
|
@ -1,15 +1,25 @@
|
|||
#!/bin/bash
|
||||
. libs.sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo 1>&2 Usage: $0 location
|
||||
if [ $# -ne 1 ] | [ $# -ne 3 ]; then
|
||||
echo 1>&2 Usage: $0 location [rangeLow rangeHigh]
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# This will create a new key store in the given location and generate a new
|
||||
# symmetric signing key. This expects Keyczar and GSON to be on the classpath
|
||||
if [ ! -f $1/meta ]; then
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool create --location=$1 --purpose=sign
|
||||
if [ $# -eq 3 ]; then
|
||||
dirs=""
|
||||
for i in `seq $2 $3`; do
|
||||
dirs="$dirs $1$i"
|
||||
done
|
||||
else
|
||||
dirs="$1"
|
||||
fi
|
||||
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool addkey --location=$1 --status=primary
|
||||
for i in $dirs; do
|
||||
mkdir $i
|
||||
# This will create a new key store in the given location and generate a new
|
||||
# symmetric signing key. This expects Keyczar and GSON to be on the classpath
|
||||
if [ ! -f $1/meta ]; then
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool create --location=$i --purpose=sign
|
||||
fi
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool addkey --location=$i --status=primary
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue