1*ebfedea0SLionel Sambuc#!/bin/sh 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel SambucSH="/bin/sh" 4*ebfedea0SLionel Sambucif test "$OSTYPE" = msdosdjgpp; then 5*ebfedea0SLionel Sambuc PATH="../apps\;$PATH" 6*ebfedea0SLionel Sambucelse 7*ebfedea0SLionel Sambuc PATH="../apps:$PATH" 8*ebfedea0SLionel Sambucfi 9*ebfedea0SLionel Sambucexport SH PATH 10*ebfedea0SLionel Sambuc 11*ebfedea0SLionel SambucSSLEAY_CONFIG="-config CAss.cnf" 12*ebfedea0SLionel Sambucexport SSLEAY_CONFIG 13*ebfedea0SLionel Sambuc 14*ebfedea0SLionel SambucOPENSSL="`pwd`/../util/opensslwrap.sh" 15*ebfedea0SLionel Sambucexport OPENSSL 16*ebfedea0SLionel Sambuc 17*ebfedea0SLionel Sambuc/bin/rm -fr demoCA 18*ebfedea0SLionel Sambuc$SH ../apps/CA.sh -newca <<EOF 19*ebfedea0SLionel SambucEOF 20*ebfedea0SLionel Sambuc 21*ebfedea0SLionel Sambucif [ $? != 0 ]; then 22*ebfedea0SLionel Sambuc exit 1; 23*ebfedea0SLionel Sambucfi 24*ebfedea0SLionel Sambuc 25*ebfedea0SLionel SambucSSLEAY_CONFIG="-config Uss.cnf" 26*ebfedea0SLionel Sambucexport SSLEAY_CONFIG 27*ebfedea0SLionel Sambuc$SH ../apps/CA.sh -newreq 28*ebfedea0SLionel Sambucif [ $? != 0 ]; then 29*ebfedea0SLionel Sambuc exit 1; 30*ebfedea0SLionel Sambucfi 31*ebfedea0SLionel Sambuc 32*ebfedea0SLionel Sambuc 33*ebfedea0SLionel SambucSSLEAY_CONFIG="-config ../apps/openssl.cnf" 34*ebfedea0SLionel Sambucexport SSLEAY_CONFIG 35*ebfedea0SLionel Sambuc$SH ../apps/CA.sh -sign <<EOF 36*ebfedea0SLionel Sambucy 37*ebfedea0SLionel Sambucy 38*ebfedea0SLionel SambucEOF 39*ebfedea0SLionel Sambucif [ $? != 0 ]; then 40*ebfedea0SLionel Sambuc exit 1; 41*ebfedea0SLionel Sambucfi 42*ebfedea0SLionel Sambuc 43*ebfedea0SLionel Sambuc 44*ebfedea0SLionel Sambuc$SH ../apps/CA.sh -verify newcert.pem 45*ebfedea0SLionel Sambucif [ $? != 0 ]; then 46*ebfedea0SLionel Sambuc exit 1; 47*ebfedea0SLionel Sambucfi 48*ebfedea0SLionel Sambuc 49*ebfedea0SLionel Sambuc/bin/rm -fr demoCA newcert.pem newreq.pem 50*ebfedea0SLionel Sambuc#usage: CA -newcert|-newreq|-newca|-sign|-verify 51*ebfedea0SLionel Sambuc 52