aboutsummaryrefslogtreecommitdiff
path: root/tests/client.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/client.testscript')
-rw-r--r--tests/client.testscript12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/client.testscript b/tests/client.testscript
index 97872ad..10470d4 100644
--- a/tests/client.testscript
+++ b/tests/client.testscript
@@ -12,7 +12,7 @@ test.arguments += rsautl -sign -keyform engine -engine pkcs11
: no-sock
:
- env --unset=OPENSSL_AGENT_PKCS11_SOCK - $* -inkey 'pkcs11:' 2>>EOE != 0
+ env --unset=OPENSSL_AGENT_PKCS11_SOCK -- $* -inkey 'pkcs11:' 2>>EOE != 0
error: OPENSSL_AGENT_PKCS11_SOCK environment variable is not set
EOE
}
@@ -32,19 +32,19 @@ test.arguments += rsautl -sign -keyform engine -engine pkcs11
+sed -n -e 's/^OPENSSL_AGENT_PKCS11_PID=(.+);.+$/\1/p' <"$script" | set pid
+sed -n -e 's/^OPENSSL_AGENT_PKCS11_SOCK=(.+);.+;$/\1/p' <"$script" | set sock
- sign = env - OPENSSL_AGENT_PKCS11_SOCK="$sock" $*
+ vars = OPENSSL_AGENT_PKCS11_SOCK="$sock"
: sign
:
{
- $sign --simulate success -inkey 'pkcs11:' >'signature' : simulate-opt
- $sign -inkey 'pkcs11:' >'signature' : no-simulate-opt
+ env $vars -- $* --simulate success -inkey 'pkcs11:' >'signature' : simulate-opt
+ env $vars -- $* -inkey 'pkcs11:' >'signature' : no-simulate-opt
}
: failure
:
{
- $sign --simulate failure -inkey 'pkcs11:' 2>>EOE != 0
+ env $vars -- $* --simulate failure -inkey 'pkcs11:' 2>>EOE != 0
error: unable to sign using simulated private key
EOE
}
@@ -52,7 +52,7 @@ test.arguments += rsautl -sign -keyform engine -engine pkcs11
: wrong-key
:
{
- $sign --simulate success -inkey 'pkcs11:object=key' 2>>EOE != 0
+ env $vars -- $* --simulate success -inkey 'pkcs11:object=key' 2>>EOE != 0
error: private key doesn't match
EOE
}