#!/bin/sh TMP="/tmp/`basename $0`" KEY=certs/server-key.der gen_cert() { openssl req -x509 -keyform DER -key $KEY \ -days 1000 -new -outform DER -out $OUT.der -config $CONFIG \ >$TMP 2>&1 if [ "$?" = "0" -a -f $OUT.der ]; then echo "Created: $OUT" else cat $TMP echo "Failed: $OUT" fi openssl x509 -in $OUT.der -inform DER -outform PEM > $OUT.pem rm $TMP } OUT=certs/test/cert-ext-nc KEYFILE=certs/test/cert-ext-nc-key.der CONFIG=certs/test/cert-ext-nc.cfg tee >$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <$CONFIG <