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