testca revision 109998
1#!/bin/sh 2 3SH="/bin/sh" 4if test "$OSTYPE" = msdosdjgpp; then 5 PATH=./apps\;../apps\;$PATH 6else 7 PATH=../apps:$PATH 8fi 9export SH PATH 10 11SSLEAY_CONFIG="-config CAss.cnf" 12export SSLEAY_CONFIG 13 14/bin/rm -fr demoCA 15$SH ../apps/CA.sh -newca <<EOF 16EOF 17 18if [ $? != 0 ]; then 19 exit 1; 20fi 21 22SSLEAY_CONFIG="-config Uss.cnf" 23export SSLEAY_CONFIG 24$SH ../apps/CA.sh -newreq 25if [ $? != 0 ]; then 26 exit 1; 27fi 28 29 30SSLEAY_CONFIG="-config ../apps/openssl.cnf" 31export SSLEAY_CONFIG 32$SH ../apps/CA.sh -sign <<EOF 33y 34y 35EOF 36if [ $? != 0 ]; then 37 exit 1; 38fi 39 40 41$SH ../apps/CA.sh -verify newcert.pem 42if [ $? != 0 ]; then 43 exit 1; 44fi 45 46/bin/rm -fr demoCA newcert.pem newreq.pem 47#usage: CA -newcert|-newreq|-newca|-sign|-verify 48 49