# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: ssl,v 1.1 2006/04/06 21:51:59 mlhuang Exp $
+# $Id: ssl,v 1.2 2006/04/07 03:36:04 mlhuang Exp $
#
# Source function library and configuration
if [ ! -f ${!ssl_crt} ] ; then
mkdir -p $(dirname ${!ssl_crt})
openssl req -new -x509 -days 365 -set_serial $RANDOM \
- -nodes -keyout ${!ssl_key} -out ${!ssl_crt} <<EOF
---
-US
-NJ
-Princeton
-PlanetLab Federation
-$PLC_NAME Central
-${!hostname}
-$PLC_MAIL_SUPPORT_ADDRESS
-EOF
+ -batch -subj "/CN=${!hostname}" \
+ -nodes -keyout ${!ssl_key} -out ${!ssl_crt}
check
chmod 644 ${!ssl_crt}
fi