Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | SH="/bin/sh" |
Richard Levitte | 451dc18 | 2002-06-13 20:42:35 +0000 | [diff] [blame] | 4 | if test "$OSTYPE" = msdosdjgpp; then |
Andy Polyakov | 62d2793 | 2005-02-01 23:48:37 +0000 | [diff] [blame] | 5 | PATH="../apps\;$PATH" |
Richard Levitte | 451dc18 | 2002-06-13 20:42:35 +0000 | [diff] [blame] | 6 | else |
Andy Polyakov | 62d2793 | 2005-02-01 23:48:37 +0000 | [diff] [blame] | 7 | PATH="../apps:$PATH" |
Richard Levitte | 451dc18 | 2002-06-13 20:42:35 +0000 | [diff] [blame] | 8 | fi |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 9 | export SH PATH |
| 10 | |
| 11 | SSLEAY_CONFIG="-config CAss.cnf" |
| 12 | export SSLEAY_CONFIG |
| 13 | |
Andy Polyakov | 62d2793 | 2005-02-01 23:48:37 +0000 | [diff] [blame] | 14 | OPENSSL="`pwd`/../util/opensslwrap.sh" |
| 15 | export OPENSSL |
| 16 | |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 17 | /bin/rm -fr demoCA |
| 18 | $SH ../apps/CA.sh -newca <<EOF |
| 19 | EOF |
| 20 | |
| 21 | if [ $? != 0 ]; then |
| 22 | exit 1; |
| 23 | fi |
| 24 | |
| 25 | SSLEAY_CONFIG="-config Uss.cnf" |
| 26 | export SSLEAY_CONFIG |
| 27 | $SH ../apps/CA.sh -newreq |
| 28 | if [ $? != 0 ]; then |
| 29 | exit 1; |
| 30 | fi |
| 31 | |
| 32 | |
Ben Laurie | 288370e | 1999-01-02 19:01:41 +0000 | [diff] [blame] | 33 | SSLEAY_CONFIG="-config ../apps/openssl.cnf" |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 34 | export SSLEAY_CONFIG |
| 35 | $SH ../apps/CA.sh -sign <<EOF |
| 36 | y |
| 37 | y |
| 38 | EOF |
| 39 | if [ $? != 0 ]; then |
| 40 | exit 1; |
| 41 | fi |
| 42 | |
| 43 | |
| 44 | $SH ../apps/CA.sh -verify newcert.pem |
| 45 | if [ $? != 0 ]; then |
| 46 | exit 1; |
| 47 | fi |
| 48 | |
| 49 | /bin/rm -fr demoCA newcert.pem newreq.pem |
| 50 | #usage: CA -newcert|-newreq|-newca|-sign|-verify |
| 51 | |