1*ebfedea0SLionel Sambuc#!/bin/sh 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambucif ../util/shlib_wrap.sh ../apps/openssl no-rsa; then 4*ebfedea0SLionel Sambuc echo skipping rsa conversion test 5*ebfedea0SLionel Sambuc exit 0 6*ebfedea0SLionel Sambucfi 7*ebfedea0SLionel Sambuc 8*ebfedea0SLionel Sambuccmd='../util/shlib_wrap.sh ../apps/openssl rsa' 9*ebfedea0SLionel Sambuc 10*ebfedea0SLionel Sambucif [ "$1"x != "x" ]; then 11*ebfedea0SLionel Sambuc t=$1 12*ebfedea0SLionel Sambucelse 13*ebfedea0SLionel Sambuc t=testrsa.pem 14*ebfedea0SLionel Sambucfi 15*ebfedea0SLionel Sambuc 16*ebfedea0SLionel Sambucecho testing rsa conversions 17*ebfedea0SLionel Sambuccp $t fff.p 18*ebfedea0SLionel Sambuc 19*ebfedea0SLionel Sambucecho "p -> d" 20*ebfedea0SLionel Sambuc$cmd -in fff.p -inform p -outform d >f.d 21*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 22*ebfedea0SLionel Sambuc#echo "p -> t" 23*ebfedea0SLionel Sambuc#$cmd -in fff.p -inform p -outform t >f.t 24*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 25*ebfedea0SLionel Sambucecho "p -> p" 26*ebfedea0SLionel Sambuc$cmd -in fff.p -inform p -outform p >f.p 27*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 28*ebfedea0SLionel Sambuc 29*ebfedea0SLionel Sambucecho "d -> d" 30*ebfedea0SLionel Sambuc$cmd -in f.d -inform d -outform d >ff.d1 31*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 32*ebfedea0SLionel Sambuc#echo "t -> d" 33*ebfedea0SLionel Sambuc#$cmd -in f.t -inform t -outform d >ff.d2 34*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 35*ebfedea0SLionel Sambucecho "p -> d" 36*ebfedea0SLionel Sambuc$cmd -in f.p -inform p -outform d >ff.d3 37*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 38*ebfedea0SLionel Sambuc 39*ebfedea0SLionel Sambuc#echo "d -> t" 40*ebfedea0SLionel Sambuc#$cmd -in f.d -inform d -outform t >ff.t1 41*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 42*ebfedea0SLionel Sambuc#echo "t -> t" 43*ebfedea0SLionel Sambuc#$cmd -in f.t -inform t -outform t >ff.t2 44*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 45*ebfedea0SLionel Sambuc#echo "p -> t" 46*ebfedea0SLionel Sambuc#$cmd -in f.p -inform p -outform t >ff.t3 47*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 48*ebfedea0SLionel Sambuc 49*ebfedea0SLionel Sambucecho "d -> p" 50*ebfedea0SLionel Sambuc$cmd -in f.d -inform d -outform p >ff.p1 51*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 52*ebfedea0SLionel Sambuc#echo "t -> p" 53*ebfedea0SLionel Sambuc#$cmd -in f.t -inform t -outform p >ff.p2 54*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 55*ebfedea0SLionel Sambucecho "p -> p" 56*ebfedea0SLionel Sambuc$cmd -in f.p -inform p -outform p >ff.p3 57*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 58*ebfedea0SLionel Sambuc 59*ebfedea0SLionel Sambuccmp fff.p f.p 60*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 61*ebfedea0SLionel Sambuccmp fff.p ff.p1 62*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 63*ebfedea0SLionel Sambuc#cmp fff.p ff.p2 64*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 65*ebfedea0SLionel Sambuccmp fff.p ff.p3 66*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 67*ebfedea0SLionel Sambuc 68*ebfedea0SLionel Sambuc#cmp f.t ff.t1 69*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 70*ebfedea0SLionel Sambuc#cmp f.t ff.t2 71*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 72*ebfedea0SLionel Sambuc#cmp f.t ff.t3 73*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 74*ebfedea0SLionel Sambuc 75*ebfedea0SLionel Sambuccmp f.p ff.p1 76*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 77*ebfedea0SLionel Sambuc#cmp f.p ff.p2 78*ebfedea0SLionel Sambuc#if [ $? != 0 ]; then exit 1; fi 79*ebfedea0SLionel Sambuccmp f.p ff.p3 80*ebfedea0SLionel Sambucif [ $? != 0 ]; then exit 1; fi 81*ebfedea0SLionel Sambuc 82*ebfedea0SLionel Sambuc/bin/rm -f f.* ff.* fff.* 83*ebfedea0SLionel Sambucexit 0 84