pubkey_speed: sudo is not required

Also, refer to pubkey_speed properly when not being called from the same
directory.
This commit is contained in:
Tobias Brunner 2013-09-04 09:28:49 +02:00
parent f1d5d87619
commit f17322dccb
1 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,10 @@
#!/bin/bash
DIR=$(dirname `readlink -f $0`)
function rsatest {
echo -n " e=3 "; openssl genrsa -3 $1 2>/dev/null| sudo ./pubkey_speed "$2" rsa $3
echo -n " e=f4 "; openssl genrsa -f4 $1 2>/dev/null| sudo ./pubkey_speed "$2" rsa $3
echo -n " e=3 "; openssl genrsa -3 $1 2>/dev/null| $DIR/pubkey_speed "$2" rsa $3
echo -n " e=f4 "; openssl genrsa -f4 $1 2>/dev/null| $DIR/pubkey_speed "$2" rsa $3
}
function rsatestall {
@ -19,7 +21,7 @@ function rsatestall {
}
function ecdsatest {
openssl ecparam -genkey -name $1 -noout | sudo ./pubkey_speed "$2" ecdsa $3
openssl ecparam -genkey -name $1 -noout | $DIR/pubkey_speed "$2" ecdsa $3
}