From: Nikos Mavrogiannopoulos Date: Fri, 7 Jun 2013 18:48:06 +0000 (+0200) Subject: avoid common files X-Git-Tag: gnutls_3_2_2~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3629d55e3720ab62ea7add89ad1bd75199edf9b;p=thirdparty%2Fgnutls.git avoid common files --- diff --git a/tests/sha2/sha2 b/tests/sha2/sha2 index 7b5da51544..7dcd36ad7a 100755 --- a/tests/sha2/sha2 +++ b/tests/sha2/sha2 @@ -25,10 +25,10 @@ srcdir=${srcdir:-.} CERTTOOL=${CERTTOOL:-../../src/certtool$EXEEXT} -echo ca > template -echo cn = "SHA 512 CA" >> template +echo ca > template-sha2 +echo cn = "SHA 512 CA" >> template-sha2 -$CERTTOOL -d 2 --generate-self-signed --template template \ +$CERTTOOL -d 2 --generate-self-signed --template template-sha2 \ --load-privkey $srcdir/key-ca.pem \ --outfile new-ca.pem \ --hash sha512 >out 2>&1 @@ -38,10 +38,10 @@ if [ $? != 0 ];then exit 1 fi -echo ca > template -echo cn = "SHA 384 sub-CA" >> template +echo ca > template-sha2 +echo cn = "SHA 384 sub-CA" >> template-sha2 -$CERTTOOL -d 2 --generate-certificate --template template \ +$CERTTOOL -d 2 --generate-certificate --template template-sha2 \ --load-ca-privkey $srcdir/key-ca.pem \ --load-ca-certificate new-ca.pem \ --load-privkey $srcdir/key-subca.pem \ @@ -53,10 +53,10 @@ if [ $? != 0 ];then exit 1 fi -echo ca > template -echo cn = "SHA 256 sub-sub-CA" >> template +echo ca > template-sha2 +echo cn = "SHA 256 sub-sub-CA" >> template-sha2 -$CERTTOOL -d 2 --generate-certificate --template template \ +$CERTTOOL -d 2 --generate-certificate --template template-sha2 \ --load-ca-privkey $srcdir/key-subca.pem \ --load-ca-certificate new-subca.pem \ --load-privkey $srcdir/key-subsubca.pem \ @@ -68,9 +68,9 @@ if [ $? != 0 ];then exit 1 fi -echo cn = "End-user" > template +echo cn = "End-user" > template-sha2 -$CERTTOOL -d 2 --generate-certificate --template template \ +$CERTTOOL -d 2 --generate-certificate --template template-sha2 \ --load-ca-privkey $srcdir/key-subsubca.pem \ --load-ca-certificate new-subsubca.pem \ --load-privkey $srcdir/key-user.pem \ @@ -81,7 +81,7 @@ if [ $? != 0 ];then exit 1 fi -num=`cat new-user.pem new-subsubca.pem new-subca.pem new-ca.pem | $CERTTOOL --verify-chain | tee verify | grep -c Verified` +num=`cat new-user.pem new-subsubca.pem new-subca.pem new-ca.pem | $CERTTOOL --verify-chain | tee verify-sha2 | grep -c Verified` #cat verify if test "$num" != "4"; then @@ -89,6 +89,6 @@ if test "$num" != "4"; then exit 1 fi -rm -f verify new-user.pem new-subsubca.pem new-subca.pem new-ca.pem template +rm -f verify-sha2 new-user.pem new-subsubca.pem new-subca.pem new-ca.pem template-sha2 exit 0 diff --git a/tests/sha2/sha2-dsa b/tests/sha2/sha2-dsa index 2eaee5799a..68b8432e8b 100755 --- a/tests/sha2/sha2-dsa +++ b/tests/sha2/sha2-dsa @@ -25,55 +25,55 @@ srcdir=${srcdir:-.} CERTTOOL=${CERTTOOL:-../../src/certtool$EXEEXT} -echo ca > template -echo cn = "SHA 256 CA" >> template +echo ca > template-dsa +echo cn = "SHA 256 CA" >> template-dsa -$CERTTOOL -d 2 --generate-self-signed --template template \ +$CERTTOOL -d 2 --generate-self-signed --template template-dsa \ --load-privkey $srcdir/key-ca-dsa.pem \ --outfile new-ca-dsa.pem \ - --hash sha256 >out 2>&1 + --hash sha256 >out-dsa 2>&1 if [ $? != 0 ];then - cat out + cat out-dsa exit 1 fi -echo ca > template -echo cn = "SHA 224 Mid CA" >> template +echo ca > template-dsa +echo cn = "SHA 224 Mid CA" >> template-dsa -$CERTTOOL -d 2 --generate-certificate --template template \ +$CERTTOOL -d 2 --generate-certificate --template template-dsa \ --load-ca-privkey $srcdir/key-ca-dsa.pem \ --load-ca-certificate new-ca-dsa.pem \ --load-privkey $srcdir/key-subca-dsa.pem \ --outfile new-subca-dsa.pem \ - --hash sha224 >out 2>&1 + --hash sha224 >out-dsa 2>&1 if [ $? != 0 ];then - cat out + cat out-dsa exit 1 fi -echo cn = "End-user" > template +echo cn = "End-user" > template-dsa -$CERTTOOL -d 2 --generate-certificate --template template \ +$CERTTOOL -d 2 --generate-certificate --template template-dsa \ --load-ca-privkey $srcdir/key-subca-dsa.pem \ --load-ca-certificate new-subca-dsa.pem \ --load-privkey $srcdir/key-dsa.pem \ - --outfile new-user.pem >out 2>&1 + --outfile new-user-dsa.pem >out-dsa 2>&1 if [ $? != 0 ];then - cat out + cat out-dsa exit 1 fi -cat new-user.pem new-subca-dsa.pem new-ca-dsa.pem > out -$CERTTOOL --verify-chain verify +cat new-user-dsa.pem new-subca-dsa.pem new-ca-dsa.pem > out-dsa +$CERTTOOL --verify-chain verify-dsa if [ $? != 0 ];then - cat verify + cat verify-dsa exit 1 fi -rm -f verify new-user.pem new-ca-dsa.pem new-subca-dsa.pem template out +rm -f verify-dsa new-user-dsa.pem new-ca-dsa.pem new-subca-dsa.pem template-dsa out-dsa exit 0