summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2006-02-16 20:20:24 +0000
committerUlf Möller <ulf@openssl.org>2006-02-16 20:20:24 +0000
commitdc24110311b9bfc07b2699ae365e7a3820621655 (patch)
tree203bb2d656ba6bac99b358c3888d2f032edfed51 /test
parentb3e72fc37f6ae850bbac4bbebb8e47f84c5b134d (diff)
wrap shlib for testtsa
Submitted by: David Somers <dsomers@omz13.com>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile2
-rw-r--r--test/testtsa41
2 files changed, 23 insertions, 20 deletions
diff --git a/test/Makefile b/test/Makefile
index 5f977c171f..088d0bc126 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -287,7 +287,7 @@ test_aes: #$(AESTEST)
# ../util/shlib_wrap.sh ./$(AESTEST)
test_tsa:
- @if ../apps/openssl no-rsa; then \
+ @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \
echo "skipping testtsa test -- requires RSA"; \
else \
sh ./testtsa; \
diff --git a/test/testtsa b/test/testtsa
index b135438b7d..746aa258d6 100644
--- a/test/testtsa
+++ b/test/testtsa
@@ -11,6 +11,9 @@ export SH PATH
OPENSSL_CONF="../CAtsa.cnf"
export OPENSSL_CONF
+OPENSSL="../util/opensslwrap.sh"
+export OPENSSL
+
error () {
echo "ERROR DURING TSA TESTS!!!!!!!!!!!!!!!!" >&2
@@ -49,7 +52,7 @@ create_tsa_cert () {
INDEX=$1
EXT=$2
- openssl req -new -out tsa_req${INDEX}.pem -keyout tsa_key${INDEX}.pem <<EOF
+ ../../util/shlib_wrap.sh ../../apps/openssl req -new -out tsa_req${INDEX}.pem -keyout tsa_key${INDEX}.pem <<EOF
HU
Budapest
Buda
@@ -58,7 +61,7 @@ tsa${INDEX}
EOF
test $? != 0 && error
- openssl ca -in tsa_req${INDEX}.pem -out tsa_cert${INDEX}.pem \
+ ../../util/shlib_wrap.sh ../../apps/openssl ca -in tsa_req${INDEX}.pem -out tsa_cert${INDEX}.pem \
-extensions $EXT <<EOF
y
y
@@ -68,37 +71,37 @@ EOF
print_request () {
- openssl ts -query -in $1 -text
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -query -in $1 -text
}
create_time_stamp_request1 () {
- openssl ts -query -data ../testtsa -policy tsa_policy1 -cert -out req1.tsq
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -query -data ../testtsa -policy tsa_policy1 -cert -out req1.tsq
test $? != 0 && error
}
create_time_stamp_request2 () {
- openssl ts -query -data ../testtsa -policy tsa_policy2 -no_nonce \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -query -data ../testtsa -policy tsa_policy2 -no_nonce \
-out req2.tsq
test $? != 0 && error
}
create_time_stamp_request3 () {
- openssl ts -query -data ../CAtsa.cnf -no_nonce -out req3.tsq
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -query -data ../CAtsa.cnf -no_nonce -out req3.tsq
test $? != 0 && error
}
print_response () {
- openssl ts -reply -in $1 -text
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $1 -text
test $? != 0 && error
}
create_time_stamp_response () {
- openssl ts -reply -section $3 -queryfile $1 -out $2
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -section $3 -queryfile $1 -out $2
test $? != 0 && error
}
@@ -106,26 +109,26 @@ time_stamp_response_token_test () {
RESPONSE2=$2.copy.tsr
TOKEN_DER=$2.token.der
- openssl ts -reply -in $2 -out $TOKEN_DER -token_out
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $2 -out $TOKEN_DER -token_out
test $? != 0 && error
- openssl ts -reply -in $TOKEN_DER -token_in -out $RESPONSE2
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $TOKEN_DER -token_in -out $RESPONSE2
test $? != 0 && error
cmp $RESPONSE2 $2
test $? != 0 && error
- openssl ts -reply -in $2 -text -token_out
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $2 -text -token_out
test $? != 0 && error
- openssl ts -reply -in $TOKEN_DER -token_in -text -token_out
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $TOKEN_DER -token_in -text -token_out
test $? != 0 && error
- openssl ts -reply -queryfile $1 -text -token_out
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -queryfile $1 -text -token_out
test $? != 0 && error
}
verify_time_stamp_response () {
- openssl ts -verify -queryfile $1 -in $2 -CAfile demoCA/cacert.pem \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -verify -queryfile $1 -in $2 -CAfile demoCA/cacert.pem \
-untrusted tsa_cert1.pem
test $? != 0 && error
- openssl ts -verify -data $3 -in $2 -CAfile demoCA/cacert.pem \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -verify -data $3 -in $2 -CAfile demoCA/cacert.pem \
-untrusted tsa_cert1.pem
test $? != 0 && error
}
@@ -133,19 +136,19 @@ verify_time_stamp_response () {
verify_time_stamp_token () {
# create the token from the response first
- openssl ts -reply -in $2 -out $2.token -token_out
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -reply -in $2 -out $2.token -token_out
test $? != 0 && error
- openssl ts -verify -queryfile $1 -in $2.token -token_in \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -verify -queryfile $1 -in $2.token -token_in \
-CAfile demoCA/cacert.pem -untrusted tsa_cert1.pem
test $? != 0 && error
- openssl ts -verify -data $3 -in $2.token -token_in \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -verify -data $3 -in $2.token -token_in \
-CAfile demoCA/cacert.pem -untrusted tsa_cert1.pem
test $? != 0 && error
}
verify_time_stamp_response_fail () {
- openssl ts -verify -queryfile $1 -in $2 -CAfile demoCA/cacert.pem \
+ ../../util/shlib_wrap.sh ../../apps/openssl ts -verify -queryfile $1 -in $2 -CAfile demoCA/cacert.pem \
-untrusted tsa_cert1.pem
# Checks if the verification failed, as it should have.
test $? == 0 && error