X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Ftreq;h=420d25e16899f9e057b20ab3165a4f53422c038e;hp=ef3c13274a743a3fc228bcf15bb4255a4b95a164;hb=a80e33b991e29988309964439fa8dba30af7ea5c;hpb=288370ea264fd81c5837a4b70604dc23636c0fea diff --git a/test/treq b/test/treq index ef3c13274a..420d25e168 100644 --- a/test/treq +++ b/test/treq @@ -1,9 +1,6 @@ #!/bin/sh -PATH=../apps:$PATH -export PATH - -cmd='../apps/openssl req' +cmd='../util/shlib_wrap.sh ../apps/openssl req -config ../apps/openssl.cnf' if [ "$1"x != "x" ]; then t=$1 @@ -11,71 +8,76 @@ else t=testreq.pem fi +if $cmd -in $t -inform p -noout -text 2>&1 | fgrep -i 'Unknown Public Key'; then + echo "skipping req conversion test for $t" + exit 0 +fi + echo testing req conversions -cp $t fff.p +cp $t req-fff.p echo "p -> d" -$cmd -in fff.p -inform p -outform d >f.d +$cmd -in req-fff.p -inform p -outform d >req-f.d if [ $? != 0 ]; then exit 1; fi #echo "p -> t" -#$cmd -in fff.p -inform p -outform t >f.t +#$cmd -in req-fff.p -inform p -outform t >req-f.t #if [ $? != 0 ]; then exit 1; fi echo "p -> p" -$cmd -in fff.p -inform p -outform p >f.p +$cmd -in req-fff.p -inform p -outform p >req-f.p if [ $? != 0 ]; then exit 1; fi echo "d -> d" -$cmd -verify -in f.d -inform d -outform d >ff.d1 +$cmd -verify -in req-f.d -inform d -outform d >req-ff.d1 if [ $? != 0 ]; then exit 1; fi #echo "t -> d" -#$cmd -in f.t -inform t -outform d >ff.d2 +#$cmd -in req-f.t -inform t -outform d >req-ff.d2 #if [ $? != 0 ]; then exit 1; fi echo "p -> d" -$cmd -verify -in f.p -inform p -outform d >ff.d3 +$cmd -verify -in req-f.p -inform p -outform d >req-ff.d3 if [ $? != 0 ]; then exit 1; fi #echo "d -> t" -#$cmd -in f.d -inform d -outform t >ff.t1 +#$cmd -in req-f.d -inform d -outform t >req-ff.t1 #if [ $? != 0 ]; then exit 1; fi #echo "t -> t" -#$cmd -in f.t -inform t -outform t >ff.t2 +#$cmd -in req-f.t -inform t -outform t >req-ff.t2 #if [ $? != 0 ]; then exit 1; fi #echo "p -> t" -#$cmd -in f.p -inform p -outform t >ff.t3 +#$cmd -in req-f.p -inform p -outform t >req-ff.t3 #if [ $? != 0 ]; then exit 1; fi echo "d -> p" -$cmd -in f.d -inform d -outform p >ff.p1 +$cmd -in req-f.d -inform d -outform p >req-ff.p1 if [ $? != 0 ]; then exit 1; fi #echo "t -> p" -#$cmd -in f.t -inform t -outform p >ff.p2 +#$cmd -in req-f.t -inform t -outform p >req-ff.p2 #if [ $? != 0 ]; then exit 1; fi echo "p -> p" -$cmd -in f.p -inform p -outform p >ff.p3 +$cmd -in req-f.p -inform p -outform p >req-ff.p3 if [ $? != 0 ]; then exit 1; fi -cmp fff.p f.p +cmp req-fff.p req-f.p if [ $? != 0 ]; then exit 1; fi -cmp fff.p ff.p1 +cmp req-fff.p req-ff.p1 if [ $? != 0 ]; then exit 1; fi -#cmp fff.p ff.p2 +#cmp req-fff.p req-ff.p2 #if [ $? != 0 ]; then exit 1; fi -cmp fff.p ff.p3 +cmp req-fff.p req-ff.p3 if [ $? != 0 ]; then exit 1; fi -#cmp f.t ff.t1 +#cmp req-f.t req-ff.t1 #if [ $? != 0 ]; then exit 1; fi -#cmp f.t ff.t2 +#cmp req-f.t req-ff.t2 #if [ $? != 0 ]; then exit 1; fi -#cmp f.t ff.t3 +#cmp req-f.t req-ff.t3 #if [ $? != 0 ]; then exit 1; fi -cmp f.p ff.p1 +cmp req-f.p req-ff.p1 if [ $? != 0 ]; then exit 1; fi -#cmp f.p ff.p2 +#cmp req-f.p req-ff.p2 #if [ $? != 0 ]; then exit 1; fi -cmp f.p ff.p3 +cmp req-f.p req-ff.p3 if [ $? != 0 ]; then exit 1; fi -/bin/rm -f f.* ff.* fff.* +/bin/rm -f req-f.* req-ff.* req-fff.* exit 0