#!/bin/sh

#
# Build a root certificate
#

if test $KEY_DIR; then
	cd $KEY_DIR && \
	openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \
        chmod 0600 ca.key
else
	echo you must define KEY_DIR
fi